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
--
You received this message because you are subscribed to the Google Groups
"tryton-dev" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton-dev/0f71a0b0-c227-606b-94c0-5863c58658e8%40netbsd.org.