Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
6643 Visualizzazioni

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

Avatar
Abbandona
Autore

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

Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mar 24
3175
1
set 22
2894
2
mar 21
10307
3
set 17
8201
3
set 25
15828