From 7549638fad84c217d6ff5a6d6e33438b8c240e4c Mon Sep 17 00:00:00 2001 From: Kimkhoi3010 Date: Wed, 25 Feb 2026 11:26:29 +0700 Subject: [PATCH 1/3] [FIX] website_sale_require_legal: fix race condition in UI tour test --- website_sale_require_legal/static/tests/tours/tour.js | 7 ++++--- website_sale_require_legal/tests/test_ui.py | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/website_sale_require_legal/static/tests/tours/tour.js b/website_sale_require_legal/static/tests/tours/tour.js index 0f251334ce..a1465589b0 100644 --- a/website_sale_require_legal/static/tests/tours/tour.js +++ b/website_sale_require_legal/static/tests/tours/tour.js @@ -59,13 +59,14 @@ odoo.define("website_sale_require_legal.tour", function (require) { trigger: "div[name='o_checkbox_container'] input", }, { - trigger: ".btn-primary:contains('Pay Now')", + trigger: '#payment_method label:contains("Dummy Provider")', }, { - trigger: '#payment_method label:contains("Dummy Provider")', + trigger: 'button[name="o_payment_submit_button"]:not([disabled])', }, { - trigger: 'button[name="o_payment_submit_button"]', + content: "Wait for payment to be processed and redirect", + trigger: "form.oe_product_cart", }, ]; diff --git a/website_sale_require_legal/tests/test_ui.py b/website_sale_require_legal/tests/test_ui.py index ed1f5d1693..9e5d8048fb 100644 --- a/website_sale_require_legal/tests/test_ui.py +++ b/website_sale_require_legal/tests/test_ui.py @@ -38,9 +38,7 @@ def setUp(self): # Create a dummy payment provider to ensure that the tour has at least one # available to it. arch = """ -
- - +
""" redirect_form = self.env["ir.ui.view"].create( From 661d2566966c3da150be849150f3f09f8cbcfe79 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 27 Feb 2026 09:16:16 +0100 Subject: [PATCH 2/3] Update copier template to 1.39 --- .copier-answers.yml | 2 +- .gitattributes | 1 + .github/workflows/pre-commit.yml | 2 + .github/workflows/test.yml | 9 ++++- .pre-commit-config.yaml | 5 ++- .pylintrc | 69 ++++++++++++++++---------------- .pylintrc-mandatory | 50 +++++++++++------------ README.md | 5 ++- 8 files changed, 78 insertions(+), 65 deletions(-) create mode 100644 .gitattributes diff --git a/.copier-answers.yml b/.copier-answers.yml index e1f53ed802..45dfc02c17 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.29 +_commit: v1.39 _src_path: gh:oca/oca-addons-repo-template ci: GitHub convert_readme_fragments_to_markdown: false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..e0d56685a9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +test-requirements.txt merge=union diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index afd7524ef0..43b82fe8e7 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -17,6 +17,8 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.11" + cache: 'pip' + cache-dependency-path: '.pre-commit-config.yaml' - name: Get python version run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - uses: actions/cache@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5d0f95283c..5ec4eb783e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: makepot: "true" services: postgres: - image: postgres:12.0 + image: postgres:12 env: POSTGRES_USER: odoo POSTGRES_PASSWORD: odoo @@ -63,6 +63,13 @@ jobs: run: oca_init_test_database - name: Run tests run: oca_run_tests + - name: Upload screenshots from JS tests + uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: Screenshots of failed JS tests - ${{ matrix.name }}${{ join(matrix.include) }} + path: /tmp/odoo_tests/${{ env.PGDATABASE }} + if-no-files-found: ignore - uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0105a6da57..b9e3951795 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' - repo: https://github.com/oca/maintainer-tools - rev: d5fab7ee87fceee858a3d01048c78a548974d935 + rev: f9b919b9868143135a9c9cb03021089cabba8223 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -104,6 +104,7 @@ repos: additional_dependencies: - "eslint@8.24.0" - "eslint-plugin-jsdoc@" + - "globals@" - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: @@ -140,7 +141,7 @@ repos: - --settings=. exclude: /__init__\.py$ - repo: https://github.com/acsone/setuptools-odoo - rev: 3.1.8 + rev: 3.3.2 hooks: - id: setuptools-odoo-make-default - id: setuptools-odoo-get-requirements diff --git a/.pylintrc b/.pylintrc index 554913276b..0a521c31ff 100644 --- a/.pylintrc +++ b/.pylintrc @@ -25,19 +25,25 @@ disable=all enable=anomalous-backslash-in-string, api-one-deprecated, api-one-multi-together, - assignment-from-none, - attribute-deprecated, class-camelcase, - dangerous-default-value, dangerous-view-replace-wo-priority, - development-status-allowed, duplicate-id-csv, - duplicate-key, duplicate-xml-fields, duplicate-xml-record-id, eval-referenced, - eval-used, incoherent-interpreter-exec-perm, + openerp-exception-warning, + redundant-modulename-xml, + relative-import, + rst-syntax-error, + wrong-tabs-instead-of-spaces, + xml-syntax-error, + assignment-from-none, + attribute-deprecated, + dangerous-default-value, + development-status-allowed, + duplicate-key, + eval-used, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -48,73 +54,68 @@ enable=anomalous-backslash-in-string, method-inverse, method-required-super, method-search, - openerp-exception-warning, pointless-statement, pointless-string-statement, print-used, redundant-keyword-arg, - redundant-modulename-xml, reimported, - relative-import, return-in-init, - rst-syntax-error, sql-injection, too-few-format-args, translation-field, translation-required, unreachable, use-vim-comment, - wrong-tabs-instead-of-spaces, - xml-syntax-error, - attribute-string-redundant, character-not-valid-in-resource-link, - consider-merging-classes-inherited, - context-overridden, create-user-wo-reset-password, dangerous-filter-wo-user, dangerous-qweb-replace-wo-priority, deprecated-data-xml-node, deprecated-openerp-xml-node, duplicate-po-message-definition, - except-pass, file-not-used, + missing-newline-extrafiles, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + str-format-used, + unnecessary-utf8-coding-comment, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + attribute-string-redundant, + consider-merging-classes-inherited, + context-overridden, + except-pass, invalid-commit, manifest-maintainers-list, - missing-newline-extrafiles, missing-readme, missing-return, odoo-addons-relative-import, - old-api7-method-defined, - po-msgstr-variables, - po-syntax-error, renamed-field-parameter, resource-not-exist, - str-format-used, test-folder-imported, translation-contains-variable, translation-positional-used, - unnecessary-utf8-coding-comment, website-manifest-key-not-valid-uri, - xml-attribute-translatable, - xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute, external-request-timeout, - # messages that do not cause the lint step to fail - consider-merging-classes-inherited, + missing-manifest-dependency, + too-complex,, create-user-wo-reset-password, dangerous-filter-wo-user, - deprecated-module, file-not-used, - invalid-commit, - missing-manifest-dependency, missing-newline-extrafiles, - missing-readme, no-utf8-coding-comment, - odoo-addons-relative-import, old-api7-method-defined, + unnecessary-utf8-coding-comment, + # messages that do not cause the lint step to fail + consider-merging-classes-inherited, + deprecated-module, + invalid-commit, + missing-readme, + odoo-addons-relative-import, redefined-builtin, - too-complex, - unnecessary-utf8-coding-comment + manifest-external-assets [REPORTS] diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 7a0cd4efef..098393aadb 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -17,19 +17,25 @@ disable=all enable=anomalous-backslash-in-string, api-one-deprecated, api-one-multi-together, - assignment-from-none, - attribute-deprecated, class-camelcase, - dangerous-default-value, dangerous-view-replace-wo-priority, - development-status-allowed, duplicate-id-csv, - duplicate-key, duplicate-xml-fields, duplicate-xml-record-id, eval-referenced, - eval-used, incoherent-interpreter-exec-perm, + openerp-exception-warning, + redundant-modulename-xml, + relative-import, + rst-syntax-error, + wrong-tabs-instead-of-spaces, + xml-syntax-error, + assignment-from-none, + attribute-deprecated, + dangerous-default-value, + development-status-allowed, + duplicate-key, + eval-used, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -40,56 +46,50 @@ enable=anomalous-backslash-in-string, method-inverse, method-required-super, method-search, - openerp-exception-warning, pointless-statement, pointless-string-statement, print-used, redundant-keyword-arg, - redundant-modulename-xml, reimported, - relative-import, return-in-init, - rst-syntax-error, sql-injection, too-few-format-args, translation-field, translation-required, unreachable, use-vim-comment, - wrong-tabs-instead-of-spaces, - xml-syntax-error, - attribute-string-redundant, character-not-valid-in-resource-link, - consider-merging-classes-inherited, - context-overridden, create-user-wo-reset-password, dangerous-filter-wo-user, dangerous-qweb-replace-wo-priority, deprecated-data-xml-node, deprecated-openerp-xml-node, duplicate-po-message-definition, - except-pass, file-not-used, + missing-newline-extrafiles, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + str-format-used, + unnecessary-utf8-coding-comment, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + attribute-string-redundant, + consider-merging-classes-inherited, + context-overridden, + except-pass, invalid-commit, manifest-maintainers-list, - missing-newline-extrafiles, missing-readme, missing-return, odoo-addons-relative-import, - old-api7-method-defined, - po-msgstr-variables, - po-syntax-error, renamed-field-parameter, resource-not-exist, - str-format-used, test-folder-imported, translation-contains-variable, translation-positional-used, - unnecessary-utf8-coding-comment, website-manifest-key-not-valid-uri, - xml-attribute-translatable, - xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute, external-request-timeout [REPORTS] diff --git a/README.md b/README.md index 756ccfcf38..660cfd790b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ +[![Support the OCA](https://odoo-community.org/readme-banner-image)](https://odoo-community.org/get-involved?utm_source=repo-readme) + +# e-commerce [![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&target_branch=16.0) [![Pre-commit Status](https://github.com/OCA/e-commerce/actions/workflows/pre-commit.yml/badge.svg?branch=16.0)](https://github.com/OCA/e-commerce/actions/workflows/pre-commit.yml?query=branch%3A16.0) [![Build Status](https://github.com/OCA/e-commerce/actions/workflows/test.yml/badge.svg?branch=16.0)](https://github.com/OCA/e-commerce/actions/workflows/test.yml?query=branch%3A16.0) @@ -7,8 +10,6 @@ -# e-commerce - TODO: add repo description. From 8249239d7c68f619dcead1d0ccd61c78a1ad6a45 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 27 Feb 2026 08:34:42 +0000 Subject: [PATCH 3/3] [BOT] post-merge updates --- README.md | 2 +- website_sale_require_legal/README.rst | 8 +++- website_sale_require_legal/__manifest__.py | 2 +- .../static/description/index.html | 46 +++++++++++-------- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 660cfd790b..baf4f6f42e 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ addon | version | maintainers | summary [website_sale_product_item_cart_custom_qty](website_sale_product_item_cart_custom_qty/) | 16.0.1.2.0 | CarlosRoca13 | Allows to add to cart from product items a custom quantity. [website_sale_product_minimal_price](website_sale_product_minimal_price/) | 16.0.1.0.1 | sergio-teruel | Display minimal price for products that has variants [website_sale_product_reference_displayed](website_sale_product_reference_displayed/) | 16.0.1.0.2 | | Display product reference in e-commerce -[website_sale_require_legal](website_sale_require_legal/) | 16.0.1.0.1 | | Force the user to accept legal tems to buy in the web shop +[website_sale_require_legal](website_sale_require_legal/) | 16.0.1.0.2 | | Force the user to accept legal tems to buy in the web shop [website_sale_stock_available](website_sale_stock_available/) | 16.0.1.0.2 | | Display 'Available to promise' in shop online instead of 'Free To Use Quantity' [website_sale_stock_list_preview](website_sale_stock_list_preview/) | 16.0.1.0.1 | | Show the stock of products on the product previews [website_sale_stock_provisioning_date](website_sale_stock_provisioning_date/) | 16.0.1.0.0 | | Display provisioning date for a product in shop online diff --git a/website_sale_require_legal/README.rst b/website_sale_require_legal/README.rst index c397bf5168..c058d5aa4f 100644 --- a/website_sale_require_legal/README.rst +++ b/website_sale_require_legal/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ========================================= Require accepting legal terms to checkout ========================================= @@ -7,13 +11,13 @@ Require accepting legal terms to checkout !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:fb7818797158569b096d297241bf594892e1cf2b346237ca602f4f900edd90b6 + !! source digest: sha256:54af40e4fa7524000619b7683963a7626d89d20ccff9c4a59972c9832387f6c9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Fe--commerce-lightgray.png?logo=github diff --git a/website_sale_require_legal/__manifest__.py b/website_sale_require_legal/__manifest__.py index f54e91c2db..b40ec82ddd 100644 --- a/website_sale_require_legal/__manifest__.py +++ b/website_sale_require_legal/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Require accepting legal terms to checkout", "summary": "Force the user to accept legal tems to buy in the web shop", - "version": "16.0.1.0.1", + "version": "16.0.1.0.2", "category": "Website", "website": "https://github.com/OCA/e-commerce", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/website_sale_require_legal/static/description/index.html b/website_sale_require_legal/static/description/index.html index 0b5a5ad8a8..e95759dbf3 100644 --- a/website_sale_require_legal/static/description/index.html +++ b/website_sale_require_legal/static/description/index.html @@ -1,18 +1,18 @@ - -Require accepting legal terms to checkout +README.rst -