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

This is the code to add lines to an existing salesorder.
OrderId exists, article exists. I think everything is correct:

result = models.execute_kw(db, uid, password, 'sale.order', 'write', [[orderid], {'state' : 'draft', 'order_line': [(0, 0, {'product_template_id': product_id[0]["id"],
'name': dictionary["ArtikelId"] + '\n' + dictionary["Length"] + '\n' + dictionary["Incolor"] + '\n' + dictionary["Outcolor"] , 'product_uom': uom_id, 'product_uom_qty': dictionary["Quantity"] }) ]}])

But when I run the script I always get this error:
ERROR:

When I try to add the ine manually with this data it works, I get no error.

What am I missing here?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 24
4144
0
فبراير 24
525
0
أغسطس 24
1450
0
يوليو 21
2691
0
يونيو 21
4021