diff options
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 75adb352..397bd06d 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -18,13 +18,13 @@ class ProductTemplate(models.Model): x_attribute_set_id = fields.Integer( string="Magento Attribute Set ID", - default=0, - index=True, - help="Attribute Set ID dari Magento" + help="Attribute Set ID dari Magento", + readonly=True ) x_attribute_set_name = fields.Char( string="Magento Attribute Set Name", - help="Attribute Set Name dari Magento" + help="Attribute Set Name dari Magento", + readonly=True ) image_carousel_lines = fields.One2many( @@ -85,7 +85,6 @@ class ProductTemplate(models.Model): merchandise_ok = fields.Boolean(string='Product Promotion') print_barcode = fields.Boolean(string='Print Barcode', default=True) # qr_code = fields.Binary("QR Code", compute='_compute_qr_code') - # has_magento = fields.Boolean(string='Has Magento?', default=False) @api.model def create(self, vals): @@ -967,6 +966,8 @@ class ProductProduct(models.Model): return True + has_magento = fields.Boolean(string='Has Magento?', default=False, readonly=True) + def generate_product_sla(self): product_variant_ids = self.env.context.get('active_ids', []) product_variant = self.search([('id', 'in', product_variant_ids)]) |
