From 0397d284da7ba7b4bd1f96b9a3ab1c056eda850d Mon Sep 17 00:00:00 2001 From: benjamin <benjamin@le-filament.com> Date: Tue, 12 Apr 2022 13:56:13 +0200 Subject: [PATCH] [mig] Migration 13.0 --- .pylintrc | 2 +- .pylintrc-mandatory | 2 +- __manifest__.py | 2 +- migrations/{14.0.1.0.0 => 13.0.1.0.0}/post-migration.py | 0 migrations/{14.0.1.0.0 => 13.0.1.0.0}/pre-migration.py | 0 models/scop_cotisation_aura.py | 6 +++--- security/ir.model.access.csv | 1 - views/account_move.xml | 6 +++--- views/report_cotisation_aura.xml | 2 +- views/report_cotisation_aura_refund.xml | 2 +- 10 files changed, 11 insertions(+), 12 deletions(-) rename migrations/{14.0.1.0.0 => 13.0.1.0.0}/post-migration.py (100%) rename migrations/{14.0.1.0.0 => 13.0.1.0.0}/pre-migration.py (100%) diff --git a/.pylintrc b/.pylintrc index dc6270e..542c686 100644 --- a/.pylintrc +++ b/.pylintrc @@ -8,7 +8,7 @@ manifest_required_authors=Le Filament manifest_required_keys=license manifest_deprecated_keys=description,active license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 -valid_odoo_versions=14.0 +valid_odoo_versions=13.0 [MESSAGES CONTROL] disable=all diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 43ea239..74be5ff 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -8,7 +8,7 @@ manifest_required_authors=Le Filament manifest_required_keys=license manifest_deprecated_keys=description,active license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 -valid_odoo_versions=14.0 +valid_odoo_versions=13.0 [MESSAGES CONTROL] disable=all diff --git a/__manifest__.py b/__manifest__.py index f6838d4..639f2eb 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -3,7 +3,7 @@ { "name": "CG SCOP - Cotisations AURA", "summary": "CG SCOP - Cotisations AURA", - "version": "14.0.1.0.0", + "version": "13.0.1.0.0", "author": "Le Filament", "license": "AGPL-3", "application": False, diff --git a/migrations/14.0.1.0.0/post-migration.py b/migrations/13.0.1.0.0/post-migration.py similarity index 100% rename from migrations/14.0.1.0.0/post-migration.py rename to migrations/13.0.1.0.0/post-migration.py diff --git a/migrations/14.0.1.0.0/pre-migration.py b/migrations/13.0.1.0.0/pre-migration.py similarity index 100% rename from migrations/14.0.1.0.0/pre-migration.py rename to migrations/13.0.1.0.0/pre-migration.py diff --git a/models/scop_cotisation_aura.py b/models/scop_cotisation_aura.py index f180e26..3c75cfa 100644 --- a/models/scop_cotisation_aura.py +++ b/models/scop_cotisation_aura.py @@ -35,7 +35,7 @@ class ScopCotisationAura(models.Model): inverse_name="cotisation_aura_id", string="Factures", domain=[ - ("move_type", "in", ("out_invoice", "out_refund")), + ("type", "in", ("out_invoice", "out_refund")), ("is_contribution", "=", True), ], ) @@ -319,7 +319,7 @@ class ScopCotisationAura(models.Model): "default_year": int(self.year), "default_is_contribution": True, "default_cotisation_aura_id": self.id, - "default_move_type": "out_invoice", + "default_type": "out_invoice", }, "target": "current", } @@ -389,7 +389,7 @@ class ScopCotisationAura(models.Model): { "partner_id": partner.id, "liasse_fiscale_id": liasse.id, - "move_type": "out_invoice", + "type": "out_invoice", "year": int(self.year), "is_contribution": True, "type_contribution_id": type_contrib_ur, diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv index 2afc879..9eb35b6 100644 --- a/security/ir.model.access.csv +++ b/security/ir.model.access.csv @@ -1,4 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_scop_cotisation_aura,access_scop_cotisation_aura,model_scop_cotisation_aura,account.group_account_manager,1,1,1,0 admin_access_scop_cotisation_aura,admin_access_scop_cotisation_aura,model_scop_cotisation_aura,cgscop_partner.group_cg_administrator,1,1,1,1 -access_scop_cotisation_aura_wizard,access_scop_cotisation_aura_wizard,model_scop_cotisation_aura_wizard,base.group_user,1,1,1,1 diff --git a/views/account_move.xml b/views/account_move.xml index 965f9c0..a77aae4 100644 --- a/views/account_move.xml +++ b/views/account_move.xml @@ -70,7 +70,7 @@ <xpath expr="//field[@name='invoice_line_ids']" position="attributes"> <attribute name="context" - >{'default_move_type': context.get('default_move_type'), 'journal_id': journal_id, 'default_partner_id': commercial_partner_id, 'default_currency_id': currency_id or company_currency_id, 'cotisation_aura_id': cotisation_aura_id, 'nb_quarter_aura': nb_quarter_aura}</attribute> + >{'default_type': context.get('default_type'), 'journal_id': journal_id, 'default_partner_id': commercial_partner_id, 'default_currency_id': currency_id or company_currency_id, 'cotisation_aura_id': cotisation_aura_id, 'nb_quarter_aura': nb_quarter_aura}</attribute> </xpath> </field> @@ -129,11 +129,11 @@ <field name="view_mode">tree,form,graph,pivot</field> <field name="domain" - eval="[('move_type','in', ['out_invoice', 'out_refund']), ('is_contribution', '!=', False)]" + eval="[('type','in', ['out_invoice', 'out_refund']), ('is_contribution', '!=', False)]" /> <field name="context" - eval="{'default_move_type':'out_invoice', 'move_type':'out_invoice', 'journal_type': 'sale', 'default_is_contribution': True, 'create': False,}" + eval="{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale', 'default_is_contribution': True, 'create': False,}" /> <field name="search_view_id" diff --git a/views/report_cotisation_aura.xml b/views/report_cotisation_aura.xml index 8b5adb0..04c7577 100644 --- a/views/report_cotisation_aura.xml +++ b/views/report_cotisation_aura.xml @@ -11,7 +11,7 @@ > <xpath expr="//div[@name='hook_page']" position="after"> <div - t-elif="o.move_type == 'out_invoice' and o.journal_id == o.company_id.contribution_journal_id and o.company_id.is_contribution_aura" + t-elif="o.type == 'out_invoice' and o.journal_id == o.company_id.contribution_journal_id and o.company_id.is_contribution_aura" class="page" style="text-align: justify;" > diff --git a/views/report_cotisation_aura_refund.xml b/views/report_cotisation_aura_refund.xml index 42c024d..30fd3f1 100644 --- a/views/report_cotisation_aura_refund.xml +++ b/views/report_cotisation_aura_refund.xml @@ -11,7 +11,7 @@ > <xpath expr="//div[@name='hook_page']" position="after"> <div - t-elif="o.move_type == 'out_refund' and o.journal_id == o.company_id.contribution_journal_id and o.company_id.is_contribution_aura" + t-elif="o.type == 'out_refund' and o.journal_id == o.company_id.contribution_journal_id and o.company_id.is_contribution_aura" class="page mt32" style="text-align: justify;" > -- GitLab