On 10/06/11 04:51 -0700, oscar_andres_col wrote:
> I am working in a stock new module that extend "Locations", adding
> new field "Stock Days", and the fields works fine. But when I try in
> View Tree of Locations to search records with parameter "Stock Days" I
> see this message: "Missing search function on field 'Stock Days'",
> and I don't get results. So I don't know what to do..
>
> My code is:
>
> class Template(ModelSQL, ModelView):
> _name = 'product.template'
>
> stock_days = fields.Function(fields.Integer('Stock Days',
> select=1),
> 'get_stock_days')
You must define a searcher on Function field if you want to be able to search:
http://doc.tryton.org/2.0/trytond/doc/ref/models/fields.html#trytond.model.fields.Function.searcher
--
Cédric Krier
B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/
pgpHOEYgxP1pQ.pgp
Description: PGP signature
