Initial commit

This commit is contained in:
gsinghpal
2026-02-22 01:22:18 -05:00
commit 5200d5baf0
2394 changed files with 386834 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
from odoo import models
class ProductProduct(models.Model):
_inherit = "product.product"
def action_open_label_layout(self):
"""
If a user has direct print option and a label template, return the direct print action,
Otherwise, return the standard Odoo print wizard.
"""
print_wizard = super(ProductProduct, self).action_open_label_layout()
if not self.env['ir.config_parameter'].sudo().get_param('garazd_product_label.replace_standard_wizard'):
return print_wizard
return self.env['print.product.label'].get_quick_report_action(
model_name='product.product', ids=self.ids, close_window=True,
) if self.env.user.print_label_directly and self.env.user.print_label_template_id else print_wizard