Skip to Content
Menú
This question has been flagged
1 Respondre
5951 Vistes

Hi, 

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?

Avatar
Descartar

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

Best Answer

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. 

Avatar
Descartar
Autor

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