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 am trying to implement a custom search method on a field using the following code. However search method (word_search) is never being called(using Advanced Search). I tried to go through the new api docs and have tried to model the method in a similar way. Not sure what is going wrong here.
_name = "myclass"
myfield = fields.Char(string='Word', size=100, required=True)
def word_search(self, operator, operand):
_logger.info("search function called %s" % operand)
domain = [('id', 'in', ids)]
return domain # e.g. [('id', 'in', ids)]
searchfield = fields.Text(compute = "anothermethod", store='False', string="Match Expression", search='word_search')
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: 11/24/14, 12:01 PM|
|Seen: 1294 times|
|Last updated: 3/16/15, 8:10 AM|