In domain queries I’ve been using model objects as operands instead of it’s id. (‘party’, ‘=’, a_party) vs (‘party’, ‘=’ a_party.id).
I was stuck for a while with a many2many where my domain query throw an error. I changed it to passed the id of the model as the operand and now it works.
May be I am doing something wrong on the m2m domain query.
Should I use instances of models, ids or both as operands?
Is there a reason to use models instead of ids, a part from the fact that I do not need to check if the model exists to get it’s id?