[10.0][FIX]pass declaration to xls template

This commit is contained in:
luc.demeyer@noviat.com
2019-02-07 17:43:40 +01:00
parent 68363f8ef6
commit ec5ebb20ec

View File

@@ -23,7 +23,7 @@ class IntrastatProductDeclarationXlsx(AbstractReportXlsx):
self.env.cr, IR_TRANSLATION_NAME, 'report', lang, src) or src
return val
def _get_template(self):
def _get_template(self, declaration):
template = {
'product': {
@@ -194,7 +194,7 @@ class IntrastatProductDeclarationXlsx(AbstractReportXlsx):
},
}
template.update(
self.env['intrastat.product.declaration']._xls_template())
declaration._xls_template())
return template
@@ -209,7 +209,7 @@ class IntrastatProductDeclarationXlsx(AbstractReportXlsx):
return declaration
def _get_ws_params(self, wb, data, declaration):
template = self._get_template()
template = self._get_template(declaration)
if self.env.context.get('computation_lines'):
wl = declaration._xls_computation_line_fields()
report = 'computation'