From 80fe35bc4d00cf40150f1ecf97ca653588e0a2f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Sat, 28 Aug 2021 19:48:05 -0300 Subject: [PATCH] [REF] +incorterm_id in fiscal doc fixes #1596 --- l10n_br_account/models/__init__.py | 1 + l10n_br_account/models/fiscal_document_mixin.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 l10n_br_account/models/fiscal_document_mixin.py diff --git a/l10n_br_account/models/__init__.py b/l10n_br_account/models/__init__.py index 76a3da68ef0c..dfdb1f828a5d 100644 --- a/l10n_br_account/models/__init__.py +++ b/l10n_br_account/models/__init__.py @@ -5,6 +5,7 @@ from . import fiscal_tax_group from . import account_tax_template from . import account_tax +from . import fiscal_document_mixin from . import fiscal_tax from . import fiscal_operation from . import fiscal_operation_line diff --git a/l10n_br_account/models/fiscal_document_mixin.py b/l10n_br_account/models/fiscal_document_mixin.py new file mode 100644 index 000000000000..03cdd011566b --- /dev/null +++ b/l10n_br_account/models/fiscal_document_mixin.py @@ -0,0 +1,17 @@ +# Copyright (C) 2021-Today - Akretion (). +# @author Magno Costa +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class FiscalDocumentMixin(models.AbstractModel): + _inherit = "l10n_br_fiscal.document.mixin" + + incoterm_id = fields.Many2one( + comodel_name="account.incoterms", + string="Incoterm", + help="International Commercial Terms are a series of" + " predefined commercial terms used in international" + " transactions.", + )