summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/solr/product_template.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-10-03 03:05:15 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-10-03 03:05:15 +0000
commit5d3accd9e7f1321ef93cf4a8ce8b8f472143a72f (patch)
treea9ab41840897167ea0d45194ca59e4326af1eec9 /indoteknik_custom/models/solr/product_template.py
parent16ddcb43b85c1deeda29bf6bb5db4ef73b8d20d2 (diff)
parent799c216979fb4216422c2a584a763b286713b8d2 (diff)
Merged in iman/add-isInBu (pull request #236)
<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)