diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-10-03 03:05:15 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-10-03 03:05:15 +0000 |
| commit | 5d3accd9e7f1321ef93cf4a8ce8b8f472143a72f (patch) | |
| tree | a9ab41840897167ea0d45194ca59e4326af1eec9 /indoteknik_custom/models/solr/product_template.py | |
| parent | 16ddcb43b85c1deeda29bf6bb5db4ef73b8d20d2 (diff) | |
| parent | 799c216979fb4216422c2a584a763b286713b8d2 (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.py | 3 |
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) |
