Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5890 Widoki

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

Awatar
Odrzuć
Autor

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

Najlepsza odpowiedź

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'})]
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 24
2568
1
wrz 22
2309
2
mar 21
9749
3
wrz 17
7661
0
maj 25
3052