Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Can anyone tell me the use of search attribute in field tag.
Sample from the documentation is below
<field name="partner_id" search="" model="res.partner"/>
Sample from the openerp code is below
<field name="fields_id" search="[('model','=','res.partner'),('name','=','property_account_receivable')]"/> # account/demo/account_minimal.xml <field model="res.country.state" name="state_id" search="[('code','ilike','ca')]"/> # base/res/res_partner_demo.xml <field name="account_debit" search="[('code', 'like', '4540%')]"/> # l10n_be_hr_payroll_account/l10n_be_hr_payroll_account_data.xml
Documentation Explanation is below
The search attribute allows to find the record to associate when you do not know its xml id. You can thus specify a search criteria to find the wanted record. The criteria is a list of tuples of the same form than for the predefined search method. If there are several results, an arbitrary one will be chosen (the first one)
I am having some prob in understanding how all the above works. Can anyone help me out how this needs to be used. Is it possible to give dynamic search values from the global filter. Thanks for your time.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/26/13, 7:51 AM|
|Seen: 2391 times|
|Last updated: 3/16/15, 8:10 AM|