Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3717 Представления

I want to create sales order and automatically create an invoice after it. I managed to do the sale order part but not able to create invoice. (version 14 ). Can I please know what am missing or doing wrong

s = models.execute_kw(db, uid, password, 'sale.order', 'create', [{
'partner_id': 67, 'validity_date': "2020-02-24", 'state': 'sale',
'order_line': [(0, 0, {'product_id': 12, 'product_uom_qty': 4, 'price_unit': 100.00}),
(0, 0, {'product_id': 16, 'product_uom_qty': 4, 'price_unit': 90.00}),
],
}])

models.execute_kw(db, uid, password, 'sale.order', 'write', [[s], {
'invoice_status': 'invoiced',
}])


Аватар
Отменить
Лучший ответ

Did you found a solution? I'm struggling with the same problem ...

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
февр. 17
2893
2
янв. 17
6680
0
апр. 24
1374
1
сент. 22
1944
0
авг. 21
3673