Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
5905 Visualizações

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

Avatar
Cancelar
Autor

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

Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
mar. 24
2579
1
set. 22
2341
2
mar. 21
9768
3
set. 17
7682
0
mai. 25
3063