2015-06-02 9:01 GMT+02:00 Christophe (net) <[email protected]>:
> I try to update a value in a one2many through the on_change_* method.
> I saw that it was possible to use the form:
> {O2M: {'update': [{field: value, ...}]}}
> but the latter does not update the records currently displayed in the
> client and it is not possible to achieve in particular recording.
> Is there a better way?
>
Since the 3.4 version (I think), you do not have to return anything in
on_change methods (NOT true
for on_change_with methods). Juste update the values of your field, and
reset it to make sure it
is detected as modified :
def on_change_...(self):
self.lines[0].name = 'some new name'
# Force modification detection
self.lines = self.lines
That's all !
Jean Cavallo
*Coopengo*