Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6856 Vistas

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!

Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
2
oct 25
3143
1
mar 24
3378
2
mar 21
10466
3
sept 17
8364
2
oct 25
16576