Skip to content

Commit

Permalink
Merge PR #3198 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by rvalyi
  • Loading branch information
OCA-git-bot committed Aug 26, 2024
2 parents aa559ff + bb69404 commit fc8250e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
26 changes: 0 additions & 26 deletions l10n_br_fiscal/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,13 @@ 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,
index=True,
unaccent=False,
)

document_key = fields.Char(
string="Key",
copy=False,
index=True,
unaccent=False,
)

document_date = fields.Datetime(
copy=False,
)
Expand All @@ -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,
)
Expand All @@ -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",
Expand Down
26 changes: 26 additions & 0 deletions l10n_br_fiscal/models/document_fiscal_mixin_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,29 @@ 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,
unaccent=False,
)

document_key = fields.Char(
string="Key",
copy=False,
index=True,
unaccent=False,
)

0 comments on commit fc8250e

Please sign in to comment.