[12.0][FIX] excel_import_export
wrong use of dict.iteritems() for python3pull/2505/head
parent
7010b15258
commit
6bce70e2af
|
@ -244,7 +244,7 @@ class XLSXExport(models.AbstractModel):
|
||||||
f.write(decoded_data)
|
f.write(decoded_data)
|
||||||
f.seek(0)
|
f.seek(0)
|
||||||
f.close()
|
f.close()
|
||||||
# Workbook created, temp fie removed
|
# Workbook created, temp file removed
|
||||||
wb = load_workbook(ftemp)
|
wb = load_workbook(ftemp)
|
||||||
os.remove(ftemp)
|
os.remove(ftemp)
|
||||||
# Start working with workbook
|
# Start working with workbook
|
||||||
|
|
|
@ -80,7 +80,7 @@ class ImportXLSXWizard(models.TransientModel):
|
||||||
# Context testing
|
# Context testing
|
||||||
if self._context.get('template_context', False):
|
if self._context.get('template_context', False):
|
||||||
template_context = self._context['template_context']
|
template_context = self._context['template_context']
|
||||||
for key, value in template_context.iteritems():
|
for key, value in template_context.items():
|
||||||
if key not in record or \
|
if key not in record or \
|
||||||
(record._fields[key].type == 'many2one' and
|
(record._fields[key].type == 'many2one' and
|
||||||
record[key].id or record[key]) != value:
|
record[key].id or record[key]) != value:
|
||||||
|
|
Loading…
Reference in New Issue