diff --git a/.copier-answers.yml b/.copier-answers.yml index 812834a..691c2d5 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.36 +_commit: v1.39 _src_path: gh:oca/oca-addons-repo-template ci: GitHub convert_readme_fragments_to_markdown: false diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 5e6c3fb..43b82fe 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,6 +18,7 @@ jobs: 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/.pre-commit-config.yaml b/.pre-commit-config.yaml index 650f5e8..f4bf82f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -141,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/README.md b/README.md index c9089b8..91d2b28 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + [![Support the OCA](https://odoo-community.org/readme-banner-image)](https://odoo-community.org/get-involved?utm_source=repo-readme) # module-composition-analysis diff --git a/odoo_repository/utils/scanner.py b/odoo_repository/utils/scanner.py index 954b80e..a327704 100644 --- a/odoo_repository/utils/scanner.py +++ b/odoo_repository/utils/scanner.py @@ -1,8 +1,6 @@ # Copyright 2023 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -from odoo.tools import config - from ..lib.scanner import RepositoryScanner @@ -75,16 +73,10 @@ def _push_scanned_data(self, repo_branch_id, module, data): res = self.env["odoo.module.branch"].push_scanned_data( repo_branch_id, module, data ) - # Commit after each module - if not config["test_enable"]: - self.env.cr.commit() # pylint: disable=invalid-commit return res def _update_last_scanned_commit(self, repo_branch_id, last_fetched_commit): repo_branch_model = self.env["odoo.repository.branch"] repo_branch = repo_branch_model.browse(repo_branch_id) repo_branch.last_scanned_commit = last_fetched_commit - # Commit after each repository/branch - if not config["test_enable"]: - self.env.cr.commit() # pylint: disable=invalid-commit return True