Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
5893 Переглядів

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

Аватар
Відмінити
Автор

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

Найкраща відповідь

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'})]
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
бер. 24
2570
1
вер. 22
2319
2
бер. 21
9755
3
вер. 17
7670
0
трав. 25
3057