Skip to Content
Menu
This question has been flagged
1 Reply
814 Views

how to  automatically confirm sale quotation in odoo from python code??

I used the below code for creating the sale order

models.execute_kw(db, uid, password, 'sale.order', 'create', [{
'partner_id': 10,
'order_line': [(0, 0, {'product_id': 1, 'product_uom_qty': 2}),
(0, 0, {'product_id': 2, 'product_uom_qty': 4}),
(0, 0, {'product_id': 3, 'product_uom_qty': 6})
]
}])

Avatar
Discard
Best Answer

Hello Anyayuu

Get newly created sale order and execute action_confirm method it will confirm your order.

Avatar
Discard

marked as best answer if it worked