hello guys i have an issue about record in many2many fields, when on edit mode the record that i selected is appear but when i save it's not visible, when i check the database it stored.. anyone can help me? im using odoo 13
here are my code:
```
def onchange_postal_code_id(self):
query = """
select
village_id
from
res_area_villages_rel """
self._cr_read.execute(query)
villages = self._cr_read.fetchall()
villages = [i[0]for i in villages]
return [('id', 'not in', villages)]
postal_code = fields.Many2many('villages','res_area_villages_rel',
'area_id','village_id',
string='Postal Code',
track_visibility='onchange',
domain=onchange_postal_code_id,
required=True
)
<notebook>
<page string="Postal Code">
<field name="postal_code"
context="{'postal_code': name}"
options="{'no_create': True}" attrs="{'invisible': [('boolean','=',False)]}">
<tree string="Postal Code">
<field name="postal_code"/>
<field name="name"/>
<field name="parent_code" string="Districts"/>
</tree>
</field>
</page>
</notebook>
```