Filter on filed function

Asked by filsys

I want a filter domain for a functin filed (qty_available<0 in product.product). How can I make this in GTK client form and also in web?
I asked this question in GTK, but I think that addons is more adequated.
Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Ferdinand
Solved:
Last query:
Last reply:
Revision history for this message
Best Ferdinand (office-chricar) said :
#1

AFAIK not implemented

Revision history for this message
filsys (office-filsystem) said :
#2

Thanks.
This answer don't solve my problem, but answer my question.

Revision history for this message
Husen Daudi (husendaudi) said :
#3

You can add search domains by implementing fnct_search method on function field.
check examples in other modules of addons.

Revision history for this message
Ferdinand (office-chricar) said :
#4

well you and we know that's not a general solution because in the long run OpenERP must be able to filter every field out of the box.

Revision history for this message
Husen Daudi (husendaudi) said :
#5

Yes its not generic but fulfill the requirement.
another way is to use related type field which is similar to function field if we have dependency on object to fetch field directly.
fields.related have inbuilt fnct_search implemented too.