Working on Windows.
I am trying to search reference/default_code of products from the sale order line without considering the case but only searching the beginning of each reference. similar to searching LIKE 's%' in sql. At the moment OpenERP search LIKE '%s%' is it possible to have a code that ---
get product_id in product.product
for default_code (that is reference) like ? (search+'%',)
I want to apply this to sales order line for getting the products. Please anyone help. thanks Also I should say all products have unique reference (default_code) and we only search by these. So I would be glad if anyone could suggest how I can make the search look in the reference only rather than both reference and product name. Thank you in advance. python code:
def onchange_case(self, cr, uid, ids, default_code):
result = {'value': {
'default_code': str(default_code).upper()
}
}
return result
xml code:
<field name="default_code" on_change="onchange_case(default_code)"/>