I have one many2many functional field in product.pricelist.
revision_id = fields.Many2many(compute='_get_revision', comodel_name='product.pricelist', relation='product_pricelist_revision_rel', column1='pricelist_id', column2='parent_pricelist_id', string="Revision", store=True, readonly=True, copy=False)
This compute function returns the active and inactive records of pricelist.
I gave many2many field in tree view. So many2many field appears in tree view.
<xpath expr="//form/sheet/div/field[@name='item_ids']" position="after">
<notebook>
<page string="Revision">
<field name="revision_id">
<tree editable="bottom">
<field name="name" string="Revision Name" readonly="1"/>
<field name="version_no" string="Revision Version No" readonly="1"/>
</tree>
</field>
</page>
</notebook>
In this view, only active records are visible. I need to view active and inactive records of pricelist in many2many tree view in odoo 10.