From 54567992232efaff681e3c79f8943e7e9ccc4569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Felipe=20Mil=C3=A9o?= Date: Wed, 18 Dec 2024 19:29:21 -0300 Subject: [PATCH] [REF] imported_document field to fiscal mixin --- l10n_br_fiscal/models/document.py | 2 -- .../models/document_mixin_fields.py | 34 +++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/l10n_br_fiscal/models/document.py b/l10n_br_fiscal/models/document.py index 542ba6e1c210..31d1a7d4d02e 100644 --- a/l10n_br_fiscal/models/document.py +++ b/l10n_br_fiscal/models/document.py @@ -168,8 +168,6 @@ class Document(models.Model): store=True, ) - imported_document = fields.Boolean(string="Imported", default=False) - xml_error_message = fields.Text( readonly=True, string="XML validation errors", diff --git a/l10n_br_fiscal/models/document_mixin_fields.py b/l10n_br_fiscal/models/document_mixin_fields.py index cdcb252e949f..253fbb48dc4f 100644 --- a/l10n_br_fiscal/models/document_mixin_fields.py +++ b/l10n_br_fiscal/models/document_mixin_fields.py @@ -471,3 +471,37 @@ def _operation_domain(self): key_random_code = fields.Char(string="Document Key Random Code") key_check_digit = fields.Char(string="Document Key Check Digit") total_weight = fields.Float(string="Total Weight") + + imported_document = fields.Boolean(string="Imported", default=False) + + ## CTE + + # commitment_date = fields.Datetime("Delivery Date") + # expected_date = fields.Datetime("Expected Date") + + # Remetente + partner_sendering_id = fields.Many2one( + "res.partner", + string="Sender Address", + help="Responsible for sending the goods, usually the issuer of the NFe.", + ) + + # Expedidor + partner_shippering_id = fields.Many2one( + "res.partner", + string="Shipper Address", + help="The one responsible for delivering the cargo to the carrier when \ + the shipment is not carried out by the sender.", + ) + + # Recebedor + partner_receivering_id = fields.Many2one( + "res.partner", + string="Receiver Address", + help="Actor who receives the goods. He is considered an intermediary \ + between the issuer and the final recipient.", + ) + + partner_insurance_id = fields.Many2one("res.partner", string="Insurance Partner") + + imported_document = fields.Boolean(string="Imported", default=False)