Previously, the company received a project, one of the functional requirements in the selection of suppliers, the product in the schedule is after the supplier as a filter, and after the selected products, I think after the implementation code is:
<field name= "Product_ids" domain= "[(' seller_ids.name ', ' = ', partner_id)] ' context= ' {' partner_id ':p artner_id} '/ >
Among them, the main is through the "domain" of its own properties or functions, to achieve product filtering.
' Seller_ids.name ', the main product table in which the Supplier attribute corresponds to the supplier's name, "partner_id", is mainly the current purchase order in the vendor's field.
' partner_id ':p artner_id, it is mainly for (' seller_ids.name ', ' = ', partner_id), the "partner_id" in the value, if not added in the context of the value, then the program will be reported "partner _ID is not find ", this error.
This article is from the "Time Traveler" blog, so be sure to keep this source http://siweilai.blog.51cto.com/9233507/1710439
About Odoo Select a supplier to implement product filtering capabilities