Odoo Help

Welcome!

This community 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.

1

fnct and fnct_search any idea ?

By
Ajeng Shilvie
on 12/30/14, 1:12 AM 533 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

 

1
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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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