Odoo Help


value selected in Drop down list button

Lakay lakay
on 10/8/14, 11:26 PM 1,734 views


this is my scenario, 

I have a many2one type (drop down list box ) and it is in a form view, when i try to change the value in that (drop down list box) its not immediately save and you need to click the save button (RED button)...   I want to create a separate button in which it will only update the value being selected in my drop down list box ( its like a save button for my drop down list box only) can you help me?

With out saving the parent record, one cannot save any data... be it M2O or basic fields....

on 10/9/14, 2:38 AM
Piyush Suva
On 10/9/14, 3:14 AM

As per my opinion it is not posible and also its not good way.

But then after, If you want to do then you can do like below.

Take one boolean field 'test': default value test = False

added this boolean field on view.

then add 'attrs' attributes on that many2one field: attrs="{'readonly':[('test','=',False)]}"

then on create and write you can pass {'test':False}

so that if you want to change the value of m2o field you have to check test field. 

hmmm, i see your point, but it will add another field in the UI... but let me try it... thanks

Lakay lakay
on 10/9/14, 4:54 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

3 follower(s)


Asked: 10/8/14, 11:26 PM
Seen: 1734 times
Last updated: 3/16/15, 8:10 AM