Files
Odoo-Modules/fusion_labels/fusion_labels/models/product_product.py
gsinghpal db4b9aa278 changes
2026-03-11 12:15:53 -04:00

12 lines
547 B
Python

from odoo import models
class ProductProduct(models.Model):
_inherit = "product.product"
def action_open_label_layout(self):
# flake8: noqa: E501
if not self.env['ir.config_parameter'].sudo().get_param('fusion_labels.replace_standard_wizard'):
return super(ProductProduct, self).action_open_label_layout()
action = self.env['ir.actions.act_window']._for_xml_id('fusion_labels.action_print_label_from_product')
action['context'] = {'default_product_product_ids': self.ids}
return action