Skip to Content
Menu
This question has been flagged
1 Odpoveď
6091 Zobrazenia

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

Avatar
Zrušiť
Autor

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'})]
Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
mar 24
2706
1
sep 22
2478
2
mar 21
9905
3
sep 17
7810
0
máj 25
3194