|

Searching a Computed Field in Odoo

As found by my friend and colleague James

name = fields.Char(compute="_compute_name", search="_search_sage_name")

def _search_sage_name(self, operator, value):
return ['|', ('code', operator, value), ('description', operator, value)]

Leave a Reply

Your email address will not be published. Required fields are marked *