Hi
i have a custom module for the sale.order.form , what i need is to add the child.ids of the selected partner.id as drop down list.
at below what i write, so please check and feed me back if that right or not?
partner_id.child_ids = fields.Many2one('res.partner', string='Contact Person', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
domain=[('partner_id.child_ids', '=', False)])
in the view.xml
<data>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="partner_id.child_ids" domain="[('customer','=',True)]" context="{'search_default_customer':1}" options='{"always_reload": True}'/>
</xpath>
</data>
report_templates.xml
<span t-field="doc.partner_id.child_ids"/>
Try this domain : domain=lambda self: [('model_id', '=', self.parent_id.id)]