Odoo Help


copy field data one to another using boolean

on 3/2/16, 2:33 AM 765 views

when user will give data in 'input_value' field and check the radio button which is named as  'copy' then  values of 'input_value' field will show in 'input_value_copy' field, but i didn't getting result.can anyone solve this problem please.

this way i've tried...

 In py file

class copyFieldsvalue(models.Model):




'input_value_copy':fields.char('Copy of Input'),



def onchange_copy(self,cr, uid, ids,copy,input_value,context=None):

if copy:

return {'value':{'input_value_copy':input_value,}}

return {'value':{}}

In XML file

<field name="input_value"/>

<field name="input_value_copy"/>

<field name="copy" on_change="onchange_copy(copy,input_value_copy)"/>

Axel Mendoza
On 3/2/16, 3:00 AM

You just need to change this line and it will work:

<field name="copy" on_change="onchange_copy(copy,input_value)"/>

It works! thank you so much Axel

on 3/2/16, 3:38 AM

Good to know, could you upvote it too?

Axel Mendoza
on 3/2/16, 3:47 AM

sure! why not.

on 3/2/16, 3:59 AM

Hi Axel, can you please check this Question in the link below. in odoo /forum/help-1/question/show-existing-products-of-a-customer-in-a-tab-98601

on 3/3/16, 8:50 AM

I check it but I don't understand what you need, post some code of what you are doing

Axel Mendoza
on 3/7/16, 4:24 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/2/16, 2:33 AM
Seen: 765 times
Last updated: 3/2/16, 8:14 AM