Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4066 มุมมอง

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
3186
2
ม.ค. 17
7016
0
เม.ย. 24
1600
1
ก.ย. 22
2235
0
ส.ค. 21
3912