From a18edfcd17a402e8873d4e2c1623cd119a331c22 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Mon, 1 Jun 2026 16:30:35 +0200 Subject: [PATCH 1/2] [FIX] account_invoice_margin: error when deploying on pypi. See: https://github.com/OCA/margin-analysis/issues/268 --- account_invoice_margin/README.rst | 4 ---- account_invoice_margin/readme/DESCRIPTION.rst | 4 ---- .../static/description/index.html | 16 +++++++++------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/account_invoice_margin/README.rst b/account_invoice_margin/README.rst index e6f26149b..68d36ed3e 100644 --- a/account_invoice_margin/README.rst +++ b/account_invoice_margin/README.rst @@ -35,14 +35,10 @@ The new information is available: * on the invoice form view .. figure:: https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_form.png - :scale: 80 % - :alt: Invoice Tree View * and on the invoice tree view .. figure:: https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_tree.png - :scale: 80 % - :alt: Invoice Tree View **Table of contents** diff --git a/account_invoice_margin/readme/DESCRIPTION.rst b/account_invoice_margin/readme/DESCRIPTION.rst index 7042708e2..d0259b2cf 100644 --- a/account_invoice_margin/readme/DESCRIPTION.rst +++ b/account_invoice_margin/readme/DESCRIPTION.rst @@ -5,11 +5,7 @@ The new information is available: * on the invoice form view .. figure:: ../static/description/account_invoice_form.png - :scale: 80 % - :alt: Invoice Tree View * and on the invoice tree view .. figure:: ../static/description/account_invoice_tree.png - :scale: 80 % - :alt: Invoice Tree View diff --git a/account_invoice_margin/static/description/index.html b/account_invoice_margin/static/description/index.html index 3ef182f72..f8a1e6a2e 100644 --- a/account_invoice_margin/static/description/index.html +++ b/account_invoice_margin/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -376,13 +376,13 @@

Account Invoice Margin

  • on the invoice form view
  • -Invoice Tree View +https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_form.png
    -Invoice Tree View +https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_tree.png

    Table of contents

    @@ -450,7 +450,9 @@

    Contributors

    Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    From 4647ddc74f18fe7d0531c6ca26b65b96fbc4ed26 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Mon, 1 Jun 2026 16:47:35 +0200 Subject: [PATCH 2/2] [REF] Run copier update --- .copier-answers.yml | 4 +- .gitattributes | 1 + .github/workflows/pre-commit.yml | 5 +- .github/workflows/test.yml | 9 ++- .pre-commit-config.yaml | 12 +++- .pylintrc | 69 ++++++++++--------- .pylintrc-mandatory | 50 +++++++------- README.md | 5 +- account_invoice_margin/README.rst | 6 +- .../static/description/index.html | 26 ++++--- 10 files changed, 108 insertions(+), 79 deletions(-) create mode 100644 .gitattributes diff --git a/.copier-answers.yml b/.copier-answers.yml index cd0dd8a51..dd019be21 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,7 +1,6 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.29 +_commit: v1.43 _src_path: gh:oca/oca-addons-repo-template -ci: GitHub convert_readme_fragments_to_markdown: false enable_checklog_odoo: false generate_requirements_txt: true @@ -16,6 +15,7 @@ odoo_test_flavor: Both odoo_version: 16.0 org_name: Odoo Community Association (OCA) org_slug: OCA +postgres_image: '' rebel_module_groups: [] repo_description: 'TODO: add repo description.' repo_name: margin-analysis diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..e0d56685a --- /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 afd7524ef..36e6e44ef 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,3 +1,4 @@ + name: pre-commit on: @@ -16,7 +17,9 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.10" + 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 5d0f95283..5ec4eb783 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 3e2a322c4..ac3207aeb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ exclude: | # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: - python: python3 + python: python3.10 node: "16.17.0" repos: - repo: local @@ -38,8 +38,13 @@ repos: entry: found a en.po file language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' + - id: obsolete dotfiles + name: obsolete dotfiles + entry: found obsolete files; remove them + files: '^(\.travis\.yml|\.t2d\.yml|CONTRIBUTING\.md)$' + language: fail - 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 +109,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 +146,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 554913276..0a521c31f 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 7a0cd4efe..098393aad 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 6597600a4..d662482c6 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) + +# margin-analysis [![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/margin-analysis&target_branch=16.0) [![Pre-commit Status](https://github.com/OCA/margin-analysis/actions/workflows/pre-commit.yml/badge.svg?branch=16.0)](https://github.com/OCA/margin-analysis/actions/workflows/pre-commit.yml?query=branch%3A16.0) [![Build Status](https://github.com/OCA/margin-analysis/actions/workflows/test.yml/badge.svg?branch=16.0)](https://github.com/OCA/margin-analysis/actions/workflows/test.yml?query=branch%3A16.0) @@ -7,8 +10,6 @@ -# margin-analysis - TODO: add repo description. diff --git a/account_invoice_margin/README.rst b/account_invoice_margin/README.rst index 68d36ed3e..c0bf0409b 100644 --- a/account_invoice_margin/README.rst +++ b/account_invoice_margin/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 + ====================== Account Invoice Margin ====================== @@ -13,7 +17,7 @@ Account Invoice Margin .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status :alt: Production/Stable -.. |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%2Fmargin--analysis-lightgray.png?logo=github diff --git a/account_invoice_margin/static/description/index.html b/account_invoice_margin/static/description/index.html index f8a1e6a2e..98c1a5048 100644 --- a/account_invoice_margin/static/description/index.html +++ b/account_invoice_margin/static/description/index.html @@ -3,7 +3,7 @@ -Account Invoice Margin +README.rst -
    -

    Account Invoice Margin

    +
    + + +Odoo Community Association + +
    +

    Account Invoice Margin

    -

    Production/Stable License: AGPL-3 OCA/margin-analysis Translate me on Weblate Try me on Runboat

    +

    Production/Stable License: AGPL-3 OCA/margin-analysis Translate me on Weblate Try me on Runboat

    This module allows to show sales margin in invoices.

    The new information is available:

      @@ -398,7 +403,7 @@

      Account Invoice Margin

    -

    Usage

    +

    Usage

    This module also adds a security group.

    1. To activate it go to user and active “Show Invoice Margin” in @@ -406,7 +411,7 @@

      Usage

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -414,16 +419,16 @@

    Bug Tracker

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Tecnativa
    • GRAP
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -463,5 +468,6 @@

    Maintainers

    +