From 953c3591680bcefaf7512ab278f9d509f6712723 Mon Sep 17 00:00:00 2001 From: Renzo Meister Date: Tue, 14 Dec 2021 10:55:02 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Import=20/=20Export=20of=20MIS=20Bu?= =?UTF-8?q?ilder=20Templates=20and=20Styles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mis_builder_expimp/wizards/mis_builder_import_wizard.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mis_builder_expimp/wizards/mis_builder_import_wizard.py b/mis_builder_expimp/wizards/mis_builder_import_wizard.py index 8ed5626..ce6d5d6 100644 --- a/mis_builder_expimp/wizards/mis_builder_import_wizard.py +++ b/mis_builder_expimp/wizards/mis_builder_import_wizard.py @@ -68,14 +68,14 @@ class MisBuilderImportWizard(models.TransientModel): report_values = copy.deepcopy(report_entry) del report_values['extid'] - for kpi in report_values.get('kpi_ids', []): + for kpi in report_values['kpi_ids']: del kpi['extid'] - for expr in kpi.get('expression_ids', []): + for expr in kpi['expression_ids']: del expr['extid'] - for kpi in report_values.get('subkpi_ids', []): + for kpi in report_values['subkpi_ids']: del kpi['extid'] - for expr in kpi.get('expression_ids', []): + for expr in kpi['expression_ids']: del expr['extid'] report_values['move_lines_source'] = self.env['ir.model'].search([('model', '=', report_values['move_lines_source'])]).id return report_values