diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-02-25 14:01:15 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-02-25 14:01:15 +0700 |
| commit | 6a5a2a2666c33ffafd610df882491d86918468bb (patch) | |
| tree | b61d4672169aa78a0bee9aae319af68768a2b6ee /indoteknik_custom/models/solr | |
| parent | 141bfb3a32e73d5b8557a70867d957d5ed3d485b (diff) | |
| parent | a24d7b2a21ff24e31eef77e2032a861b7eb13e31 (diff) | |
Merge branch 'odoo-production' into CR/renca-commision
# Conflicts:
# indoteknik_custom/models/commision.py
# indoteknik_custom/views/customer_commision.xml
Diffstat (limited to 'indoteknik_custom/models/solr')
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 87e8370f..8afff6e3 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -76,8 +76,11 @@ class ProductTemplate(models.Model): ('product_id', 'in', template.product_variant_ids.ids), ('location_id', 'in', target_locations), ]) - - is_in_bu = any(quant.available_quantity > 0 for quant in stock_quant) + is_in_bu = False + for quant in stock_quant: + if quant.product_id.qty_free_bandengan > 0: + is_in_bu = True + break cleaned_desc = BeautifulSoup(template.website_description or '', "html.parser").get_text() website_description = template.website_description if cleaned_desc else '' |
