From e1ba065cc5ef2ff6607d1a00417b49bf57dc8c66 Mon Sep 17 00:00:00 2001 From: duongtq Date: Wed, 10 Jan 2024 10:34:35 +0700 Subject: [PATCH] [IMP] edi_account_oca: add new edi_account_move_exchange_type_id field on res.partner --- edi_account_oca/models/__init__.py | 1 + edi_account_oca/models/res_partner.py | 15 +++++++++++++++ edi_account_oca/views/res_partner.xml | 1 + 3 files changed, 17 insertions(+) create mode 100644 edi_account_oca/models/res_partner.py diff --git a/edi_account_oca/models/__init__.py b/edi_account_oca/models/__init__.py index 9c0a42138..74548553b 100644 --- a/edi_account_oca/models/__init__.py +++ b/edi_account_oca/models/__init__.py @@ -1 +1,2 @@ from . import account_move +from . import res_partner diff --git a/edi_account_oca/models/res_partner.py b/edi_account_oca/models/res_partner.py new file mode 100644 index 000000000..5c1cea070 --- /dev/null +++ b/edi_account_oca/models/res_partner.py @@ -0,0 +1,15 @@ +# Copyright 2023 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) + +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + edi_account_move_out_exchange_type_id = fields.Many2one( + string="EDI Exchange type for outgoing invoices", + comodel_name="edi.exchange.type", + help="If defined, this EDI Exchange Type will be used to export invoices " + "of that customer.", + ) diff --git a/edi_account_oca/views/res_partner.xml b/edi_account_oca/views/res_partner.xml index 7fffd7005..3cbda850e 100644 --- a/edi_account_oca/views/res_partner.xml +++ b/edi_account_oca/views/res_partner.xml @@ -9,6 +9,7 @@ +