Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5945 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Câu trả lời hay nhất

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'})]
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 24
2602
1
thg 9 22
2379
2
thg 3 21
9819
3
thg 9 17
7720
0
thg 5 25
3095