From a9f2bd56c9177d7c86abd92004f826a764a8d420 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 22 Aug 2024 09:48:15 +0700 Subject: delete field on hand quantity solr --- indoteknik_custom/models/solr/product_template.py | 1 - 1 file changed, 1 deletion(-) diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 44e609d4..6526bbfd 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -110,7 +110,6 @@ class ProductTemplate(models.Model): 'tkdn_b': template.unpublished, "qty_sold_f": template.qty_sold, "is_in_bu_b": is_in_bu, - "on_hand_qty_i": on_hand_qty, "voucher_min_purchase_f" : voucher.min_purchase_amount or 0, "voucher_discount_type_s" : voucher.discount_type or '', "voucher_discount_amount_f" : voucher.discount_amount or 0, -- cgit v1.2.3 From 3571ed7485b848e9ebfa1800392ceeaf34655bb9 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 22 Aug 2024 09:49:37 +0700 Subject: delete on hand quantity --- indoteknik_custom/models/solr/product_template.py | 1 - 1 file changed, 1 deletion(-) diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 6526bbfd..970219c7 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -77,7 +77,6 @@ class ProductTemplate(models.Model): ]) is_in_bu = bool(stock_quant) - on_hand_qty = sum(stock_quant.mapped('quantity')) if stock_quant else 0 document = solr_model.get_doc('product', template.id) document.update({ -- cgit v1.2.3