Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
803 Переглядів

hi all,

how can i save the current record to be able to add a record in a One2many relation.

at the moment i see no chance to add a field in the One2many child without saving the parent.

i have written a module in which serveral One2many fields are.

in an Onchange function  i will add new values in the One2manyfields.

in lower Odoo versions it was possible to add lines in a One2many relation without saving the parent.

in odoo 16 i didnt found any resolution. it is only possible when the parent is saved. 


i can write new values to the One2many but they are only visible after saving the parent.

i could build an array of values like [(0,0, {'value':something})] and when i did

lines_ids = array 

the lines where added.

in earlier odoo versions this was different. the inserted values were visible immidiately and when the parent was saved the relation field was filled.

hope you understand what i mean:-)

i wonder if this behavior was disabled in odoo 16.

any helpwould be great



Аватар
Відмінити