Skip to Content
Menu
This question has been flagged
1 Atsakyti
5959 Rodiniai

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

Portretas
Atmesti
Autorius

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

Best Answer

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'})]
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
kov. 24
2609
1
rugs. 22
2390
2
kov. 21
9830
3
rugs. 17
7731
0
geg. 25
3098