Skip to Content
Menu
This question has been flagged

I've seen that whenever i create a new PO(Purchase Order), odoo will create a new product.supplierinfo related to my products.

But i can't find which function that let them do that.

Please help, thanks.

Avatar
Discard
Best Answer

When you confirm a PO the button_confirm method will be called and in this method there is another method called _add_supplier_to_product which loop all PO lines and add the supplier info to the product. 

You can check the method  _add_supplier_to_product  in purcahse.py file inside models folder of purchase app.

Avatar
Discard
Author

thanks you sir.

Author

You are totally correct sir. I've found how it save in line.product_id.write(vals) in _add_supplier_to_product() function, which line.product_id.seller_ids is linked to product.supplierinfo model.

Related Posts Replies Views Activity
1
May 24
249
0
Sep 15
2595
2
Mar 15
5306
1
Mar 15
3216
2
Mar 15
10451