← Back to team overview

openerp-community team mailing list archive

Re: How to implement a custom search function?

 

Hi,

  I suggest implementing a custom name_search() method for the
project.issue model.
  This method runs the logic for looking up records, and you can change
that to also llok into other fields.

  Have a look at product/product.py.
  There you find a name_search() example performing a lookup on 3 fields:
"default_code", "ean13" and "name".

  On the other hand, probably you could get what you need just by using
the "base_util_refcodes", at https://launchpad.net/reis-openerp-addons:
  Just build a module similar to "project_refcodes", where you set the
"keys=[]" to the list of fields you want to lookup
(http://bazaar.launchpad.net/~dreis-pt/reis-openerp-addons/trunk/view/head:/project_refcodes/project.py).

Regards
   Daniel

Quoting "W. Martin Borgert" <debacle@xxxxxxxxxx>:
Hi,

  I like to implement a search function for the project issues.
  This function should search not only most fields of the project
  issues themselves, but also all logged notes and sent messages
  in this context.

  Can somebody send me a hint on how to start of look for further
  information?

  (I already did some module programming with Python and XML,
  access to the database, etc. so I'm not entirely a newbie.)

  Thanks in advance!



  _______________________________________________
  Mailing list: https://launchpad.net/~openerp-community
  Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
  Unsubscribe : https://launchpad.net/~openerp-communityMore help 
 : https://help.launchpad.net/ListHelp

References