48a6f88c50d1dee08e7b3d642c8034d60d332597
Steps to reproduce the bug: - Create a storable product - Archive it - Try to print labels Problem: A traceback is triggered, Because when we click on print the label we have to open the wizard, so we load the wizard model `product.label.layout` via an onchange: https://github.com/odoo/odoo/blob/15.0/odoo/models.py#L6357-L6360 thanks to the context, it will find the concerned product (via default_product_id) Except that the product is archived, so ignored in the result returned by the onchange therefore, in the confirmation, we will create the wizard, but it will not have a product filled, so in the `_prepare_report_data` function we do not enter in the if or the elif: https://github.com/odoo/odoo/blob/d9f45ba6941939b3d4b40beb5abbc330be84d695/addons/product/wizard/product_label_layout. py#L49-L54 it will therefore raise a traceback when we want to iterate on it: https://github.com/odoo/odoo/blob/d9f45ba6941939b3d4b40beb5abbc330be84d695/addons/product/wizard/product_label_layout.py#L60 opw-2855659 closes odoo/odoo#97226 X-original-commit: 6dcec12074014434ce1283449700aa352993ac0c Signed-off-by: Adrien Widart <awt@odoo.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%