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,4 @@
from . import res_config_settings
from . import product_template
from . import product_product
from . import print_label_type

View File

@@ -0,0 +1,11 @@
from odoo import fields, models
class PrintLabelTypePy(models.Model):
_name = "print.label.type"
_description = 'Label Types'
name = fields.Char(required=True, translate=True)
code = fields.Char(required=True)
_sql_constraints = [('print_label_type_code_uniq', 'UNIQUE (code)', 'Code of a print label type must be unique.')]

View File

@@ -0,0 +1,13 @@
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('garazd_product_label.replace_standard_wizard'):
return super(ProductProduct, self).action_open_label_layout()
action = self.env['ir.actions.act_window']._for_xml_id('garazd_product_label.action_print_label_from_product')
action['context'] = {'default_product_product_ids': self.ids}
return action

View File

@@ -0,0 +1,13 @@
from odoo import models
class ProductTemplate(models.Model):
_inherit = "product.template"
def action_open_label_layout(self):
# flake8: noqa: E501
if not self.env['ir.config_parameter'].sudo().get_param('garazd_product_label.replace_standard_wizard'):
return super(ProductTemplate, self).action_open_label_layout()
action = self.env['ir.actions.act_window']._for_xml_id('garazd_product_label.action_print_label_from_template')
action['context'] = {'default_product_template_ids': self.ids}
return action

View File

@@ -0,0 +1,7 @@
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
replace_standard_wizard = fields.Boolean(config_parameter='garazd_product_label.replace_standard_wizard')