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

I have create a model in which I have created a Many2One product id. It shows product name along with variant which is fine. However, when I try to import the Product with variant say, Product_A (variant) it gives error stating that it does not exist.

Here is the model definition:

class CarManufacturing(models.Model):

 _name = 'car.manufacturing'
product_id = fields.Many2one("product.product", string='Product',required=True)
product_to_dispatch = fields.Integer('Products to Dispatch',required=True)
dispatch_date = fields.Date('Dispatch Date', copy=False, default=fields.Date.today(), index=True, required=True)


How do I import associate product along with variant via CSV/Excel file?

الصورة الرمزية
إهمال

Hi,

Are the products with variants already added into the system and you need to link them to your new module.

الكاتب

Yes .they are already in the system. I need to link them

Did you use the id or the name? It's better to export the products variant to excel and use the exported id in your csv.

You will go to inventory -> master data -> product variant and select the product and then from action select export and export the required field which help you to map it to your csv and use the exported id.

الكاتب

I will try that and get back to you

المنشورات ذات الصلة الردود أدوات العرض النشاط
3
سبتمبر 19
4616
0
يوليو 19
2208
1
مارس 19
4161
4
أكتوبر 22
4855
3
يوليو 19
2393