Skip to Content
Menú
This question has been flagged
1 Respondre
6303 Vistes

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

Avatar
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
1
de març 24
2892
1
de set. 22
2639
2
de març 21
10080
3
de set. 17
7977
3
de set. 25
14865