diff --git a/.pylintrc b/.pylintrc index dc6270e15be0c08da00e768a570f27c785d8630e..542c686d3824ecbc48c169d1bf3b146afb2acb70 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 43ea23947166ff8080219007cfae43ec54a28f8e..74be5fff287bdab1da64e3e5a2ad43a99999e1cc 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 64b1d3682eaaa64843a37df6dbb516651a85bd44..e064d2757ab1a608cbcbe97c48772eb0e92c7de3 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -3,7 +3,7 @@ { "name": "CG SCOP - Cotisations CG", "summary": "CG SCOP - Cotisations CG Scop", - "version": "14.0.1.0.0", + "version": "13.0.1.0.0", "author": "Le Filament", "license": "AGPL-3", "application": False, diff --git a/models/scop_bordereau_cg.py b/models/scop_bordereau_cg.py index 72ea1ee1ce55ba8eb7ccc9586fb3231f2742ee0c..a626d3ad7fec796ad264bc004fcbf39975a90253 100644 --- a/models/scop_bordereau_cg.py +++ b/models/scop_bordereau_cg.py @@ -239,7 +239,7 @@ class Bordereau(models.Model): @api.depends( "invoice_ids.state", - "invoice_ids.payment_state", + "invoice_ids.invoice_payment_state", "bordereau_version_ids", "bordereau_version_ids.state", ) @@ -257,7 +257,7 @@ class Bordereau(models.Model): bordereau.state = "new" else: unpaid_cotiz = bordereau.invoice_ids.filtered( - lambda cotiz: cotiz.payment_state not in ("paid", "cancel") + lambda cotiz: cotiz.invoice_payment_state not in ("paid", "cancel") ) if not unpaid_cotiz: bordereau.state = "paid" @@ -833,7 +833,7 @@ class Bordereau(models.Model): { "partner_id": partner.id, "liasse_fiscale_id": liasse.id, - "move_type": type_invoice, + "type": type_invoice, "year": self.year, "is_contribution": True, "type_contribution_id": type_contribution, @@ -892,7 +892,7 @@ class Bordereau(models.Model): for bordereau in self: inv_ids = bordereau.invoice_ids if bordereau.is_regul: - inv_ids = inv_ids.filtered(lambda i: i.move_type == "out_invoice") + inv_ids = inv_ids.filtered(lambda i: i.type == "out_invoice") move_lines = MoveLine.search( [ ("move_id", "in", inv_ids.ids), @@ -954,7 +954,7 @@ class Bordereau(models.Model): """ domain = [("id", "in", self.invoice_ids.ids)] if self.is_regul: - domain.append(("move_type", "=", "out_invoice")) + domain.append(("type", "=", "out_invoice")) return self.invoice_ids.read_group( domain, ["type_contribution_id", "amount_total_signed"], @@ -967,7 +967,7 @@ class Bordereau(models.Model): :return: dict type_contribution and amount """ return self.invoice_ids.read_group( - [("id", "in", self.invoice_ids.ids), ("move_type", "=", "out_refund")], + [("id", "in", self.invoice_ids.ids), ("type", "=", "out_refund")], ["type_contribution_id", "amount_total_signed"], ["type_contribution_id"], ) diff --git a/models/scop_cotisation_cg.py b/models/scop_cotisation_cg.py index 9c525965973d958ff6cb967a1097eae96bb39215..4bbdd4a662f3dd94c4771a3bd2a7b88895cb7c56 100644 --- a/models/scop_cotisation_cg.py +++ b/models/scop_cotisation_cg.py @@ -32,7 +32,7 @@ class ScopCotisation(models.Model): inverse_name="cotisation_cg_id", string="Factures", domain=[ - ("move_type", "in", ("out_invoice", "out_refund")), + ("type", "in", ("out_invoice", "out_refund")), ("is_contribution", "=", True), ], ) @@ -154,12 +154,12 @@ class ScopCotisation(models.Model): opened_count = len( cotiz.invoice_ids.filtered( lambda i: i.state == "posted" - and i.payment_state not in ("paid", "reversed") + and i.invoice_payment_state not in ("paid", "reversed") ) ) paid_count = len( cotiz.invoice_ids.filtered( - lambda i: i.state == "posted" and i.payment_state == "paid" + lambda i: i.state == "posted" and i.invoice_payment_state == "paid" ) ) cotiz.graph_values = json.dumps( diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv index 7c925ce5c5125d83851fe69bb5190e6790cc78cb..becfa54439fe98c71d8ba63cc05caef7568b4ff9 100644 --- a/security/ir.model.access.csv +++ b/security/ir.model.access.csv @@ -7,13 +7,3 @@ access_scop_bordereau,access_scop_bordereau,model_scop_bordereau,cgscop_cotisati admin_access_scop_bordereau,admin_access_scop_bordereau,model_scop_bordereau,cgscop_partner.group_cg_administrator,1,1,1,1 access_scop_bordereau_version,access_scop_bordereau_version,model_scop_bordereau_version,cgscop_cotisation_cg.group_cotisation_cg_administrative,1,1,1,1 admin_access_scop_bordereau_version,admin_access_scop_bordereau_version,model_scop_bordereau_version,cgscop_partner.group_cg_administrator,1,1,1,1 -access_scop_bordereau_refund_wizard_quarter,access_scop_bordereau_refund_wizard_quarter,model_scop_bordereau_refund_wizard_quarter,cgscop_cotisation_cg.group_cotisation_cg_administrative,1,1,1,1 -admin_access_scop_bordereau_refund_wizard_quarter,admin_access_scop_bordereau_refund_wizard_quarter,model_scop_bordereau_refund_wizard_quarter,cgscop_partner.group_cg_administrator,1,1,1,1 -access_scop_bordereau_refund_wizard,access_scop_bordereau_refund_wizard,model_scop_bordereau_refund_wizard,base.group_user,1,1,1,1 -access_scop_bordereau_update,access_scop_bordereau_update,model_scop_bordereau_update,base.group_user,1,1,1,1 -access_scop_bordereau_validate,access_scop_bordereau_validate,model_scop_bordereau_validate,base.group_user,1,1,1,1 -access_scop_cotisation_regul_wizard,access_scop_cotisation_regul_wizard,model_scop_cotisation_regul_wizard,base.group_user,1,1,1,1 -access_scop_cotisation_cg_wizard,access_scop_cotisation_cg_wizard,model_scop_cotisation_cg_wizard,base.group_user,1,1,1,1 -access_export_journal_cg_wizard,access_export_journal_cg_wizard,model_export_journal_cg_wizard,base.group_user,1,1,1,1 -access_scop_bordereau_change_liasse_wizard,access_scop_bordereau_change_liasse_wizard,model_scop_bordereau_change_liasse_wizard,base.group_user,1,1,1,1 -access_scop_bordereau_change_payment_mode_wizard,access_scop_bordereau_change_payment_mode_wizard,model_scop_bordereau_change_payment_mode_wizard,base.group_user,1,1,1,1 diff --git a/templates/report_scop_bordereau.xml b/templates/report_scop_bordereau.xml index e6db969b547751e76615e3c339273adb8fa70763..4c0ed671131a051750eec7c8e055685c923b5739 100644 --- a/templates/report_scop_bordereau.xml +++ b/templates/report_scop_bordereau.xml @@ -130,7 +130,7 @@ > <t t-if="o.is_regul"> <strong><span - t-esc="sum(o.invoice_ids.filtered(lambda i: i.move_type == 'out_invoice').mapped('amount_total_signed'))" + t-esc="sum(o.invoice_ids.filtered(lambda i: i.type == 'out_invoice').mapped('amount_total_signed'))" t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}" /></strong> </t> diff --git a/views/account_move.xml b/views/account_move.xml index 7bda03bc25c466a1c9c1d4b59cfbde1c23b23eb2..efc6a376b60808559657b1bcc6b8afeef4da9232 100644 --- a/views/account_move.xml +++ b/views/account_move.xml @@ -107,11 +107,11 @@ <field name="view_mode">tree,form,kanban,graph,pivot</field> <field name="domain" - eval="[('move_type','in', ['out_invoice', 'out_refund']), ('is_contribution', '!=', False), ('company_id', '=', ref('base.main_company'))]" + eval="[('type','in', ['out_invoice', 'out_refund']), ('is_contribution', '!=', False), ('company_id', '=', ref('base.main_company'))]" /> <field name="context" - eval="{'default_mov_type':'out_invoice', 'move_type':'out_invoice', 'journal_type': 'sale', 'default_is_contribution': True, 'create': False,}" + eval="{'default_mov_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale', 'default_is_contribution': True, 'create': False,}" /> <field name="search_view_id" ref="invoice_search_scop_cg_inherited" /> </record> diff --git a/views/scop_bordereau_cg.xml b/views/scop_bordereau_cg.xml index 661365be419cbbc9d9e4ea94181e447ba15b02b9..588fa166e29819843f79e624c271bb5386a42c39 100644 --- a/views/scop_bordereau_cg.xml +++ b/views/scop_bordereau_cg.xml @@ -264,9 +264,9 @@ decoration-info="state == 'draft'" decoration-success="state == 'paid'" decoration-muted="state == 'cancel'" - decoration-danger="move_type == 'out_refund' and state == 'posted'" + decoration-danger="type == 'out_refund' and state == 'posted'" > - <field name="move_type" invisible="1" /> + <field name="type" invisible="1" /> <field name="type_contribution_id" /> <field name="cotiz_quarter" /> <field name="invoice_date_due" />