About Odoo Select a supplier to implement product filtering capabilities

Source: Internet
Author: User

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/1772666

About Odoo Select a supplier to implement product filtering capabilities

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.