From ec39413a93062fa9d8d10cb1a4ab678d1ec8190e Mon Sep 17 00:00:00 2001 From: thibaud <thibaud@le-filament.com> Date: Mon, 23 Sep 2024 11:23:43 +0200 Subject: [PATCH] [UPD] Added account_invoice_report fields --- models/__init__.py | 1 + models/account_invoice_report.py | 55 ++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 models/account_invoice_report.py diff --git a/models/__init__.py b/models/__init__.py index 611ab07..6511877 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -4,3 +4,4 @@ from . import account_journal from . import account_move from . import res_company +from . import account_invoice_report diff --git a/models/account_invoice_report.py b/models/account_invoice_report.py new file mode 100644 index 0000000..226483b --- /dev/null +++ b/models/account_invoice_report.py @@ -0,0 +1,55 @@ +# 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 + + +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") + 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é") + + # ------------------------------------------------------ + # Fields declaration + # ------------------------------------------------------ + + # ------------------------------------------------------ + # SQL Constraints + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Default methods + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Computed fields / Search Fields + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Onchange / Constraints + # ------------------------------------------------------ + + # ------------------------------------------------------ + # CRUD methods (ORM overrides) + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Actions + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Business methods + # ------------------------------------------------------ + def _select(self): + 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, + partner.legal_status_detail_id as legal_status_detail_id + """ + ) -- GitLab