details:   https://code.tryton.org/tryton/commit/d3b9bb7763a1
branch:    default
user:      Cédric Krier <[email protected]>
date:      Thu Nov 06 11:34:07 2025 +0100
description:
        Do not update key value of user application on write

        Closes #14353
diffstat:

 trytond/trytond/res/user.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r b2767eab48e5 -r d3b9bb7763a1 trytond/trytond/res/user.py
--- a/trytond/trytond/res/user.py       Sat Nov 08 09:53:01 2025 +0100
+++ b/trytond/trytond/res/user.py       Thu Nov 06 11:34:07 2025 +0100
@@ -1062,7 +1062,7 @@
     @classmethod
     def preprocess_values(cls, mode, values):
         values = super().preprocess_values(mode, values)
-        if 'key' not in values:
+        if mode == 'create' and 'key' not in values:
             # Ensure we get a different key for each record
             # default methods are called only once
             values['key'] = cls.default_key()

Reply via email to