Hi everybody,
I have many2one partner_id and one2many recommendation_ids fields in my form view. I need to return old partner_id value if there are some records in recommendation_ids field.
*.xml
<field name="partner_id" on_change="onchange_partner_id(partner_id, recommendation_ids)"/>
...
<field name="recommendation_ids" />
*.py
def onchange_partner_id(self, cr, uid, ids, partner_id, recommendation_ids, context=None):
return {'value': old_partner_id}
Thanks