Odoo Help

4

2
3 Answers
3
Avatar

Nicolas Bessi Switzerland

--Nicolas Bessi--

1640
| 5 7 10
Lausanne, Switzerland
--Nicolas Bessi--
Nicolas Bessi Switzerland
2/5/13, 10:32 AM

Hello,

You can implement fnct_search optional argument of your function field if you do not want to store it.

Then you will be able to search and filter on it.

1 Comment
Camptocamp SA Switzerland
2/5/13, 10:36 AM

This is also useful if there is a faster way to search than comparing all the values or if your search must behave in a particular way.

3
Avatar

Yannick Vaucher Switzerland

--Yannick Vaucher--

1789
| 5 7 11
Lausanne, Switzerland
--Yannick Vaucher--


Yannick Vaucher Switzerland
2/5/13, 10:10 AM

You can use a function field in domain and searches if you defined this field as store=True or store={triggers} in your model.

Remember that without setting triggers, your value will be recomputed only if the record itself is modified, if the formulas is related on value of on some relations, this has to be triggered by triggers.

Reference: store parameter in v6.1 doc (also valid for v7)

EDIT: more info based on Guewen's comment

1 Comment
Camptocamp SA, Guewen Baconnier Switzerland
2/5/13, 10:18 AM

A precision: the value must be stored in the database (vs. computed) to be searchable. So, store should be True or use more precise triggers.

0
namiri Morocco
10/9/14, 3:19 AM

hi Yug Faa

i have the same problem do you resolve it ?

regrads
 

Ask a Question
Writer
Keep Informed
2 follower(s)
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.

Register
Odoo Training Center

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

Test it now