diff --git a/addons/product/i18n/product.pot b/addons/product/i18n/product.pot index 9a964f2c5b4..5a630b76422 100644 --- a/addons/product/i18n/product.pot +++ b/addons/product/i18n/product.pot @@ -1424,6 +1424,14 @@ msgstr "" msgid "Next Activity Type" msgstr "" +#. module: product +#: code:addons/product/wizard/product_label_layout.py:0 +#, python-format +msgid "" +"No product to print, if the product is archived please unarchive it before " +"printing its label." +msgstr "" + #. module: product #: model_terms:ir.actions.act_window,help:product.product_supplierinfo_type_action msgid "No vendor pricelist found" diff --git a/addons/product/wizard/product_label_layout.py b/addons/product/wizard/product_label_layout.py index 02279546444..2efe462548b 100644 --- a/addons/product/wizard/product_label_layout.py +++ b/addons/product/wizard/product_label_layout.py @@ -52,6 +52,8 @@ class ProductLabelLayout(models.TransientModel): elif self.product_ids: products = self.product_ids.ids active_model = 'product.product' + else: + raise UserError(_("No product to print, if the product is archived please unarchive it before printing its label.")) # Build data to pass to the report data = {