Odoo Help


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.


value selected in Drop down list button

Lakay lakay
on 10/8/14, 11:26 PM 974 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

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

3 follower(s)


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