Have a char field with trim option set to True (this is the
default). Open a form view where the value of this field has
leading or trailing spaces. Press F5 (or close the tab/browser).
Before this commit, a write was done before leaving, with the
trimmed value of the char field.
This isn't the expected behavior: as the field hasn't been manually
edited, we don't want to write on it.
This could be reproduced on project.task form views, on tasks with
a name with leading/trailing spaces (e.g. tasks created by mails
sent to feedback@odoo.com).
The issue occurred when we saved a record "urgently" (before unload)
because we parsed the value of each input field, and we sent it if
it was different from the initial (or last set) value. In our case,
parsing the value trimmed it, and it was thus different from the
initial value.
Bug reported after the migration of odoo.com to 16.0.
closesodoo/odoo#110528
X-original-commit: 43b7ae39e633ced6008b067bb4e63ed9be7eda01
Signed-off-by: Michaël Mattiello <mcm@odoo.com>