diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2025-02-24 11:32:06 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2025-02-24 11:32:06 +0700 |
| commit | 7df979b8d5312bb90d13d338f2a787dc35373f17 (patch) | |
| tree | 12a5fd7b487781b52900505a2cffa999da692f9f /indoteknik_custom/models/solr | |
| parent | a9c4cd0c5ac694074f0e3a4359182a97f27f542e (diff) | |
| parent | 38f8ddd9aaaad58c8d7ea27235cd109ba288693d (diff) | |
Merge branch 'odoo-production' into feature/integrasi_biteship
# Conflicts:
# indoteknik_custom/models/__init__.py
# indoteknik_custom/models/product_template.py
# indoteknik_custom/models/sale_order.py
# indoteknik_custom/security/ir.model.access.csv
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 '' |
