Le 08/05/2018 à 19:56, Cédric Krier a écrit :
> The origin must be saved before being assigned if you want to store the
> saved id.
>
>
> I submitted
https://bugs.tryton.org/issue7421 to prevent the exception
> raising.
>
Ok, I'm trying the following, based upon what I see e.g. in modelstorage.py:
> if
move_origin.id is None or
move_origin.id < 0:
> move_origin.save() # work-around for same period origins
> new_move.origin = move_origin
>
This should keep use of save() down to the handful of cases where id is actually < 0
BTW, why does save(), for example on a move, automatically save() its lines?
Is the problem because origin is unidirectional?
--
Richard PALO