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

I cannot create a new order line because I cannot generate the next sale.order.line order.id

อวตาร
ละทิ้ง
ผู้เขียน

Hi Ray, thank you very much for your answer. It is very clear!

คำตอบที่ดีที่สุด

Odoo autogenerates the ID of the sale.order.line once it is saved.You can do something like this: (Server Action code adds a note line to a purchase order, but the same technique works for Sales Orders)

for record in records:
  record['order_line'] = [(0, 0, {'name': 'Note: Downpayment requested', 'product_qty': 0, 'display_type': 'line_note'})]
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 24
2601
1
ก.ย. 22
2375
2
มี.ค. 21
9799
3
ก.ย. 17
7719
0
พ.ค. 25
3092