Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

on_change function

By
Milva Joy
on 4/15/15, 7:23 AM 327 views

can anyone help to learn on_change function?

1
Alby Antony
On 4/15/15, 7:26 AM

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',{})}

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/15/15, 7:23 AM
Seen: 327 times
Last updated: 4/15/15, 7:27 AM