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.
I'm trying to create a filter on the 'complete_name' field of res_partner_category which is a function field.
I know that i have to use the fnct_search parameter and implement the function.
My problem is that i don't understand the purpose of this function and i don't know what to write in it !
Maybe someone could explain or give a generic example ?
you can see example in
def _search_group(self, cr, uid, obj, name, args, context=None): operand = args operator = args values = operand.split('/') group_name = values where = [('name', operator, group_name)] if len(values) > 1: application_name = values group_name = values where = ['|',('category_id.name', operator, application_name)] + where return where 'full_name': fields.function(_get_full_name, type='char', string='Group Name', fnct_search=_search_group),
Thanks for the answer.
I have already read the doc and found some examples in the source code. Despite this i don't understand what is the purpose of that function. Which values are in args (I know that is a list of 3-part tuples reprensanting domain) ? And in which way the returning domain will be used ?
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: 9/3/13, 5:57 AM|
|Seen: 4004 times|
|Last updated: 3/16/15, 8:10 AM|