summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/solr/product_template.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-10-03 10:04:18 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-10-03 10:04:18 +0700
commit799c216979fb4216422c2a584a763b286713b8d2 (patch)
treea9ab41840897167ea0d45194ca59e4326af1eec9 /indoteknik_custom/models/solr/product_template.py
parent16ddcb43b85c1deeda29bf6bb5db4ef73b8d20d2 (diff)
<iman> add is in bu ke variant product solr
Diffstat (limited to 'indoteknik_custom/models/solr/product_template.py')
-rw-r--r--indoteknik_custom/models/solr/product_template.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py
index 1eb6f31b..70246ba3 100644
--- a/indoteknik_custom/models/solr/product_template.py
+++ b/indoteknik_custom/models/solr/product_template.py
@@ -74,7 +74,8 @@ class ProductTemplate(models.Model):
target_locations = [57, 83]
stock_quant = self.env['stock.quant'].search([
('product_id', 'in', template.product_variant_ids.ids),
- ('location_id', 'in', target_locations)
+ ('location_id', 'in', target_locations),
+ ('quantity', '>', 0)
])
is_in_bu = bool(stock_quant)