summaryrefslogtreecommitdiff
path: root/fixco_api
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-05-31 15:14:05 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-05-31 15:14:05 +0700
commita91a0009ffd03e99b91c4cb441a867552b042d14 (patch)
tree54b8e58464c5d21cdffb57d5da2a4a0c305de6c4 /fixco_api
parent322bdf115ff1c47d242739f09424f759c7aabe7f (diff)
combine create and complete sale order
Diffstat (limited to 'fixco_api')
-rw-r--r--fixco_api/controllers/api_v1/sale.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/fixco_api/controllers/api_v1/sale.py b/fixco_api/controllers/api_v1/sale.py
index 7649407..2741897 100644
--- a/fixco_api/controllers/api_v1/sale.py
+++ b/fixco_api/controllers/api_v1/sale.py
@@ -145,6 +145,7 @@ class Sales(controller.Controller):
'price_unit': discount
}]
request.env['sale.order.line'].create(param_line)
+ sale_order.action_confirm()
return {
'status': 'success', 'message': sale_order.name
}