diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-13 16:13:18 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-13 16:13:18 +0700 |
| commit | ee8f00646d8a1d6faa1d91c82e9c3778cc8e41f8 (patch) | |
| tree | 926f1a022fd5ca18ac23f53b32abcd370f0bf5c1 /indoteknik_api/controllers/api_v1/sale_order.py | |
| parent | be2bc04768f9f423c66a612f4f183d20e70a3145 (diff) | |
| parent | e7a18de25926714222159cd9b9281b2fab62063b (diff) | |
Merge branch 'production' into iman/pengajuan-tempo
# Conflicts:
# indoteknik_custom/__manifest__.py
# indoteknik_custom/models/__init__.py
# indoteknik_custom/security/ir.model.access.csv
Diffstat (limited to 'indoteknik_api/controllers/api_v1/sale_order.py')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/sale_order.py | 4 |
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 e7664c79..3e182a2e 100644 --- a/indoteknik_api/controllers/api_v1/sale_order.py +++ b/indoteknik_api/controllers/api_v1/sale_order.py @@ -446,7 +446,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() @@ -463,6 +464,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) |
