Odoo Help

0

0
2 Answers
0
marocsys
2019/03/06 7:58
Hi,
You should add   store=True 

compute_invoice = fields.Char('Current Odoo order Status',  compute='method_compute_invoice',store=True)

and you should add your computed field to the tree view (even invisibble) like:

<field name="compute_invoice" invisible="1" />

and than you can use it in your domain inside the tree

0
Avatar

Niyas Raphy

--Niyas Raphy--
24539
| 7 7 11
Wayanad, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123

Happy to help :)

Niyas Raphy
2017/08/16 22:37

Hi,

For using computed field in the domain you have to give  store=True for the field . If you didn't give store=True, you cannot use the field for giving in the domain.

For more info you can check this link , https://www.odoo.com/forum/help-1/question/how-can-i-use-a-field-function-in-the-domain-filter-137

Eg:-

amount_total = fields.Monetary(compute=_amount_all, string='Total', store=True)

Thanks


Ask a Question
Writer
Keep Informed
1 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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now