[FIX] product: close 'Labels Printing' wizard after download

Current behavior :
When the download is finished, the wizard stay open

Expected behavior :
Wizard should automatically close after downloading

Reason :
The key `close_on_report_download` wasn't defined during new wizard implementation ( commit d9f45ba694 )

OPW-2710611

closes odoo/odoo#82472

X-original-commit: e50a60573e1f9ad201d4db8607d9ff121cd476c2
Related: odoo/enterprise#23355
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
This commit is contained in:
thcl-odoo
2022-01-11 11:20:59 +00:00
parent c04b313967
commit 11e7954d23
@@ -67,4 +67,6 @@ class ProductLabelLayout(models.TransientModel):
xml_id, data = self._prepare_report_data()
if not xml_id:
raise UserError(_('Unable to find report template for %s format', self.print_format))
return self.env.ref(xml_id).report_action(None, data=data)
report_action = self.env.ref(xml_id).report_action(None, data=data)
report_action.update({'close_on_report_download': True})
return report_action