Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits: 26c979df by Cédric Krier at 2023-04-11T15:10:27+02:00 Log transition only for updated records Closes #12202 - - - - - 1 changed file: - trytond/trytond/model/workflow.py Changes: ===================================== trytond/trytond/model/workflow.py ===================================== @@ -40,7 +40,8 @@ current_state = getattr(record, cls._transition_state) if current_state != to_update[record]: del to_update[record] - cls.write(list(to_update), { + to_update = list(to_update) + cls.write(to_update, { cls._transition_state: state, }) cls.log( @@ -44,7 +45,7 @@ cls._transition_state: state, }) cls.log( - records, 'transition', + to_update, 'transition', f'{cls._transition_state}:{state}') return result return wrapper View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/26c979df1d866f15b3a1f2deed5b047acedb2274 -- View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/26c979df1d866f15b3a1f2deed5b047acedb2274 You're receiving this email because of your account on foss.heptapod.net.