Skip to content

Commit

Permalink
[RFC] l10n_br_nfe: document.supplement refactor to stackedmodel
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelsavegnago authored and rvalyi committed Jan 16, 2025
1 parent 931ec85 commit aa8b48d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion l10n_br_nfe/models/document_supplement.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@
from odoo.addons.spec_driven_model.models import spec_models


class NFeSupplement(spec_models.SpecModel):
class NFeSupplement(spec_models.StackedModel):
# FIXME: NFeSupplement should actually inherit from spec_models.SpecModel
# but it seems we had broken NFe or MDFe or CTe tests with SpecModel
# it's probably a spec_driven_model framework issue... So it has been reverted
# to StackedModel in https://github.com/OCA/l10n-brazil/pull/3445
_name = "l10n_br_fiscal.document.supplement"
_inherit = ["l10n_br_fiscal.document.supplement", "nfe.40.infnfesupl"]

_nfe40_odoo_module = "odoo.addons.l10n_br_nfe_spec.models.v4_0.leiaute_nfe_v4_00"
_nfe40_stacking_mixin = "nfe.40.infnfesupl"

nfe40_qrCode = fields.Char(related="qrcode")

nfe40_urlChave = fields.Char(related="url_key")

0 comments on commit aa8b48d

Please sign in to comment.