summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-11-02 11:30:35 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-11-02 11:30:35 +0700
commitbf99a04f7c5530da790e25e67b9786ec0dffeb9b (patch)
tree1c360b42b7f4f62b94332f976d69bfbf492ad459
parent4b77d80172abc5576f495d444dddd078b752efb5 (diff)
Update product_template.py
-rwxr-xr-xindoteknik_custom/models/product_template.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index 2ce577ce..33073e57 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -35,7 +35,7 @@ class ProductTemplate(models.Model):
solr_flag = fields.Integer(string='Solr Flag', default=0)
def write(self, vals):
- if 'solr_flag' in vals:
+ if 'solr_flag' not in vals:
vals['solr_flag'] = 2
return super().write(vals)
@@ -151,7 +151,7 @@ class ProductProduct(models.Model):
solr_flag = fields.Integer(string='Solr Flag', default=0)
def write(self, vals):
- if 'solr_flag' in vals:
+ if 'solr_flag' not in vals:
self.product_tmpl_id.solr_flag = 2
vals['solr_flag'] = 2
return super().write(vals)