Using a domain in the Odoo color attribute

Is it possible to have a domain condition in the Odoo attribute colorsinstead of a single condition?

example: I want to have this state colors="blue:state=='approved'&&doc_type=='revisi'"

I noticed that we could fill in the hidden field of the function, which will depend on both fields, and use it in the attribute colors, but is there an easier way?

thank

+4
source share
1 answer

Yes, we can use several conditions for colors with andand or, for example:

colors="blue:state=='approved' and doc_type=='revisi' "

colors="blue:state=='approved' or doc_type=='revisi' "
+2
source

All Articles