diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-29 10:05:58 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-29 10:05:58 +0700 |
| commit | 8906f678c23090d70d16191dc1fe76e518e8e9d9 (patch) | |
| tree | a98cb41a39064f692d764338177b84fd14bed82a /indoteknik_custom/models/website_user_cart.py | |
| parent | d0bd4a82c923789a931f9433085f4219c6d7346a (diff) | |
| parent | 0080b6b1da5f181cee32fae7bb5166ce65165374 (diff) | |
Merge branch 'production' into CR/quotation-noPo
# Conflicts:
# indoteknik_custom/models/user_company_request.py
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 6cb282f8..44393cf1 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'] = sum(stock_quant.mapped('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 |
