diff --git a/.copier-answers.yml b/.copier-answers.yml new file mode 100644 index 0000000000000000000000000000000000000000..d7696c805729387a69e385daf2a6de572c59d521 --- /dev/null +++ b/.copier-answers.yml @@ -0,0 +1,24 @@ +# Do NOT update manually; changes here will be overwritten by Copier +_commit: v1.14.2 +_src_path: https://github.com/OCA/oca-addons-repo-template.git +ci: GitHub +dependency_installation_mode: PIP +generate_requirements_txt: false +github_check_license: false +github_ci_extra_env: {} +github_enable_codecov: false +github_enable_makepot: false +github_enable_stale_action: false +github_enforce_dev_status_compatibility: false +include_wkhtmltopdf: false +odoo_version: 14.0 +org_name: Le Filament +org_slug: lefilament +rebel_module_groups: [] +repo_description: null +repo_name: null +repo_slug: template_module +repo_website: https://le-filament.com +travis_apt_packages: [] +travis_apt_sources: [] + diff --git a/.eslintrc.yml b/.eslintrc.yml index d4cc423ccda9db9691205c9da83307af97b2670f..9429bc688aab4993eae460767368f65089afa323 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -4,7 +4,7 @@ env: # See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449 parserOptions: - ecmaVersion: 2017 + ecmaVersion: 2019 overrides: - files: diff --git a/.gitignore b/.gitignore index 818770fb1bdc0a144e924c9a5940f0b035df8a0d..9c283fd41f6cc3330653f1d90a820b85e23caf65 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ build/ develop-eggs/ dist/ eggs/ -lib/ lib64/ parts/ sdist/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1c6434bfc2274c73d98dbf62b6de9baccdc353ce..4acca684ec8c5cda7b3ecd21b9e568ab03d57e8c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,11 @@ repos: entry: found forbidden files; remove them language: fail files: "\\.rej$" + - id: en-po-files + name: en.po files cannot exist + entry: found a en.po file + language: fail + files: '[a-zA-Z0-9_]*/i18n/en\.po$' - repo: https://github.com/oca/maintainer-tools rev: ab1d7f6 hooks: @@ -46,7 +51,7 @@ repos: - --remove-duplicate-keys - --remove-unused-variables - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 22.3.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier @@ -96,32 +101,28 @@ repos: - id: pyupgrade args: ["--keep-percent-format"] - repo: https://github.com/PyCQA/isort - rev: 5.5.1 + rev: 5.12.0 hooks: - id: isort name: isort except __init__.py args: - --settings=. exclude: /__init__\.py$ - - repo: https://gitlab.com/PyCQA/flake8 + - repo: https://github.com/PyCQA/flake8 rev: 3.8.3 hooks: - id: flake8 name: flake8 additional_dependencies: ["flake8-bugbear==20.1.4"] - - repo: https://github.com/PyCQA/pylint - rev: pylint-2.5.3 + - repo: https://github.com/OCA/pylint-odoo + rev: 7.0.2 hooks: - - id: pylint + - id: pylint_odoo name: pylint with optional checks args: - --rcfile=.pylintrc - --exit-zero verbose: true - additional_dependencies: &pylint_deps - - pylint-odoo==3.5.0 - - id: pylint - name: pylint with mandatory checks + - id: pylint_odoo args: - --rcfile=.pylintrc-mandatory - additional_dependencies: *pylint_deps diff --git a/.pylintrc b/.pylintrc index dc6270e15be0c08da00e768a570f27c785d8630e..941ea6ba8dc268fa854836ba0651f657a7f98a7b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,3 +1,5 @@ + + [MASTER] load-plugins=pylint_odoo score=n @@ -73,6 +75,7 @@ enable=anomalous-backslash-in-string, invalid-commit, missing-manifest-dependency, missing-newline-extrafiles, + missing-readme, no-utf8-coding-comment, odoo-addons-relative-import, old-api7-method-defined, diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 43ea23947166ff8080219007cfae43ec54a28f8e..4336f52d81465175d3cea21e54fe6b6089078d36 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -1,3 +1,4 @@ + [MASTER] load-plugins=pylint_odoo score=n diff --git a/models/account_invoice_report.py b/models/account_invoice_report.py index 226483ba4f6fd05729be7474d4c9f1dba8941b02..05a40fde6cffc95d6aad5f756874f5425f1ce820 100644 --- a/models/account_invoice_report.py +++ b/models/account_invoice_report.py @@ -1,16 +1,18 @@ # Copyright 2024- Le Filament (https://le-filament.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) -from odoo import fields, models, api +from odoo import fields, models class AccountInvoiceReport(models.Model): _inherit = "account.invoice.report" membership_state = fields.Char(string="Statut d'adhésion actuel") - region_id = fields.Many2one("res.region",string="Région implantation") + region_id = fields.Many2one("res.region", string="Région implantation") legal_status_id = fields.Many2one("afac.partner.legal", string="Statut juridique") - legal_status_detail_id = fields.Many2one("afac.partner.legal.detail",string="Statut juridique détaillé") + legal_status_detail_id = fields.Many2one( + "afac.partner.legal.detail", string="Statut juridique détaillé" + ) # ------------------------------------------------------ # Fields declaration @@ -44,9 +46,9 @@ class AccountInvoiceReport(models.Model): # Business methods # ------------------------------------------------------ def _select(self): - return( + return ( super(AccountInvoiceReport, self)._select() - +""", + + """, partner.membership_state as membership_state, partner.region_id as region_id, partner.legal_status_id as legal_status_id,