I have a m2m field in my custom module, in the py file i have these:
product = fields.Many2many('stock.quant', string="Product")
in the xml:
<notebook>
<page string="Product">
<field name="product" options="{'no_open':True, 'no_quick_create': True, 'no_create_edit': True, 'no_create': True}" domain="[('lot_id','!=', context.get('lot_id', False)), ('state', '=', 'buffer')]">
<tree open="false" editable="bottom">
<field name="product_id"/>
<field name="lot_id"/>
<field name="state" />
</tree>
</field>
</page>
</notebook>
It works fine when i add an item but when I started editing the state column of the m2m to active, after clicking the Save button, the item disappears in the form. I have a screenshot below:
1st
https://pasteboard.co/GL3pDg2.png
2nd
https://pasteboard.co/GL3pMHs.png
3rd (the item disappeared after saving)
https://pasteboard.co/GL3pTKJ.png