I am trying to create sales order, confirm and create regular invoices. I managed to create
the sale order and confirm it but not able to create regular invoices.
Here's the example of my code:
s = models.execute_kw(db, uid, password, 'sale.order', 'create', [{
'partner_id': 1, 'validity_date': "2021-08-09", 'state': 'sale',
'order_line': [(0, 0, {'product_id': 2, 'product_uom_qty': 2, 'price_unit': 10.00}),
(0, 0, {'product_id': 5, 'product_uom_qty': 4, 'price_unit': 20.00}),
],}])models.execute_kw(db, uid, password, 'sale.advance.payment.inv', 'create', {
'id': s,
'create_invoices': [{'advance_payment_method': "delivered",}]
})
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
3846
查看
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
5月 21
|
2810 | ||
|
1
4月 24
|
1589 | ||
|
3
10月 23
|
7902 | ||
|
1
10月 22
|
4007 | ||
|
1
9月 21
|
3186 |