when it comes to working with domains, I often get the error, `Invalid leaf in expression` I still dont get what are leafs in odoo, can anyone explain it please,
Thank's in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
when it comes to working with domains, I often get the error, `Invalid leaf in expression` I still dont get what are leafs in odoo, can anyone explain it please,
Thank's in advance
@Niyas Raphy
Yes, that's kinda obvious, My question was what exactly do they mean by leaf in domains, is it the operator, the model filed or the syntax ?
well here is the answere from odoo code a methode that checks if a leaf is a leaf, the documentation is kinda good for for this function,
def is_leaf(element, internal=False):
""" Test whether an object is a valid domain term:
- is a list or tuple
- with 3 elements
- second element if a valid op
:param tuple element: a leaf in form (left, operator, right)
:param boolean internal: allow or not the 'inselect' internal operator
in the term. This should be always left to False.
Nice to see it, upvote (y)
Hi,
If there is some mistakes with the domain given you will get such message. Make sure that the domain is given properly.
Thanks