summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1/sale_order.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-29 10:05:58 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-29 10:05:58 +0700
commit8906f678c23090d70d16191dc1fe76e518e8e9d9 (patch)
treea98cb41a39064f692d764338177b84fd14bed82a /indoteknik_api/controllers/api_v1/sale_order.py
parentd0bd4a82c923789a931f9433085f4219c6d7346a (diff)
parent0080b6b1da5f181cee32fae7bb5166ce65165374 (diff)
Merge branch 'production' into CR/quotation-noPo
# Conflicts: # indoteknik_custom/models/user_company_request.py
Diffstat (limited to 'indoteknik_api/controllers/api_v1/sale_order.py')
-rw-r--r--indoteknik_api/controllers/api_v1/sale_order.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/sale_order.py b/indoteknik_api/controllers/api_v1/sale_order.py
index 99ba2573..8b95ade8 100644
--- a/indoteknik_api/controllers/api_v1/sale_order.py
+++ b/indoteknik_api/controllers/api_v1/sale_order.py
@@ -450,7 +450,8 @@ class SaleOrder(controller.Controller):
'company_id': 1,
'order_id': sale_order.id,
'product_id': cart['id'],
- 'product_uom_qty': cart['quantity']
+ 'product_uom_qty': cart['quantity'],
+ 'product_available_quantity': cart['available_quantity']
})
order_line.product_id_change()
order_line.onchange_vendor_id()
@@ -467,6 +468,7 @@ class SaleOrder(controller.Controller):
if len(promotions) > 0:
sale_order.apply_promotion_program()
+ sale_order.add_free_product(promotions)
voucher_code = params['value']['voucher']
voucher = request.env['voucher'].search([('code', '=', voucher_code),('apply_type', 'in', ['all', 'brand'])], limit=1)