summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-09-25 10:08:00 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-09-25 10:08:00 +0700
commit8793cf3b8dea2c87024b4c9f49077cc8c6b982d8 (patch)
tree393d029409eb9d5be3df51f192f8140864460a37
parent6cfbf125b6154a2dc0fe3aec6f433b94584c91fe (diff)
cr stock_total_f
-rw-r--r--indoteknik_custom/models/solr/apache_solr.py6
-rw-r--r--indoteknik_custom/models/solr/product_product.py2
-rw-r--r--indoteknik_custom/models/solr/product_template.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py
index 6560c9b5..f6b29cd8 100644
--- a/indoteknik_custom/models/solr/apache_solr.py
+++ b/indoteknik_custom/models/solr/apache_solr.py
@@ -70,7 +70,7 @@ class ApacheSolr(models.Model):
stocks = self.env['stock.vendor'].search(query, limit=limit)
documents = []
for stock in stocks:
- stock_total = int(stock.product_variant_id.product_tmpl_id.qty_stock_vendor)
+ stock_total = int(stock.product_variant_id.product_tmpl_id.qty_available_bandengan)
# dict_stock = dict({"set": stock_total})
document = {
"id": int(stock.product_variant_id.product_tmpl_id.id),
@@ -178,7 +178,7 @@ class ApacheSolr(models.Model):
'price_discount_f': price_excl_after_disc,
'tax_f': tax,
'variant_total_i': template.product_variant_count,
- 'stock_total_f': template.qty_stock_vendor,
+ 'stock_total_f': template.qty_available_bandengan,
'weight_f': template.weight,
'manufacture_id_i': template.x_manufacture.id or 0,
'manufacture_name_s': template.x_manufacture.x_name or '',
@@ -264,7 +264,7 @@ class ApacheSolr(models.Model):
'discount_f': discount,
'price_discount_f': price_excl_after_disc,
'tax_f': tax,
- 'stock_total_f': variant.qty_stock_vendor,
+ 'stock_total_f': variant.qty_available_bandengan,
'weight_f': variant.product_tmpl_id.weight,
'manufacture_id_i': variant.product_tmpl_id.x_manufacture.id or 0,
'manufacture_name_s': variant.product_tmpl_id.x_manufacture.x_name or '',
diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py
index 35e3a4b3..6864041e 100644
--- a/indoteknik_custom/models/solr/product_product.py
+++ b/indoteknik_custom/models/solr/product_product.py
@@ -58,7 +58,7 @@ class ProductProduct(models.Model):
'product_id_i': variant.id,
'template_id_i': variant.product_tmpl_id.id,
'image_s': ir_attachment.api_image('product.template', 'image_512', variant.product_tmpl_id.id),
- 'stock_total_f': variant.qty_stock_vendor,
+ 'stock_total_f': variant.qty_available_bandengan,
'weight_f': variant.weight,
'manufacture_id_i': variant.product_tmpl_id.x_manufacture.id or 0,
'manufacture_name_s': variant.product_tmpl_id.x_manufacture.x_name or '',
diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py
index d8dec47c..9cb27c5b 100644
--- a/indoteknik_custom/models/solr/product_template.py
+++ b/indoteknik_custom/models/solr/product_template.py
@@ -92,7 +92,7 @@ class ProductTemplate(models.Model):
"product_id_i": template.id,
"image_s": self.env['ir.attachment'].api_image('product.template', 'image_512', template.id),
"variant_total_i": template.product_variant_count,
- "stock_total_f": template.qty_stock_vendor,
+ "stock_total_f": template.qty_available_bandengan,
"weight_f": template.weight,
"manufacture_id_i": template.x_manufacture.id or 0,
"manufacture_name_s": template.x_manufacture.x_name or '',