تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5897 أدوات العرض

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'})]
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 24
2573
1
سبتمبر 22
2322
2
مارس 21
9758
3
سبتمبر 17
7671
0
مايو 25
3058