Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
5887 Vues

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

Avatar
Ignorer
Auteur

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

Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
mars 24
2567
1
sept. 22
2309
2
mars 21
9749
3
sept. 17
7660
0
mai 25
3052