Odoo Help


fnct and fnct_search any idea ?

Ajeng Shilvie
on 12/30/14, 1:12 AM 882 views

anyone know how to put a method in domain act_window using functional field ? what's the different between fnct and fnct_search ? what should i put in both of them ?

i already read this documentation https://doc.odoo.com/v6.0/developer/2_5_Objects_Fields_Methods/field_type.html/ but still confused. Thanks in advance


Vince Vinet
On 1/2/15, 2:38 PM

fnct is the function to compute the value of the field. It returns a dictionary of {id: value} if multi=False or {id: {field: value}} if multi=True.


fnct_search is the function to get a search domain from a search query. The args parameter contains a search domain, which will normally contain something like [('your_field', '=', 'some_value')]. You are responsible for providing, as a result, a search domain for which that domain will be valid. A lot of search functions will simply return [('id', 'in', tuple(ids))], where ids are the ids of all the matching records.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/30/14, 1:12 AM
Seen: 882 times
Last updated: 3/16/15, 8:10 AM