Skip to content

Commit

Permalink
[FIX] l10n_br_nfe: methods names
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelsavegnago committed Nov 19, 2024
1 parent cdc6ac9 commit c4da291
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def _inverse_nfe40_dhSaiEnt(self):
# specially when importing (ERP NFe migration vs supplier Nfe).
nfe40_emit = fields.Many2one(
comodel_name="res.company",
compute="_compute_emit_data",
compute="_compute_nfe_emit_data",
string="Emit",
)

Expand All @@ -391,7 +391,7 @@ def _inverse_nfe40_dhSaiEnt(self):
# Compute Methods
##########################

def _compute_emit_data(self):
def _compute_nfe_emit_data(self):
for doc in self: # TODO if out
doc.nfe40_emit = doc.company_id

Expand All @@ -414,7 +414,7 @@ def _set_nfe40_IEST(self):

nfe40_dest = fields.Many2one(
comodel_name="res.partner",
compute="_compute_dest_data",
compute="_compute_nfe_dest_data",
readonly=True,
string="Dest",
)
Expand All @@ -430,7 +430,7 @@ def _set_nfe40_IEST(self):
##########################

@api.depends("partner_id")
def _compute_dest_data(self):
def _compute_nfe_dest_data(self):
for doc in self: # TODO if out
if (
doc.partner_id.is_anonymous_consumer
Expand All @@ -447,7 +447,7 @@ def _compute_dest_data(self):

nfe40_entrega = fields.Many2one(
comodel_name="res.partner",
compute="_compute_entrega_data",
compute="_compute_nfe_entrega_data",
string="Entrega",
)

Expand All @@ -457,7 +457,7 @@ def _compute_dest_data(self):
##########################

@api.depends("partner_shipping_id")
def _compute_entrega_data(self):
def _compute_nfe_entrega_data(self):
for rec in self:
if (
rec.document_type == MODELO_FISCAL_NFCE
Expand Down
4 changes: 2 additions & 2 deletions l10n_br_nfe/tests/test_nfce.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ def test_compute_fiscal_document_fields(self):
self.document_id.partner_id.cnpj_cpf = False
self.document_id.partner_shipping_id = self.document_id.partner_id

self.document_id._compute_entrega_data()
self.document_id._compute_nfe_entrega_data()
self.assertFalse(self.document_id.nfe40_entrega)

self.document_id._compute_dest_data()
self.document_id._compute_nfe_dest_data()
self.assertFalse(self.document_id.nfe40_dest)

0 comments on commit c4da291

Please sign in to comment.