It is currently Mon May 21, 2012 7:10 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [SOLVEDmake possible search in the field product.description
PostPosted: Fri Jul 08, 2011 10:30 am 
Offline

Joined: Tue Jan 18, 2011 5:16 pm
Posts: 236
Hi,

For products.
I want to be able to search in the description field.
Currently we search in reference and in name.

Thanks,
Mihai

_________________
OpenERP debugging with Eclipse on headless server


Last edited by mihai on Thu Jul 14, 2011 9:08 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: make possible search in the field product.description
PostPosted: Fri Jul 08, 2011 11:12 am 
Offline

Joined: Wed Jan 27, 2010 6:21 pm
Posts: 797
Location: Auckland, NZ
The function to modify is name_search . I think it is already modified in product module, so you have a template to work from. It is pretty easy. I think product_variant_multi might do some mods to name_search for product.product as well for more examples.

_________________
Graeme


Top
 Profile  
 
 Post subject: Re: make possible search in the field product.description
PostPosted: Fri Jul 08, 2011 3:55 pm 
Offline

Joined: Tue Jan 18, 2011 5:16 pm
Posts: 236
YES.
Thanks
indeed I added this to name_search fucntion in the product.py

Code:
            if not len(ids):
                ids = self.search(cr, user, [('description','=',name)]+ args, limit=limit, context=context)


And if type the description inside a sales line, it will search for the product.

Thank you. It saved me a lot.

_________________
OpenERP debugging with Eclipse on headless server


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP