summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/website_user_cart.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-11-12 11:29:07 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-11-12 11:29:07 +0700
commit16cb40e0a943af1679fca60ff8cc4e6a683bd883 (patch)
tree4240f8d05a5cd9bb1261a99c4c5ce6904c58cdd7 /indoteknik_custom/models/website_user_cart.py
parent1f42c0b0adf937e238e68fc2f7307234fff51952 (diff)
parentd9d9159e43aaabcc88661d0f23d362ed2e0128f6 (diff)
Merge branch 'production' into feature/max_plafon_order_qty
# Conflicts: # indoteknik_custom/security/ir.model.access.csv
Diffstat (limited to 'indoteknik_custom/models/website_user_cart.py')
-rw-r--r--indoteknik_custom/models/website_user_cart.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/website_user_cart.py b/indoteknik_custom/models/website_user_cart.py
index 6cb282f8..494f32f3 100644
--- a/indoteknik_custom/models/website_user_cart.py
+++ b/indoteknik_custom/models/website_user_cart.py
@@ -65,9 +65,11 @@ class WebsiteUserCart(models.Model):
if stock_quant:
res['is_in_bu'] = True
res['on_hand_qty'] = sum(stock_quant.mapped('quantity'))
+ res['available_quantity'] = stock_quant.available_quantity
else:
res['is_in_bu'] = False
res['on_hand_qty'] = 0
+ res['available_quantity'] = 0
flashsales = self.product_id._get_active_flash_sale()
res['has_flashsale'] = True if len(flashsales) > 0 else False