I have create a new class using inherited by delegation of res.partner and created a new view for this class. I'm able to view my records in the new view, however when I try to create a child agent (child_ids is in res.partner) a view for res.partner is shown an a res.partner row is created with no custom.agent row. How can I force the view for a custom.agent?
Thanks Steve
class custom_agent(Model):
_inherits = {
'res.partner': 'partner_id',
}
_name = "custom.agent"
_columns = {
'commission_rate' : fields.float("Commission Rate"),
}
Stripped down view
<record id="view_custom_agent_form" model="ir.ui.view">
<field name="name">custom.agent.form</field>
<field name="model">custom.agent</field>
<field eval="1" name="priority"/>
<field name="arch" type="xml">
<form string="Agent" version="7.0">
<sheet>
<notebook colspan="4">
<page string="Contacts">
<field name="child_ids">
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>