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.

0

onchange output show previous value

By
Prakash
on 10/16/13, 5:34 AM 1,488 views
def onchange_resvalue(self, cr, uid, ids, iscopy, description, context=None):
   context = context or {}
   v = {}
   if iscopy:
      v['res_val'] = description
   return {'value': v}

<field name="iscopy"  on_change="onchange_restime(iscopy, description)"/>
<field name="description" on_change="onchange_restime(iscopy, description)"/>
<field name="res_val"/>

In the New record (not save in db) above on change method How to get res_val previous value entered by the user? For example in the above code working in the way, 1) If user Entered res_val output value 2) And then user checked iscopy boolean field it will copy the res_val into description 3) And again unchecked how to shows previous value entered by the user.

-1
voathnak lim
On 7/15/16, 6:39 AM

I got the same question, can any one answer please?

How to get the previous value in onchange function

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

0 follower(s)

Stats

Asked: 10/16/13, 5:34 AM
Seen: 1488 times
Last updated: 7/15/16, 6:39 AM