I have a form field with domain where jsonModel equals a constant. I need to add a condition based on another field in the same form.
Currently I have
<field name="$attrs.sales" title=“Sales” x-type= “many-to-one” domain="self.jsonModel=‘Person’ and self.attrs.Person.name = value_from_another_field />
That won’t work as it’s not a valid query param. You can only use direct field names. However, for custom fields are exception, you can refer them directly. Also, you have to use json_extract function (this is undocumented at the moment).
self.jsonModel=‘Person’ and json_extract(self.attrs, 'Person', 'name') = :first