I've added a new partner type:
type = fields.Selection(selection_add=[('service', 'Service address')])
I would like to hide this new partner type from the "Contacts & Addresses" one2Many on the res.partner form, using the following XML:
<xpath expr="//field[@name='child_ids']" position="attributes"><attribute name="domain">[('active', '=', True), ('type', '!=', 'service')]</attribute> </xpath>
In debug mode, I can see the domain has been updated on the form, but it is still showing all records here. I've even tried the domain [('id', '=', False)], but all records are still showing.
Anyone know what's going on here?
As Zbik helpfully pointed out below, domain can not be set through XML for a one2Many. How can I create two different one2Many fields in different views that show a different subset of the list items?
Use Context: https://goo.gl/XXg5D3