In orderline we can search the products based on name, internal reference and barcode
.I am trying to add one extra field.
Firstly I created a portno field in product template for search
port_no_1 = fields.Char(string="Port No")
in my custom module I override the function
def name_search(self, name='', args=None, operator='ilike', limit=100):
res = super(ProductProduct, self).name_search(name='', args=None, operator='ilike', limit=100)
ids = self.search(args + [('port_no_1', '=', name)], limit=limit)
return res
but it will not helps search based port no
How to add this feature in my custom module ?
When should you use name_search method: https://goo.gl/7PHhPP