Skip to content

Commit

Permalink
[IMP] l10n_br_fiscal: add justificative(optional) on create event
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelsavegnago committed Apr 22, 2021
1 parent c579e3c commit 1f6a86f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions l10n_br_fiscal/models/document_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def set_done(self, status_code, response, protocol_date,

def create_event_save_xml(
self, company_id, environment, event_type, xml_file,
document_id=False, invalidate_number_id=False, sequence=False):
document_id=False, invalidate_number_id=False, sequence=False, justification=False):
vals = {
"company_id": company_id.id,
"environment": environment,
Expand Down Expand Up @@ -350,7 +350,8 @@ def create_event_save_xml(
'-' + str(invalidate_number_id.number_end)
else:
vals['document_number'] = invalidate_number_id.number_start

if justification:
vals['justification'] = justification
event_id = self.create(vals)
event_id._save_event_file(xml_file, "xml")
return event_id

0 comments on commit 1f6a86f

Please sign in to comment.