summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald Portier <ronald@therp.nl>2020-02-13 23:39:21 +0000
committerRonald Portier <ronald@therp.nl>2020-04-29 07:31:00 +0000
commiteae51e5fa8ef1480b83dfedb7fbc5ad4a479a6e2 (patch)
tree8359706c0b9162fb386c3022ff4ebe5b33a6b611
parentc2d5a4beaf7c73e51d9a45993dda0fc84627d086 (diff)
[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) <xmo@odoo.com>
-rw-r--r--odoo/tests/common.py6
1 files 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