diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1c6434bfc2274c73d98dbf62b6de9baccdc353ce..732d0c4a644eb444d6b4385643ff32fab19fab52 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,8 +6,6 @@ exclude: | ^setup/|/static/description/index\.html$| # We don't want to mess with tool-generated files .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/| - # Maybe reactivate this when all README files include prettier ignore tags? - ^README\.md$| # Library files can have extraneous formatting (even minimized) /static/(src/)?lib/| # Repos using Sphinx to generate docs don't need prettying @@ -28,7 +26,7 @@ repos: language: fail files: "\\.rej$" - repo: https://github.com/oca/maintainer-tools - rev: ab1d7f6 + rev: 7d8a9f9ad73db0976fb03cbee43d953bc29b89e9 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -46,11 +44,11 @@ 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 - rev: v2.1.2 + rev: v2.6.2 hooks: - id: prettier name: prettier (with plugin-xml) @@ -61,7 +59,7 @@ repos: - --plugin=@prettier/plugin-xml files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$ - repo: https://github.com/pre-commit/mirrors-eslint - rev: v7.8.1 + rev: v8.15.0 hooks: - id: eslint verbose: true @@ -69,7 +67,7 @@ repos: - --color - --fix - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v4.2.0 hooks: - id: trailing-whitespace # exclude autogenerated files @@ -91,12 +89,12 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/asottile/pyupgrade - rev: v2.7.2 + rev: v2.32.1 hooks: - id: pyupgrade args: ["--keep-percent-format"] - repo: https://github.com/PyCQA/isort - rev: 5.5.1 + rev: 5.10.1 hooks: - id: isort name: isort except __init__.py @@ -104,13 +102,13 @@ repos: - --settings=. exclude: /__init__\.py$ - repo: https://gitlab.com/PyCQA/flake8 - rev: 3.8.3 + rev: 3.9.2 hooks: - id: flake8 name: flake8 additional_dependencies: ["flake8-bugbear==20.1.4"] - repo: https://github.com/PyCQA/pylint - rev: pylint-2.5.3 + rev: v2.11.1 hooks: - id: pylint name: pylint with optional checks @@ -119,7 +117,7 @@ repos: - --exit-zero verbose: true additional_dependencies: &pylint_deps - - pylint-odoo==3.5.0 + - pylint-odoo==5.0.5 - id: pylint name: pylint with mandatory checks args: diff --git a/models/scop_cotisation_cg_exo.py b/models/scop_cotisation_cg_exo.py index 9bb1ca169e19b87e6b9462f1b22b2210cd0aedcc..38ecccb84405a4d437bcf16b331bf627ed9077f9 100644 --- a/models/scop_cotisation_cg_exo.py +++ b/models/scop_cotisation_cg_exo.py @@ -487,7 +487,9 @@ class ScopCotisationExo(models.Model): else self.date_exo_ok ) date_due = bordereau_id.invoice_ids.filtered( - lambda i: i.cotiz_quarter == str(quarter) and i.move_type == "out_invoice")[0].invoice_date_due + lambda i: i.cotiz_quarter == str(quarter) + and i.move_type == "out_invoice" + )[0].invoice_date_due # Create refund refund = bordereau_id.invoice_ids.create( { @@ -510,9 +512,15 @@ class ScopCotisationExo(models.Model): 0, None, { - "product_id": inv_id.invoice_line_ids[0].product_id.id, - "account_id": inv_id.invoice_line_ids[0].account_id.id, - "name": inv_id.invoice_line_ids[0].product_id.name + "product_id": inv_id.invoice_line_ids[ + 0 + ].product_id.id, + "account_id": inv_id.invoice_line_ids[ + 0 + ].account_id.id, + "name": inv_id.invoice_line_ids[ + 0 + ].product_id.name + " T" + str(quarter), "price_unit": exo_amount, diff --git a/templates/report_scop_exo.xml b/templates/report_scop_exo.xml index 9178adfffdd12c9957d879952eb78bd95a71cc5b..e7623c878c7dc48f4d79cdd38cd9f145925a77fe 100644 --- a/templates/report_scop_exo.xml +++ b/templates/report_scop_exo.xml @@ -5,10 +5,10 @@ <template id="report_exo_coop_document"> <t t-call="web.external_layout"> <t t-set="o" t-value="o.with_context(lang='fr')" /> - <div class="page" style="font-size: 14px;"> + <div class="page" style="font-size: 15px;"> <div class="row"> - <div class="col-6 offset-6 mt64 mb64"> + <div class="col-6 offset-6 oe_mt64 oe_mb64"> <span t-field="o.partner_id.name" style="text-transform: uppercase; font-weight: 600;" @@ -30,14 +30,14 @@ </div> </div> <div class="row"> - <div class="col-12 text-center mb32"> + <div class="col-12 text-center oe_mb32"> <h2 style="color: #E5074D;"> Demande d'exonération de cotisations </h2> </div> </div> <div class="row"> - <div class="col-12 mb32"> + <div class="col-12 oe_mb32"> <p> Paris, le <span t-esc="o.date_exo_ok" @@ -52,9 +52,9 @@ </p> </div> </div> - <div class="row mb16"> + <div class="row oe_mb16"> <div class="col-12" style="test-align: justify;"> - <p class="mb32">Cher Coopérateur,</p> + <p class="oe_mb32">Cher Coopérateur,</p> <!-- Avis Favorable--> <t t-if="o.final_notice == 'favorable'"> <p @@ -139,7 +139,7 @@ <!-- QWeb Reports --> <record id="cgscop_exo_report" model="ir.actions.report"> - <field name="name">Courrier d'exonération</field> + <field name="name">CG Scop - Courrier d'exonération</field> <field name="model">scop.cotisation.cg.exo</field> <field name="report_type">qweb-pdf</field> <field name="report_name">cgscop_cotisation_cg_exo.report_exo</field> diff --git a/views/res_partner.xml b/views/res_partner.xml index 20d5fa8d6200337ad99d5a26c4df97cde7c6ab27..cc980415ab001be5d8cb53a0df786f688c6592cd 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -16,11 +16,7 @@ attrs="{'invisible': ['|', ('is_cooperative', '!=', True), ('project_status', '!=', '6_suivi')]}" > <field name="exo_ids" mode="tree,form" readonly="1"> - <tree - create="false" - edit="false" - delete="false" - > + <tree create="false" edit="false" delete="false"> <field name="date_request" /> <field name="source" /> <field name="date_exo_start" />