Odoo Help

0
2 Answers
0
marocsys
06-03-19 07: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--
15048
| 6 6 9
Calicut, 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
16-08-17 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


Stel een vraag
Writer
Keep Informed
1 volger(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