Hi Gilbert,
Studio can drive you crazy!
You can't do it directly from the Studio UI, but you can add a fixed domain filter and then edit the Extension View XML.
For example, to limit the delivery address on the invoice to be the same as the customer.
In studio, select the Field and click on domain
Enter a domain with Related Company as the field and the right hand side set as any customer
Then edit the Extension View XML to select the partner_id field for filtering (rather than the single customer):
[("parent_id", "=", partner_id)]
The result is like this:
Note that because you are amending the Studio Extension View it should not get lost in any updates.
It is frustrating that Odoo not only doesn't allow you to enter this type of domain through the UI, it also flags it as invalid (which of course, it isn't).
I am having the same issue. I have a Customer Contact field in Contact form. If the Customer Contact is "Customer" then I want the next field Customer Category to only list certain values for Customer Contact and not Vendor Contacts. Any help on this would be great. I am having the same issue with the Domain.
I did go back and edit the XLM and added the correct domain. It worked perfect. There is bug in Odoo for sure on this!