Help

0

Odoov13 How to set vendor for a product using ORM

I get product.product object using search method. Now I want to set a vendor (from res.partner data) for this product using orm. how can I achieve?

Avatar
Discard
1 Answer
3
Avatar
Akshay Babu
Best Answer

Hi

lets say the product.product object that you got be product_obj

Now to set vendors you have to write the seller_id field

eg: product_obj.write({'seller_ids': [(0, 0, [Vendor details])]})


Regards
1 Comment
Avatar
Discard

thanks a lot.