changeset fb81af61fc6c in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=fb81af61fc6c
description:
Consider Dict Char entries set to None as set to ""
issue10485
review346431002
diffstat:
src/view/form.js | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 7f0a7f10f094 -r fb81af61fc6c src/view/form.js
--- a/src/view/form.js Mon Sep 20 17:23:43 2021 +0200
+++ b/src/view/form.js Tue Sep 21 16:00:11 2021 +0200
@@ -4778,7 +4778,6 @@
});
Sao.View.Form.Dict.Entry = Sao.class_(Object, {
- class_: 'dict-char',
init: function(name, parent_widget) {
this.name = name;
this.definition = parent_widget.field.keys[name];
@@ -4828,6 +4827,14 @@
}
});
+ Sao.View.Form.Dict.Char = Sao.class_(Sao.View.Form.Dict.Entry, {
+ class_: 'dict-char',
+ modified: function(value) {
+ return (JSON.stringify(this.get_value()) !=
+ JSON.stringify(value[this.name] || ""));
+ }
+ });
+
Sao.View.Form.Dict.Boolean = Sao.class_(Sao.View.Form.Dict.Entry, {
class_: 'dict-boolean',
create_widget: function() {