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 15, 2025
1 parent b79f393 commit 2e9e6d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 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,16 @@
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...
_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 2e9e6d4

Please sign in to comment.