From 011ecdee4fa9453a6207aef9cc0f8f2420d884a8 Mon Sep 17 00:00:00 2001 From: Carlos Dauden Date: Mon, 9 Nov 2026 09:00:43 +0100 Subject: [PATCH 1/2] [IMP] update dotfiles Update the oca-addons-repo-template to v1.49. It adds renovate.json, so Renovate keeps the template updated on this branch and on the other branches listed there, and hardens the GitHub workflows. --- .copier-answers.yml | 4 +-- .github/workflows/pre-commit.yml | 20 +++++++++++--- .github/workflows/stale.yml | 9 ++++-- .github/workflows/test.yml | 33 +++++++++++++++++----- .pre-commit-config.yaml | 13 ++++++--- .pylintrc | 47 ++++---------------------------- .pylintrc-mandatory | 38 ++++---------------------- README.md | 5 ++-- checklog-odoo.cfg | 4 +++ renovate.json | 6 ++++ 10 files changed, 85 insertions(+), 94 deletions(-) create mode 100644 renovate.json diff --git a/.copier-answers.yml b/.copier-answers.yml index 93e56ad96c..dac927536f 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,8 +1,7 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.34 +_commit: v1.49 _src_path: git+https://github.com/OCA/oca-addons-repo-template additional_ruff_rules: [] -ci: GitHub convert_readme_fragments_to_markdown: true enable_checklog_odoo: true generate_requirements_txt: true @@ -17,6 +16,7 @@ odoo_test_flavor: Both odoo_version: 19.0 org_name: Odoo Community Association (OCA) org_slug: OCA +postgres_image: '' rebel_module_groups: [] repo_description: queue repo_name: queue diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d61380e4fd..e3344ab04d 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,3 +1,4 @@ + name: pre-commit on: @@ -9,17 +10,28 @@ on: - "19.0" - "19.0-ocabot-*" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: pre-commit: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: "3.11" + python-version: "3.12" + 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 + - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ~/.cache/pre-commit key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index fa17fcd4e8..3b2e536808 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -4,12 +4,17 @@ on: schedule: - cron: "0 12 * * 0" +permissions: + contents: read + issues: write + pull-requests: write + jobs: stale: runs-on: ubuntu-latest steps: - name: Stale PRs and issues policy - uses: actions/stale@v9 + uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} # General settings. @@ -48,7 +53,7 @@ jobs: # * Issues that are pending more information # * Except Issues marked as "no stale" - name: Needs more information stale issues policy - uses: actions/stale@v9 + uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} ascending: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6101a2b026..b03ad0fc83 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,12 +9,21 @@ on: - "19.0" - "19.0-ocabot-*" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: unreleased-deps: runs-on: ubuntu-latest name: Detect unreleased dependencies steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - run: | for reqfile in requirements.txt test-requirements.txt ; do if [ -f ${reqfile} ] ; then @@ -29,7 +38,7 @@ jobs: done test: runs-on: ubuntu-22.04 - container: ${{ matrix.container }} + container: ${{ matrix.container }} # zizmor: ignore[unpinned-images] name: ${{ matrix.name }} strategy: fail-fast: false @@ -50,9 +59,9 @@ jobs: ports: - 5432:5432 env: - OCA_ENABLE_CHECKLOG_ODOO: "1" + "OCA_ENABLE_CHECKLOG_ODOO": "1" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install addons and dependencies @@ -65,9 +74,19 @@ jobs: run: oca_init_test_database - name: Run tests run: oca_run_tests - - uses: codecov/codecov-action@v4 + - name: Upload screenshots from JS tests + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + 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@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: token: ${{ secrets.CODECOV_TOKEN }} - name: Update .pot files - run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} - if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} + run: oca_export_and_push_pot "https://x-access-token:${GIT_PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}" + env: + GIT_PUSH_TOKEN: ${{ secrets.GIT_PUSH_TOKEN }} + if: matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1cd6d9751..5fb0e26289 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ exclude: | # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: - python: python3 + python: python3.12 node: "22.9.0" repos: - repo: local @@ -43,12 +43,17 @@ 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|\.prettierrc\.yml|\.eslintrc\.yml)$' + language: fail - repo: https://github.com/sbidoul/whool rev: v1.3 hooks: - id: whool-init - repo: https://github.com/oca/maintainer-tools - rev: f9b919b9868143135a9c9cb03021089cabba8223 + rev: b8311a95009805a6e5593f0390f52c0fa350117f hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -65,7 +70,7 @@ repos: - --convert-fragments-to-markdown - id: oca-gen-external-dependencies - repo: https://github.com/OCA/odoo-pre-commit-hooks - rev: v0.1.6 + rev: v0.1.7 hooks: - id: oca-checks-odoo-module - id: oca-checks-po @@ -128,7 +133,7 @@ repos: args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/OCA/pylint-odoo - rev: v9.3.15 + rev: v10.0.8 hooks: - id: pylint_odoo name: pylint with optional checks diff --git a/.pylintrc b/.pylintrc index 16996cb36f..6e7ca6b0a3 100644 --- a/.pylintrc +++ b/.pylintrc @@ -4,6 +4,9 @@ load-plugins=pylint_odoo score=n +[IMPORTS] +deprecated-modules=pdb,pudb,ipdb,bs4 + [ODOOLINT] readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" manifest-required-authors=Odoo Community Association (OCA) @@ -23,21 +26,13 @@ disable=all # config as a blocking check. 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, + deprecated-module, development-status-allowed, - duplicate-id-csv, duplicate-key, - duplicate-xml-fields, - duplicate-xml-record-id, - eval-referenced, eval-used, - incoherent-interpreter-exec-perm, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -48,61 +43,39 @@ 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, 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, bad-builtin-groupby, category-allowed, deprecated-name-get, deprecated-odoo-model-method, + deprecated-self-cr, inheritable-method-lambda, inheritable-method-string, invalid-email, @@ -117,6 +90,7 @@ enable=anomalous-backslash-in-string, translation-format-interpolation, translation-format-truncated, translation-fstring-interpolation, + translation-injection, translation-not-lazy, translation-too-few-args, translation-too-many-args, @@ -124,20 +98,11 @@ enable=anomalous-backslash-in-string, no-write-in-compute, # messages that do not cause the lint step to fail consider-merging-classes-inherited, - 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, redefined-builtin, - too-complex, - unnecessary-utf8-coding-comment, manifest-external-assets diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index dc9b71ed30..18694fe630 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -3,6 +3,9 @@ load-plugins=pylint_odoo score=n +[IMPORTS] +deprecated-modules=pdb,pudb,ipdb,bs4 + [ODOOLINT] readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" manifest-required-authors=Odoo Community Association (OCA) @@ -15,21 +18,13 @@ valid-odoo-versions=19.0 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, + deprecated-module, development-status-allowed, - duplicate-id-csv, duplicate-key, - duplicate-xml-fields, - duplicate-xml-record-id, - eval-referenced, eval-used, - incoherent-interpreter-exec-perm, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -40,61 +35,39 @@ 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, 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, bad-builtin-groupby, category-allowed, deprecated-name-get, deprecated-odoo-model-method, + deprecated-self-cr, inheritable-method-lambda, inheritable-method-string, invalid-email, @@ -109,6 +82,7 @@ enable=anomalous-backslash-in-string, translation-format-interpolation, translation-format-truncated, translation-fstring-interpolation, + translation-injection, translation-not-lazy, translation-too-few-args, translation-too-many-args, diff --git a/README.md b/README.md index 50c482176d..9186690a4b 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) + +# queue [![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=19.0) [![Pre-commit Status](https://github.com/OCA/queue/actions/workflows/pre-commit.yml/badge.svg?branch=19.0)](https://github.com/OCA/queue/actions/workflows/pre-commit.yml?query=branch%3A19.0) [![Build Status](https://github.com/OCA/queue/actions/workflows/test.yml/badge.svg?branch=19.0)](https://github.com/OCA/queue/actions/workflows/test.yml?query=branch%3A19.0) @@ -7,8 +10,6 @@ -# queue - queue diff --git a/checklog-odoo.cfg b/checklog-odoo.cfg index 0b55b7bf66..76227c0f4b 100644 --- a/checklog-odoo.cfg +++ b/checklog-odoo.cfg @@ -1,3 +1,7 @@ [checklog-odoo] ignore= WARNING.* 0 failed, 0 error\(s\).* + WARNING .* Killing chrome descendants-or-self .* + WARNING.* Missing widget: res_partner_many2one for field of type many2one.* + (?ms)WARNING.* odoo.addons.base.models.assetsbundle: Error: argument `[$]color` of `rgba[(][$]color, [$]alpha[)]` must be a color.*odoo/addons/web/static/lib/bootstrap/scss/mixins/_buttons.scss, in mixin `button-outline-variant`.* + WARNING .* odoo.tools.config: option addons_path, invalid addons directory .*, skipped diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000000..33c8981ca5 --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended", ":disableDependencyDashboard"], + "baseBranchPatterns": ["20.0", "19.0", "18.0", "17.0", "16.0"], + "enabledManagers": ["copier"] +} From c0ef1d871127b87085162292a77010873d49c31c Mon Sep 17 00:00:00 2001 From: Carlos Dauden Date: Mon, 9 Nov 2026 09:07:45 +0100 Subject: [PATCH 2/2] [IMP] Remove redundant field strings The pylint-odoo version of template v1.48 makes attribute-string-redundant (W8113) mandatory. The removed labels are the ones Odoo already generates from the field name, so the UI does not change. --- queue_job/models/queue_job.py | 5 +---- queue_job/models/queue_job_function.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/queue_job/models/queue_job.py b/queue_job/models/queue_job.py index a2481adb75..329f77ddc8 100644 --- a/queue_job/models/queue_job.py +++ b/queue_job/models/queue_job.py @@ -70,9 +70,7 @@ class QueueJob(models.Model): help="Single shared identifier of a Graph. Empty for a single job.", ) user_id = fields.Many2one(comodel_name="res.users", string="User ID") - company_id = fields.Many2one( - comodel_name="res.company", string="Company", index=True - ) + company_id = fields.Many2one(comodel_name="res.company", index=True) name = fields.Char(string="Description", readonly=True) model_name = fields.Char(string="Model", readonly=True) @@ -135,7 +133,6 @@ class QueueJob(models.Model): channel_method_name = fields.Char(string="Complete Method Name", readonly=True) job_function_id = fields.Many2one( comodel_name="queue.job.function", - string="Job Function", readonly=True, ) diff --git a/queue_job/models/queue_job_function.py b/queue_job/models/queue_job_function.py index 872f5831f0..60963371af 100644 --- a/queue_job/models/queue_job_function.py +++ b/queue_job/models/queue_job_function.py @@ -45,9 +45,7 @@ def _default_channel(self): # model and method should be required, but the required flag doesn't # let a chance to _inverse_name to be executed - model_id = fields.Many2one( - comodel_name="ir.model", string="Model", ondelete="cascade" - ) + model_id = fields.Many2one(comodel_name="ir.model", ondelete="cascade") method = fields.Char() on_fail_method = fields.Char( help="Model function to be called if the job is failed and will not be " @@ -56,7 +54,6 @@ def _default_channel(self): channel_id = fields.Many2one( comodel_name="queue.job.channel", - string="Channel", required=True, default=lambda r: r._default_channel(), )