Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6827 Zobrazení

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

Avatar
Zrušit
Autor

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

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
říj 25
3112
1
bře 24
3331
2
bře 21
10446
3
zář 17
8314
2
říj 25
16449