From e42aee6c9af962edad71603eaaaeceea8589dc7a Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Thu, 15 Jan 2026 16:16:04 +0700 Subject: fix invalid field --- indoteknik_custom/models/product_template.py | 21 ++++++++++----------- indoteknik_custom/views/product_product.xml | 2 +- indoteknik_custom/views/product_template.xml | 6 +++--- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 5730b08b..4ff2dffa 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -15,16 +15,15 @@ _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" - ) + # x_attribute_set_id = fields.Integer( + # string="Magento Attribute Set ID", + # default=0, + # 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", @@ -939,7 +938,7 @@ 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) + # 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', []) diff --git a/indoteknik_custom/views/product_product.xml b/indoteknik_custom/views/product_product.xml index e8a7380b..ee03779f 100644 --- a/indoteknik_custom/views/product_product.xml +++ b/indoteknik_custom/views/product_product.xml @@ -20,7 +20,7 @@ - + diff --git a/indoteknik_custom/views/product_template.xml b/indoteknik_custom/views/product_template.xml index 9fbf007a..06741859 100755 --- a/indoteknik_custom/views/product_template.xml +++ b/indoteknik_custom/views/product_template.xml @@ -78,7 +78,7 @@ - + @@ -113,8 +113,8 @@ - - + + -- cgit v1.2.3 From 662ece47fb1e2c3ad814007b9bd2930dd1261d79 Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Thu, 15 Jan 2026 16:24:26 +0700 Subject: fix --- indoteknik_custom/models/solr/apache_solr.py | 6 +++--- indoteknik_custom/models/solr/product_product.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py index 21fb15d2..4d6f8db2 100644 --- a/indoteknik_custom/models/solr/apache_solr.py +++ b/indoteknik_custom/models/solr/apache_solr.py @@ -270,9 +270,9 @@ class ApacheSolr(models.Model): 'tax_f': tax, 'stock_total_f': variant.qty_stock_vendor, 'weight_f': variant.product_tmpl_id.weight, - 'has_magento_b': variant.has_magento, - 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, - 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', + # 'has_magento_b': variant.has_magento, + # 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, + # 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', 'manufacture_id_i': variant.product_tmpl_id.x_manufacture.id or 0, 'manufacture_name_s': variant.product_tmpl_id.x_manufacture.x_name or '', 'manufacture_name': variant.product_tmpl_id.x_manufacture.x_name or '', diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py index a90bcb98..529aabbb 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -74,9 +74,9 @@ class ProductProduct(models.Model): 'image_mobile_s': ir_attachment.api_image('product.template', 'image_256', variant.product_tmpl_id.id), 'stock_total_f': variant.qty_free_bandengan, 'weight_f': variant.weight, - 'has_magento_b': variant.has_magento, - 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, - 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', + # 'has_magento_b': variant.has_magento, + # 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, + # 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', 'manufacture_id_i': variant.product_tmpl_id.x_manufacture.id or 0, 'manufacture_name_s': variant.product_tmpl_id.x_manufacture.x_name or '', 'manufacture_name': variant.product_tmpl_id.x_manufacture.x_name or '', -- cgit v1.2.3 From 4e28776562e9916556a920a6b42ec61f93a2a15f Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Thu, 15 Jan 2026 16:38:24 +0700 Subject: fix --- indoteknik_custom/views/product_template.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/views/product_template.xml b/indoteknik_custom/views/product_template.xml index 06741859..3643c25f 100755 --- a/indoteknik_custom/views/product_template.xml +++ b/indoteknik_custom/views/product_template.xml @@ -129,7 +129,7 @@ - + -- cgit v1.2.3 From a571ac15c0cf643542acaf7051ccc8db6976c9d6 Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Thu, 15 Jan 2026 19:31:43 +0700 Subject: field has magento & attribute set --- indoteknik_custom/models/product_template.py | 21 +++++++++++---------- indoteknik_custom/views/product_template.xml | 8 ++++---- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 4ff2dffa..2c798f43 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -15,15 +15,16 @@ _logger = logging.getLogger(__name__) class ProductTemplate(models.Model): _inherit = "product.template" - # x_attribute_set_id = fields.Integer( - # string="Magento Attribute Set ID", - # default=0, - # help="Attribute Set ID dari Magento" - # ) - # x_attribute_set_name = fields.Char( - # string="Magento Attribute Set Name", - # help="Attribute Set Name dari Magento" - # ) + x_attribute_set_id = fields.Integer( + string="Magento Attribute Set ID", + 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", + readonly=True + ) image_carousel_lines = fields.One2many( comodel_name="image.carousel", @@ -938,7 +939,7 @@ 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, readonly=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', []) diff --git a/indoteknik_custom/views/product_template.xml b/indoteknik_custom/views/product_template.xml index 3643c25f..9fbf007a 100755 --- a/indoteknik_custom/views/product_template.xml +++ b/indoteknik_custom/views/product_template.xml @@ -78,7 +78,7 @@ - + @@ -113,8 +113,8 @@ - - + + @@ -129,7 +129,7 @@ - + -- cgit v1.2.3 From fe4923c5a9b6b7bff15ee47113849be57e620c15 Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Thu, 15 Jan 2026 19:41:04 +0700 Subject: add field magento & attribute set to solr --- indoteknik_custom/models/solr/apache_solr.py | 6 +++--- indoteknik_custom/models/solr/product_product.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py index 4d6f8db2..21fb15d2 100644 --- a/indoteknik_custom/models/solr/apache_solr.py +++ b/indoteknik_custom/models/solr/apache_solr.py @@ -270,9 +270,9 @@ class ApacheSolr(models.Model): 'tax_f': tax, 'stock_total_f': variant.qty_stock_vendor, 'weight_f': variant.product_tmpl_id.weight, - # 'has_magento_b': variant.has_magento, - # 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, - # 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', + 'has_magento_b': variant.has_magento, + 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, + 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', 'manufacture_id_i': variant.product_tmpl_id.x_manufacture.id or 0, 'manufacture_name_s': variant.product_tmpl_id.x_manufacture.x_name or '', 'manufacture_name': variant.product_tmpl_id.x_manufacture.x_name or '', diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py index 529aabbb..a90bcb98 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -74,9 +74,9 @@ class ProductProduct(models.Model): 'image_mobile_s': ir_attachment.api_image('product.template', 'image_256', variant.product_tmpl_id.id), 'stock_total_f': variant.qty_free_bandengan, 'weight_f': variant.weight, - # 'has_magento_b': variant.has_magento, - # 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, - # 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', + 'has_magento_b': variant.has_magento, + 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, + 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', 'manufacture_id_i': variant.product_tmpl_id.x_manufacture.id or 0, 'manufacture_name_s': variant.product_tmpl_id.x_manufacture.x_name or '', 'manufacture_name': variant.product_tmpl_id.x_manufacture.x_name or '', -- cgit v1.2.3