This question has been flagged
1 Reply
2037 Views

can anyone help to learn on_change function?

Avatar
Discard
Best Answer

in the view

<field name="date_of_death" on_change="onchange_deathdate(date_of_death)"/>

python file


def onchange_deathdate(self, cr, uid, ids, date_of_death=None, context=None):

res = {'value':{}}

// any code that you want to run //

return {'value': res.get('value',{})}

Avatar
Discard