コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4111 ビュー

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 ...

アバター
破棄
関連投稿 返信 ビュー 活動
1
2月 17
3227
2
1月 17
7065
0
4月 24
1622
1
9月 22
2257
0
8月 21
3959