Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4002 Lượt xem

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',
}])


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 17
3119
2
thg 1 17
6953
0
thg 4 24
1570
1
thg 9 22
2166
0
thg 8 21
3846