diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-01-15 16:11:27 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-01-15 16:11:27 +0700 |
| commit | 08e4ee01e48f1f669daf9e6673845f35600f692b (patch) | |
| tree | 9312c730fb9164dd8d25aa2476c5528ee2c53d05 /indoteknik_custom/models/product_template.py | |
| parent | 391295234539e1ff56af6518819bf6c836d109cd (diff) | |
| parent | 74b5caa2ff4c30c824b243a8c621df590eab90e6 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into gudang-service
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index ee33a185..5730b08b 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -15,7 +15,17 @@ _logger = logging.getLogger(__name__) class ProductTemplate(models.Model): _inherit = "product.template" - + x_attribute_set_id = fields.Integer( + string="Magento Attribute Set ID", + default=0, + index=True, + help="Attribute Set ID dari Magento" + ) + x_attribute_set_name = fields.Char( + string="Magento Attribute Set Name", + help="Attribute Set Name dari Magento" + ) + image_carousel_lines = fields.One2many( comodel_name="image.carousel", inverse_name="product_id", @@ -74,7 +84,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): @@ -930,6 +939,8 @@ class ProductProduct(models.Model): qty_pcs_box = fields.Float("Pcs Box") barcode_box = fields.Char("Barcode Box") + has_magento = fields.Boolean(string='Has Magento?', default=False) + def generate_product_sla(self): product_variant_ids = self.env.context.get('active_ids', []) product_variant = self.search([('id', 'in', product_variant_ids)]) |
