From 94c20f6fb99b679753c01b116317114ce7573531 Mon Sep 17 00:00:00 2001 From: Santiago Rodriguez Date: Mon, 22 Jul 2024 11:20:26 -0600 Subject: [PATCH] [FIX] l10n_mx_edi_addenda_audi: Fix mail and number --- l10n_mx_edi_addenda_audi/__manifest__.py | 1 + l10n_mx_edi_addenda_audi/models/__init__.py | 1 + .../models/account_move.py | 2 -- .../models/res_partner.py | 8 ++++++++ .../views/account_move.xml | 2 -- .../views/res_partner_views.xml | 20 +++++++++++++++++++ 6 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 l10n_mx_edi_addenda_audi/models/res_partner.py create mode 100644 l10n_mx_edi_addenda_audi/views/res_partner_views.xml diff --git a/l10n_mx_edi_addenda_audi/__manifest__.py b/l10n_mx_edi_addenda_audi/__manifest__.py index f40f75bfb..e5ee76042 100644 --- a/l10n_mx_edi_addenda_audi/__manifest__.py +++ b/l10n_mx_edi_addenda_audi/__manifest__.py @@ -12,6 +12,7 @@ "data": [ "views/account_move.xml", "views/l10n_mx_edi_addenda_audi.xml", + "views/res_partner_views.xml", ], "application": False, } diff --git a/l10n_mx_edi_addenda_audi/models/__init__.py b/l10n_mx_edi_addenda_audi/models/__init__.py index 0d5ab6a2f..a81017898 100644 --- a/l10n_mx_edi_addenda_audi/models/__init__.py +++ b/l10n_mx_edi_addenda_audi/models/__init__.py @@ -1,2 +1,3 @@ from . import account_move from . import account_move_line +from . import res_partner diff --git a/l10n_mx_edi_addenda_audi/models/account_move.py b/l10n_mx_edi_addenda_audi/models/account_move.py index 5c6c8d5fd..fb008ddb8 100644 --- a/l10n_mx_edi_addenda_audi/models/account_move.py +++ b/l10n_mx_edi_addenda_audi/models/account_move.py @@ -10,8 +10,6 @@ class AccountMove(models.Model): audi_tax_code = fields.Char(string="Tax Code") audi_fiscal_document_type = fields.Char(string="Fiscal Document Type") audi_document_type = fields.Char(string="Document Type") - audi_supplier_email = fields.Char(string="Supplier Email") - audi_supplier_number = fields.Char(string="Supplier Number") @api.depends("partner_id.l10n_mx_edi_addenda") def _compute_audi_flag(self): diff --git a/l10n_mx_edi_addenda_audi/models/res_partner.py b/l10n_mx_edi_addenda_audi/models/res_partner.py new file mode 100644 index 000000000..d868885af --- /dev/null +++ b/l10n_mx_edi_addenda_audi/models/res_partner.py @@ -0,0 +1,8 @@ +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + audi_supplier_email = fields.Char(string="Supplier Email") + audi_supplier_number = fields.Char(string="Supplier Number") diff --git a/l10n_mx_edi_addenda_audi/views/account_move.xml b/l10n_mx_edi_addenda_audi/views/account_move.xml index bf7d43195..0f736297e 100644 --- a/l10n_mx_edi_addenda_audi/views/account_move.xml +++ b/l10n_mx_edi_addenda_audi/views/account_move.xml @@ -17,8 +17,6 @@ invisible="not audi_flag" /> - - diff --git a/l10n_mx_edi_addenda_audi/views/res_partner_views.xml b/l10n_mx_edi_addenda_audi/views/res_partner_views.xml new file mode 100644 index 000000000..ab224edde --- /dev/null +++ b/l10n_mx_edi_addenda_audi/views/res_partner_views.xml @@ -0,0 +1,20 @@ + + + res.partner.form.inherit.addenda.audi + res.partner + + + + + + + + + +