Odoo Help

Welcome!

This community 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.

0

Domain for filter list length

By
José
on 12/16/14, 2:46 PM 970 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!

1
Julian Solorzano
On 12/16/14, 6:18 PM

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)

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/16/14, 2:46 PM
Seen: 970 times
Last updated: 3/16/15, 8:10 AM