diff --git a/l10n_br_fiscal/models/document.py b/l10n_br_fiscal/models/document.py index 7f5e52fba1ef..1ab1b48fec44 100644 --- a/l10n_br_fiscal/models/document.py +++ b/l10n_br_fiscal/models/document.py @@ -72,12 +72,6 @@ class Document(models.Model): store=True, ) - document_number = fields.Char( - copy=False, - index=True, - unaccent=False, - ) - rps_number = fields.Char( string="RPS Number", copy=False, @@ -85,13 +79,6 @@ class Document(models.Model): unaccent=False, ) - document_key = fields.Char( - string="Key", - copy=False, - index=True, - unaccent=False, - ) - document_date = fields.Datetime( copy=False, ) @@ -103,10 +90,6 @@ class Document(models.Model): default=lambda self: self.env.user, ) - document_type_id = fields.Many2one( - comodel_name="l10n_br_fiscal.document.type", - ) - operation_name = fields.Char( copy=False, ) @@ -122,15 +105,6 @@ class Document(models.Model): copy=False, ) - document_serie_id = fields.Many2one( - comodel_name="l10n_br_fiscal.document.serie", - domain="[('active', '=', True)," "('document_type_id', '=', document_type_id)]", - ) - - document_serie = fields.Char( - string="Serie Number", - ) - document_related_ids = fields.One2many( comodel_name="l10n_br_fiscal.document.related", inverse_name="document_id", diff --git a/l10n_br_fiscal/models/document_fiscal_mixin_fields.py b/l10n_br_fiscal/models/document_fiscal_mixin_fields.py index e6e09296d547..a468e95ca923 100644 --- a/l10n_br_fiscal/models/document_fiscal_mixin_fields.py +++ b/l10n_br_fiscal/models/document_fiscal_mixin_fields.py @@ -443,3 +443,27 @@ def _operation_domain(self): ) force_compute_delivery_costs_by_total = fields.Boolean(default=False) + + document_type_id = fields.Many2one( + comodel_name="l10n_br_fiscal.document.type", + ) + + document_serie_id = fields.Many2one( + comodel_name="l10n_br_fiscal.document.serie", + domain="[('active', '=', True)," "('document_type_id', '=', document_type_id)]", + ) + + document_serie = fields.Char( + string="Serie Number", + ) + + document_number = fields.Char( + copy=False, + index=True, + ) + + document_key = fields.Char( + string="Key", + copy=False, + index=True, + )