This question has been flagged
1 Reply
5567 Views

Hello, I am developing a module in Odoo 8 and I have a question.

I have 'sale.order' class, with a 'pricelist_item_id' field, which is a Many2one relationship with 'product.pricelist.item' field.

In 'product.pricelist.item' I have a field, 'pays', which is a Many2one field.

I want to define a domain in 'pricelist_item_id' field which allows only 'pricelist.items" which have the 'pays' field with length of 1 or more. I don't found the operador "len" in domains... how can I do this?

Thanks!

Avatar
Discard
Best Answer

Hi. I think you mean that the field pays is a one2many field, don't you? You want to test if pays is not empty for that pricelist item? If so then you can use ('pays','!=',False)

Avatar
Discard