From 7c8f07d3fd4524fff47ed08a9e2429f44bab7c18 Mon Sep 17 00:00:00 2001 From: oca-git-bot Date: Sun, 1 Nov 2020 22:31:41 +0100 Subject: [PATCH 001/409] [IMP] update dotfiles [ci skip] --- .copier-answers.yml | 3 ++- .pre-commit-config.yaml | 17 +++++++++++++---- .prettierrc.yml | 2 +- .pylintrc | 1 + .pylintrc-mandatory | 1 + 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 156f11344d2..ff9da41a1c8 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,7 +1,8 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.0.2 +_commit: v1.0.3 _src_path: gh:oca/oca-addons-repo-template dependency_installation_mode: PIP +generate_requirements_txt: true include_wkhtmltopdf: false odoo_version: 14.0 rebel_module_groups: [] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1dce7938be..f3596c8b3b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,10 +26,12 @@ repos: language: fail files: "\\.rej$" - repo: https://github.com/oca/maintainer-tools - rev: 2c66e72 + rev: 1b5c7ad hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons + - id: oca-fix-manifest-website + args: ["https://github.com/OCA/stock-logistics-barcode"] - repo: https://github.com/myint/autoflake rev: v1.4 hooks: @@ -39,12 +41,13 @@ repos: rev: 20.8b1 hooks: - id: black - - repo: https://github.com/prettier/prettier - rev: 2.1.2 + - repo: https://github.com/prettier/pre-commit + rev: v2.1.2 hooks: - id: prettier name: prettier + plugin-xml additional_dependencies: + - "prettier@2.1.2" - "@prettier/plugin-xml@0.12.0" args: - --plugin=@prettier/plugin-xml @@ -91,9 +94,15 @@ repos: - --settings=. exclude: /__init__\.py$ - repo: https://github.com/acsone/setuptools-odoo - rev: 2.5.10 + rev: 2.6.0 hooks: - id: setuptools-odoo-make-default + - id: setuptools-odoo-get-requirements + args: + - --output + - requirements.txt + - --header + - "# generated from manifests external_dependencies" - repo: https://gitlab.com/PyCQA/flake8 rev: 3.8.3 hooks: diff --git a/.prettierrc.yml b/.prettierrc.yml index fc5f3a7c4d4..5b6d4b361ac 100644 --- a/.prettierrc.yml +++ b/.prettierrc.yml @@ -5,4 +5,4 @@ printWidth: 88 proseWrap: always semi: true trailingComma: "es5" -xmlWhitespaceSensitivity: "ignore" +xmlWhitespaceSensitivity: "strict" diff --git a/.pylintrc b/.pylintrc index acbffe7b491..e33958833ed 100644 --- a/.pylintrc +++ b/.pylintrc @@ -28,6 +28,7 @@ enable=anomalous-backslash-in-string, class-camelcase, dangerous-default-value, dangerous-view-replace-wo-priority, + development-status-allowed, duplicate-id-csv, duplicate-key, duplicate-xml-fields, diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 1d979ab4696..08bca3cefef 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -21,6 +21,7 @@ enable=anomalous-backslash-in-string, class-camelcase, dangerous-default-value, dangerous-view-replace-wo-priority, + development-status-allowed, duplicate-id-csv, duplicate-key, duplicate-xml-fields, From 9828efb9e6357e300e1c3f7b6cd1b7c1e4ce1d64 Mon Sep 17 00:00:00 2001 From: oca-git-bot Date: Fri, 11 Dec 2020 20:19:48 +0100 Subject: [PATCH 002/409] [IMP] update dotfiles [ci skip] --- .copier-answers.yml | 2 +- .github/workflows/pre-commit.yml | 13 +++++++++++++ .pre-commit-config.yaml | 6 ++++-- .travis.yml | 7 ------- 4 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.copier-answers.yml b/.copier-answers.yml index ff9da41a1c8..a8a37a7f0dd 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.0.3 +_commit: v1.1.1 _src_path: gh:oca/oca-addons-repo-template dependency_installation_mode: PIP generate_requirements_txt: true diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000000..335381cb730 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,13 @@ +name: pre-commit + +on: + pull_request: + push: + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f3596c8b3b1..caf6f52276f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,8 @@ exclude: | # END NOT INSTALLABLE ADDONS # Files and folders generated by bots, to avoid loops ^setup/|/static/description/index\.html$| + # We don't want to mess with tool-generated files + .svg$| # Maybe reactivate this when all README files include prettier ignore tags? ^README\.md$| # Library files can have extraneous formatting (even minimized) @@ -26,7 +28,7 @@ repos: language: fail files: "\\.rej$" - repo: https://github.com/oca/maintainer-tools - rev: 1b5c7ad + rev: ab1d7f6 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -41,7 +43,7 @@ repos: rev: 20.8b1 hooks: - id: black - - repo: https://github.com/prettier/pre-commit + - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.1.2 hooks: - id: prettier diff --git a/.travis.yml b/.travis.yml index 4b5ed106df9..5e8e3a666b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,17 +14,10 @@ addons: - expect-dev # provides unbuffer utility stages: - - linting - test jobs: include: - - stage: linting - name: "pre-commit" - install: pip install pre-commit - script: pre-commit run --all --show-diff-on-failure --verbose --color always - after_success: - before_install: - stage: test env: - TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1" From 40544d362904c4c02c7d9456a4632d97e1a484e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Gil=20Sorribes?= Date: Thu, 14 Nov 2019 13:13:02 +0100 Subject: [PATCH 003/409] [11.0][ADD] stock_barcodes_automatic_entry --- stock_barcodes_automatic_entry/README.rst | 104 ++++ stock_barcodes_automatic_entry/__init__.py | 0 .../__manifest__.py | 23 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 2 + .../readme/USAGE.rst | 18 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 443 ++++++++++++++++++ .../static/src/css/button_style.css | 3 + .../static/src/js/stock_barcodes.js | 19 + .../views/assets.xml | 11 + 11 files changed, 624 insertions(+) create mode 100644 stock_barcodes_automatic_entry/README.rst create mode 100644 stock_barcodes_automatic_entry/__init__.py create mode 100644 stock_barcodes_automatic_entry/__manifest__.py create mode 100644 stock_barcodes_automatic_entry/readme/CONTRIBUTORS.rst create mode 100644 stock_barcodes_automatic_entry/readme/DESCRIPTION.rst create mode 100644 stock_barcodes_automatic_entry/readme/USAGE.rst create mode 100644 stock_barcodes_automatic_entry/static/description/icon.png create mode 100644 stock_barcodes_automatic_entry/static/description/index.html create mode 100644 stock_barcodes_automatic_entry/static/src/css/button_style.css create mode 100644 stock_barcodes_automatic_entry/static/src/js/stock_barcodes.js create mode 100644 stock_barcodes_automatic_entry/views/assets.xml diff --git a/stock_barcodes_automatic_entry/README.rst b/stock_barcodes_automatic_entry/README.rst new file mode 100644 index 00000000000..ea438592f42 --- /dev/null +++ b/stock_barcodes_automatic_entry/README.rst @@ -0,0 +1,104 @@ +============================== +Stock Barcodes Automatic Entry +============================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--barcode-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-barcode/tree/11.0/stock_barcodes_automatic_entry + :alt: OCA/stock-logistics-barcode +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-barcode-11-0/stock-logistics-barcode-11-0-stock_barcodes_automatic_entry + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/150/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module will automatically trigger the click event on a button with the class +'barcode-automatic-entry' after a barcode scanned has been processed. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +* Define, in the view, the button that will be clicked automatically as the example below: + +.. code-block:: xml + +