diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-16 13:15:11 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-16 13:15:11 +0700 |
| commit | 4c2325d4a983ced3a25a9d53d7613a9186360b17 (patch) | |
| tree | 7aa784a880fa2dbc0fea5d2115c1e1550105f641 /indoteknik_custom/models/website_user_cart.py | |
| parent | 0e00a82659579fa0fdfe1f51687b3568cd62a955 (diff) | |
<iman> update ready stock picup quantity
Diffstat (limited to 'indoteknik_custom/models/website_user_cart.py')
| -rw-r--r-- | indoteknik_custom/models/website_user_cart.py | 2 |
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 26e217cb..9dadc40b 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 |
