Odoo Help


Domain is ignored!

on 1/7/15, 3:24 PM 970 views

Hello, I have Odoo8.

I have this field in model 'product.pricelist.version'

pagos_realizados = fields.Many2many('account.voucher', 'pagos_vouchers', 'id_pago', 'id_voucher', string='Pagos realizados', domain=[('es_acopio', '=', True), ('partner_id.customer', '=', True), ('fue_usado', '=', False)])

And this field in 'account.voucher' model

pricelist_version = fields.Many2many('product.pricelist.version', 'pagos_vouchers', 'id_voucher', 'id_pago')

The field 'fue_usado' is a field of model account.voucher, which is a computed field, is false if the voucher is related to any pricelist; in other cases is true.

I can check by a view that the 'fue_usado' field is FALSE in various vouchers, but the domain not filters it. The domains works correctly with the two first rules, but ignores the third. Why? Thanks!



On 1/7/15, 3:51 PM

I found the solution. I have to add store=True in the computed field definition, then the domain works.

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: 1/7/15, 3:24 PM
Seen: 970 times
Last updated: 3/16/15, 8:10 AM