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

I am using Odoo 11, and I am doing a script using xmlrpc in order to import products from a csv file. I want to add an existing attributes to my products. I used this example and it works adding the variants in products:

$existing_prodid = 59; $existing_attribute_id = 2; $existing_value_id = 4;
$product_attribute_line = $models->execute($db, $uid, $password,
                 'product.attribute.line','create',
                  array('product_tmpl_id' => $existing_prodid,
                  'attribute_id'=>$existing_attribute_id,
'value_ids'=>array(array(6,0,array($existing_value_id)))))

So, when you go to Inventory->Products->Variants, you can see that the attribute values were created correctly. But when you go to Inventory->Product Variants, you can only see the products and the value in the field attributes is empty. Also if you add 4 attributes when you go to "Product Variants" you can only see one row, if I create the variants directly in Odoo 4 rows, one for each attribute is added in "Product Variants".
Please help me how to solve this, adding attributes with xmlrpc.


الصورة الرمزية
إهمال
أفضل إجابة

Hi,

Have you found a good solution to this issue?

Regards,

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 18
3461
1
مارس 16
3392
2
مارس 15
10831
1
مارس 15
9039
3
يوليو 17
4806