Skip to content

Commit

Permalink
[FIX] Fix the call to generate danfce
Browse files Browse the repository at this point in the history
  • Loading branch information
danimaribeiro committed Oct 3, 2018
1 parent 50409de commit f98d361
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions br_nfe/reports/danfe_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ def render_qweb_pdf(self, res_ids, data=None):
timezone = pytz.timezone(self.env.context.get('tz')) or pytz.utc

xml_element = etree.fromstring(nfe_xml)
obj_danfe = danfe
if nfe.model == '65':
obj_danfe = danfce
oDanfe = obj_danfe(list_xml=[xml_element], logo=tmpLogo,
oDanfe = danfce(
list_xml=[xml_element], logo=tmpLogo, timezone=timezone)
else:
oDanfe = danfe(list_xml=[xml_element], logo=tmpLogo,
cce_xml=cce_xml_element, timezone=timezone)

tmpDanfe = BytesIO()
Expand Down

0 comments on commit f98d361

Please sign in to comment.