From eae51e5fa8ef1480b83dfedb7fbc5ad4a479a6e2 Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Thu, 13 Feb 2020 23:39:21 +0000 Subject: [PATCH] [FIX] core: SSF should re-read from the record after saving Before this change, the SSF would read from the record after creation but wouldn't do so after a write. This doesn't conform to the behaviour of the web client (which does a read() after saving a form), and means the effect of field inverses (when the dependencies of a writable field are also in the form) or overrides to write wouldn't be visible afterwards. It's always possible to just re-create the form from scratch, but the intention has always been that the form would work correctly after a save. closes odoo/odoo#50363 X-original-commit: 45398c09c0231e61b83d378d5939ec12d7465844 Signed-off-by: Xavier Morel (xmo) --- odoo/tests/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index d9792910ca4..74e00a7f626 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -1823,9 +1823,9 @@ class Form(object): r.write(values) else: r = self._model.create(values) - self._values.update( - record_to_values(self._view['fields'], r) - ) + self._values.update( + record_to_values(self._view['fields'], r) + ) self._changed.clear() self._model.flush() self._model.env.clear() # discard cache and pending recomputations