tryton-sao 7.0.20 → 7.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ Version 7.0.22 - 2024-12-16
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 7.0.21 - 2024-12-01
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 7.0.20 - 2024-11-06
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
@@ -9482,6 +9482,7 @@ html.accesskey select[accesskey] ~ span[data-accesskey] {
9482
9482
  .tab-board .tab-domain > .nav-tabs {
9483
9483
  display: inline-flex;
9484
9484
  white-space: nowrap;
9485
+ width: 1px;
9485
9486
  }
9486
9487
  .tab-form .tab-domain .badge,
9487
9488
  .tab-board .tab-domain .badge {
@@ -9814,245 +9815,358 @@ img.icon {
9814
9815
  padding-top: 0;
9815
9816
  padding-bottom: 0;
9816
9817
  }
9817
- .form {
9818
+ .form,
9819
+ .board {
9818
9820
  width: 100%;
9819
9821
  }
9820
9822
  .form .form-container,
9823
+ .board .form-container,
9821
9824
  .form .form-hcontainer,
9822
- .form .form-vcontainer {
9825
+ .board .form-hcontainer,
9826
+ .form .form-vcontainer,
9827
+ .board .form-vcontainer {
9823
9828
  display: grid;
9824
9829
  width: 100%;
9825
9830
  height: 100%;
9826
9831
  }
9827
- .form .form-item {
9832
+ .form .form-item,
9833
+ .board .form-item {
9828
9834
  display: flex;
9829
9835
  padding: 2px;
9830
9836
  }
9831
- .form .form-item.form-empty {
9837
+ .form .form-item.form-empty,
9838
+ .board .form-item.form-empty {
9832
9839
  padding: 0px;
9833
9840
  }
9834
- .form .form-label {
9841
+ .form .form-label,
9842
+ .board .form-label {
9835
9843
  white-space: pre;
9836
9844
  }
9837
9845
  .form .form-char input,
9846
+ .board .form-char input,
9838
9847
  .form .form-password input,
9848
+ .board .form-password input,
9839
9849
  .form .form-integer input,
9850
+ .board .form-integer input,
9840
9851
  .form .form-float input,
9852
+ .board .form-float input,
9841
9853
  .form .form-date input,
9854
+ .board .form-date input,
9842
9855
  .form .form-datetime input,
9856
+ .board .form-datetime input,
9843
9857
  .form .form-time input,
9858
+ .board .form-time input,
9844
9859
  .form .form-timedelta input,
9860
+ .board .form-timedelta input,
9845
9861
  .form .form-selection input,
9862
+ .board .form-selection input,
9846
9863
  .form .form-multiselection input,
9864
+ .board .form-multiselection input,
9847
9865
  .form .form-url input,
9866
+ .board .form-url input,
9848
9867
  .form .form-email input,
9868
+ .board .form-email input,
9849
9869
  .form .form-callto input,
9870
+ .board .form-callto input,
9850
9871
  .form .form-sip input,
9872
+ .board .form-sip input,
9851
9873
  .form .form-pyson input,
9874
+ .board .form-pyson input,
9852
9875
  .form .form-char select,
9876
+ .board .form-char select,
9853
9877
  .form .form-password select,
9878
+ .board .form-password select,
9854
9879
  .form .form-integer select,
9880
+ .board .form-integer select,
9855
9881
  .form .form-float select,
9882
+ .board .form-float select,
9856
9883
  .form .form-date select,
9884
+ .board .form-date select,
9857
9885
  .form .form-datetime select,
9886
+ .board .form-datetime select,
9858
9887
  .form .form-time select,
9888
+ .board .form-time select,
9859
9889
  .form .form-timedelta select,
9890
+ .board .form-timedelta select,
9860
9891
  .form .form-selection select,
9892
+ .board .form-selection select,
9861
9893
  .form .form-multiselection select,
9894
+ .board .form-multiselection select,
9862
9895
  .form .form-url select,
9896
+ .board .form-url select,
9863
9897
  .form .form-email select,
9898
+ .board .form-email select,
9864
9899
  .form .form-callto select,
9900
+ .board .form-callto select,
9865
9901
  .form .form-sip select,
9866
- .form .form-pyson select {
9902
+ .board .form-sip select,
9903
+ .form .form-pyson select,
9904
+ .board .form-pyson select {
9867
9905
  min-width: 8ch;
9868
9906
  }
9869
9907
  .form .form-many2one select,
9908
+ .board .form-many2one select,
9870
9909
  .form .form-one2one select,
9910
+ .board .form-one2one select,
9871
9911
  .form .form-reference select,
9872
- .form form-binary select {
9912
+ .board .form-reference select,
9913
+ .form form-binary select,
9914
+ .board form-binary select {
9873
9915
  min-width: 8ch;
9874
9916
  }
9875
9917
  .form .form-many2one input,
9918
+ .board .form-many2one input,
9876
9919
  .form .form-one2one input,
9920
+ .board .form-one2one input,
9877
9921
  .form .form-reference input,
9878
- .form form-binary input {
9922
+ .board .form-reference input,
9923
+ .form form-binary input,
9924
+ .board form-binary input {
9879
9925
  min-width: 12ch;
9880
9926
  }
9881
9927
  @media screen and (min-width: 768px) {
9882
9928
  .form .form-reference > .input-sm,
9883
- .form .form-reference > .input-group {
9929
+ .board .form-reference > .input-sm,
9930
+ .form .form-reference > .input-group,
9931
+ .board .form-reference > .input-group {
9884
9932
  width: 50%;
9885
9933
  }
9886
9934
  }
9887
9935
  @media screen and (max-width: 767px) {
9888
9936
  .form .form-reference > .input-sm,
9889
- .form .form-reference > .input-group {
9937
+ .board .form-reference > .input-sm,
9938
+ .form .form-reference > .input-group,
9939
+ .board .form-reference > .input-group {
9890
9940
  width: 100%;
9891
9941
  }
9892
9942
  }
9893
9943
  .form .form-url a > img,
9944
+ .board .form-url a > img,
9894
9945
  .form .form-email a > img,
9946
+ .board .form-email a > img,
9895
9947
  .form .form-callto a > img,
9896
- .form .form-sip a > img {
9948
+ .board .form-callto a > img,
9949
+ .form .form-sip a > img,
9950
+ .board .form-sip a > img {
9897
9951
  width: 1em;
9898
9952
  height: 1em;
9899
9953
  }
9900
- .form .form-many2one > .input-group {
9954
+ .form .form-many2one > .input-group,
9955
+ .board .form-many2one > .input-group {
9901
9956
  width: 100%;
9902
9957
  }
9903
9958
  .form .form-one2many-menu::after,
9904
- .form .form-many2many-menu::after {
9959
+ .board .form-one2many-menu::after,
9960
+ .form .form-many2many-menu::after,
9961
+ .board .form-many2many-menu::after {
9905
9962
  content: "";
9906
9963
  display: table;
9907
9964
  clear: both;
9908
9965
  }
9909
9966
  .form .form-one2many-menu .form-one2many-string,
9967
+ .board .form-one2many-menu .form-one2many-string,
9910
9968
  .form .form-many2many-menu .form-one2many-string,
9969
+ .board .form-many2many-menu .form-one2many-string,
9911
9970
  .form .form-one2many-menu .form-many2many-string,
9912
- .form .form-many2many-menu .form-many2many-string {
9971
+ .board .form-one2many-menu .form-many2many-string,
9972
+ .form .form-many2many-menu .form-many2many-string,
9973
+ .board .form-many2many-menu .form-many2many-string {
9913
9974
  display: inline-table;
9914
9975
  float: left;
9915
9976
  margin: 5px;
9916
9977
  }
9917
9978
  [dir="rtl"] .form .form-one2many-menu .form-one2many-string,
9979
+ [dir="rtl"] .board .form-one2many-menu .form-one2many-string,
9918
9980
  [dir="rtl"] .form .form-many2many-menu .form-one2many-string,
9981
+ [dir="rtl"] .board .form-many2many-menu .form-one2many-string,
9919
9982
  [dir="rtl"] .form .form-one2many-menu .form-many2many-string,
9920
- [dir="rtl"] .form .form-many2many-menu .form-many2many-string {
9983
+ [dir="rtl"] .board .form-one2many-menu .form-many2many-string,
9984
+ [dir="rtl"] .form .form-many2many-menu .form-many2many-string,
9985
+ [dir="rtl"] .board .form-many2many-menu .form-many2many-string {
9921
9986
  float: right;
9922
9987
  }
9923
9988
  .form .form-one2many-menu .form-one2many-toolbar,
9989
+ .board .form-one2many-menu .form-one2many-toolbar,
9924
9990
  .form .form-many2many-menu .form-one2many-toolbar,
9991
+ .board .form-many2many-menu .form-one2many-toolbar,
9925
9992
  .form .form-one2many-menu .form-many2many-toolbar,
9926
- .form .form-many2many-menu .form-many2many-toolbar {
9993
+ .board .form-one2many-menu .form-many2many-toolbar,
9994
+ .form .form-many2many-menu .form-many2many-toolbar,
9995
+ .board .form-many2many-menu .form-many2many-toolbar {
9927
9996
  display: inline-table;
9928
9997
  float: right;
9929
9998
  }
9930
9999
  [dir="rtl"] .form .form-one2many-menu .form-one2many-toolbar,
10000
+ [dir="rtl"] .board .form-one2many-menu .form-one2many-toolbar,
9931
10001
  [dir="rtl"] .form .form-many2many-menu .form-one2many-toolbar,
10002
+ [dir="rtl"] .board .form-many2many-menu .form-one2many-toolbar,
9932
10003
  [dir="rtl"] .form .form-one2many-menu .form-many2many-toolbar,
9933
- [dir="rtl"] .form .form-many2many-menu .form-many2many-toolbar {
10004
+ [dir="rtl"] .board .form-one2many-menu .form-many2many-toolbar,
10005
+ [dir="rtl"] .form .form-many2many-menu .form-many2many-toolbar,
10006
+ [dir="rtl"] .board .form-many2many-menu .form-many2many-toolbar {
9934
10007
  float: left;
9935
10008
  }
9936
10009
  .form .form-one2many-menu .form-one2many-toolbar .badge,
10010
+ .board .form-one2many-menu .form-one2many-toolbar .badge,
9937
10011
  .form .form-many2many-menu .form-one2many-toolbar .badge,
10012
+ .board .form-many2many-menu .form-one2many-toolbar .badge,
9938
10013
  .form .form-one2many-menu .form-many2many-toolbar .badge,
9939
- .form .form-many2many-menu .form-many2many-toolbar .badge {
10014
+ .board .form-one2many-menu .form-many2many-toolbar .badge,
10015
+ .form .form-many2many-menu .form-many2many-toolbar .badge,
10016
+ .board .form-many2many-menu .form-many2many-toolbar .badge {
9940
10017
  max-width: 5em;
9941
10018
  min-width: 5em;
9942
10019
  overflow: hidden;
9943
10020
  text-overflow: ellipsis;
9944
10021
  }
9945
10022
  .form .form-one2many-content .treeview,
10023
+ .board .form-one2many-content .treeview,
9946
10024
  .form .form-many2many-content .treeview,
10025
+ .board .form-many2many-content .treeview,
9947
10026
  .form .form-one2many-content .list-form,
9948
- .form .form-many2many-content .list-form {
10027
+ .board .form-one2many-content .list-form,
10028
+ .form .form-many2many-content .list-form,
10029
+ .board .form-many2many-content .list-form {
9949
10030
  height: auto;
9950
10031
  min-height: 150px;
9951
10032
  max-height: 300px;
9952
10033
  }
9953
10034
  .form .form-text .input-group,
9954
- .form .form-richtext .input-group {
10035
+ .board .form-text .input-group,
10036
+ .form .form-richtext .input-group,
10037
+ .board .form-richtext .input-group {
9955
10038
  width: 100%;
9956
10039
  }
9957
10040
  .form .form-text .input-group textarea,
10041
+ .board .form-text .input-group textarea,
9958
10042
  .form .form-richtext .input-group textarea,
10043
+ .board .form-richtext .input-group textarea,
9959
10044
  .form .form-text .input-group .richtext,
9960
- .form .form-richtext .input-group .richtext {
10045
+ .board .form-text .input-group .richtext,
10046
+ .form .form-richtext .input-group .richtext,
10047
+ .board .form-richtext .input-group .richtext {
9961
10048
  height: 100%;
9962
10049
  line-height: 2.5ex;
9963
10050
  min-height: 12.5ex;
9964
10051
  overflow: auto;
9965
10052
  resize: vertical;
9966
10053
  }
9967
- .form .form-richtext > .btn-toolbar {
10054
+ .form .form-richtext > .btn-toolbar,
10055
+ .board .form-richtext > .btn-toolbar {
9968
10056
  min-width: 450px;
9969
10057
  }
9970
- .form .form-separator label {
10058
+ .form .form-separator label,
10059
+ .board .form-separator label {
9971
10060
  margin-top: 10px;
9972
10061
  }
9973
- .form .form-separator hr {
10062
+ .form .form-separator hr,
10063
+ .board .form-separator hr {
9974
10064
  margin-top: 0;
9975
10065
  margin-bottom: 5px;
9976
10066
  }
9977
- .form .form-image .caption {
10067
+ .form .form-image .caption,
10068
+ .board .form-image .caption {
9978
10069
  min-width: 120px;
9979
10070
  }
9980
- .form .form-document object {
10071
+ .form .form-document object,
10072
+ .board .form-document object {
9981
10073
  object-fit: scale-down;
9982
10074
  object-position: center top;
9983
10075
  width: 100%;
9984
10076
  height: 75vh;
9985
10077
  }
9986
10078
  @media screen and (max-width: 991px) {
9987
- .form .form-document object {
10079
+ .form .form-document object,
10080
+ .board .form-document object {
9988
10081
  height: 50vh;
9989
10082
  }
9990
10083
  }
9991
10084
  @media screen and (max-width: 767px) {
9992
- .form .form-document object {
10085
+ .form .form-document object,
10086
+ .board .form-document object {
9993
10087
  height: 25vh;
9994
10088
  }
9995
10089
  }
9996
- .form label {
10090
+ .form label,
10091
+ .board label {
9997
10092
  font-weight: normal;
9998
10093
  display: inline;
9999
10094
  padding: 0 5px;
10000
10095
  }
10001
- .form label.required {
10096
+ .form label.required,
10097
+ .board label.required {
10002
10098
  font-weight: bold;
10003
10099
  }
10004
- .form label.editable {
10100
+ .form label.editable,
10101
+ .board label.editable {
10005
10102
  font-style: italic;
10006
10103
  }
10007
- .form .nav-tabs {
10104
+ .form .nav-tabs,
10105
+ .board .nav-tabs {
10008
10106
  margin-bottom: 15px;
10009
10107
  }
10010
- .form .panel-heading {
10108
+ .form .panel-heading,
10109
+ .board .panel-heading {
10011
10110
  padding: 2px 2px;
10012
10111
  }
10013
- .form fieldset.form-group_ {
10112
+ .form fieldset.form-group_,
10113
+ .board fieldset.form-group_ {
10014
10114
  overflow: auto;
10015
10115
  }
10016
- .form fieldset.form-group_ > legend {
10116
+ .form fieldset.form-group_ > legend,
10117
+ .board fieldset.form-group_ > legend {
10017
10118
  font-size: 14px;
10018
10119
  margin-bottom: 5px;
10019
10120
  }
10020
10121
  .form fieldset.form-group_ .form-container,
10122
+ .board fieldset.form-group_ .form-container,
10021
10123
  .form fieldset.form-group_ .form-hcontainer,
10022
- .form fieldset.form-group_ .form-vcontainer {
10124
+ .board fieldset.form-group_ .form-hcontainer,
10125
+ .form fieldset.form-group_ .form-vcontainer,
10126
+ .board fieldset.form-group_ .form-vcontainer {
10023
10127
  vertical-align: middle;
10024
10128
  }
10025
- .form .xexpand {
10129
+ .form .xexpand,
10130
+ .board .xexpand {
10026
10131
  width: 100%;
10027
10132
  }
10028
- .form .xfill {
10133
+ .form .xfill,
10134
+ .board .xfill {
10029
10135
  justify-content: stretch;
10030
10136
  }
10031
- .form .yexpand {
10137
+ .form .yexpand,
10138
+ .board .yexpand {
10032
10139
  height: 100%;
10033
10140
  }
10034
- .form .xalign-start {
10141
+ .form .xalign-start,
10142
+ .board .xalign-start {
10035
10143
  justify-self: start;
10036
10144
  justify-content: start;
10037
10145
  }
10038
- .form .xalign-center {
10146
+ .form .xalign-center,
10147
+ .board .xalign-center {
10039
10148
  justify-self: center;
10040
10149
  justify-content: center;
10041
10150
  }
10042
- .form .xalign-end {
10151
+ .form .xalign-end,
10152
+ .board .xalign-end {
10043
10153
  justify-self: end;
10044
10154
  justify-content: end;
10045
10155
  }
10046
- .form .yalign-start {
10156
+ .form .yalign-start,
10157
+ .board .yalign-start {
10047
10158
  align-items: start;
10048
10159
  }
10049
- .form .yalign-center {
10160
+ .form .yalign-center,
10161
+ .board .yalign-center {
10050
10162
  align-items: center;
10051
10163
  }
10052
- .form .yalign-end {
10164
+ .form .yalign-end,
10165
+ .board .yalign-end {
10053
10166
  align-items: end;
10054
10167
  }
10055
- .form .yfill {
10168
+ .form .yfill,
10169
+ .board .yfill {
10056
10170
  align-self: stretch;
10057
10171
  }
10058
10172
  .form-binary,
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.0.20',
6
+ __version__: '7.0.22',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -2021,7 +2021,8 @@ var Sao = {
2021
2021
  if ( (!(statement instanceof Sao.PYSON.DateTime ||
2022
2022
  statement instanceof Sao.PYSON.Date ||
2023
2023
  statement instanceof Sao.PYSON.TimeDelta)) &&
2024
- (jQuery(statement.types()).not(['number']).length) ) {
2024
+ (jQuery(statement.types()).not(
2025
+ ['number', 'object']).length) ) {
2025
2026
  throw 'statement must be an integer, float, ' +
2026
2027
  'date, datetime or timedelta';
2027
2028
  }
@@ -5972,7 +5973,9 @@ var Sao = {
5972
5973
  (single_value && operator == 'in' && value.length == 1)) &&
5973
5974
  (!count ||
5974
5975
  ((count === 1) && model.length && name.endsWith('.id')))) {
5975
- value = operator == '=' ? value : value[0];
5976
+ if ((operator == 'in') && single_value) {
5977
+ value = value[0];
5978
+ }
5976
5979
  if (model.length && name.endsWith('.id')) {
5977
5980
  model = model[0];
5978
5981
  value = [model, value];
@@ -8048,6 +8051,7 @@ var Sao = {
8048
8051
  for (const record of this) {
8049
8052
  if (record.get_loaded([field]) || changed || record.id < 0) {
8050
8053
  if (prev) {
8054
+ prev.load(field, false);
8051
8055
  index = prev.field_get(field);
8052
8056
  } else {
8053
8057
  index = null;
@@ -9356,7 +9360,7 @@ var Sao = {
9356
9360
  setdefault = false;
9357
9361
  }
9358
9362
  }
9359
- if (setdefault && !pre_validate) {
9363
+ if (setdefault && jQuery.isEmptyObject(pre_validate)) {
9360
9364
  this.set_client(record, value);
9361
9365
  state_attrs.domain_readonly = domain_readonly;
9362
9366
  }
@@ -10172,7 +10176,7 @@ var Sao = {
10172
10176
  }
10173
10177
  for (const record2 of (record._values[this.name] || [])) {
10174
10178
  if (!record2.get_loaded() && (record2.id >= 0) &&
10175
- !pre_validate) {
10179
+ jQuery.isEmptyObject(pre_validate)) {
10176
10180
  continue;
10177
10181
  }
10178
10182
  if (!record2.validate(null, softvalidation, ldomain, true)) {
@@ -12116,6 +12120,9 @@ var Sao = {
12116
12120
  this.name = name;
12117
12121
  this.dialogs = [];
12118
12122
  this.board = null;
12123
+ this.create_tabcontent();
12124
+ this.set_name(this.name);
12125
+ this.title.text(this.name_el.text());
12119
12126
  UIView = new Sao.Model('ir.ui.view');
12120
12127
  this.view_prm = UIView.execute(
12121
12128
  'view_get', [this.view_id], this.context);
@@ -12133,9 +12140,6 @@ var Sao = {
12133
12140
  });
12134
12141
  this.content.append(this.board.el);
12135
12142
  });
12136
- this.create_tabcontent();
12137
- this.set_name(this.name);
12138
- this.title.text(this.name_el.text());
12139
12143
  },
12140
12144
  compare: function(attributes) {
12141
12145
  if (!attributes) {
@@ -13038,10 +13042,7 @@ var Sao = {
13038
13042
  'class': 'col-md-12'
13039
13043
  }).append(this.context_screen.screen_container.el))
13040
13044
  .prependTo(this.screen_container.filter_box);
13041
- return this.context_screen.new_(false).then(
13042
- // Set manually default to get context_screen_prm
13043
- // resolved when default is set.
13044
- record => record.default_get());
13045
+ return this.context_screen.new_();
13045
13046
  });
13046
13047
  }
13047
13048
 
@@ -14679,6 +14680,10 @@ function eval_pyson(value){
14679
14680
  (function() {
14680
14681
  'use strict';
14681
14682
 
14683
+ function remove_newline(value) {
14684
+ return value.replace(/[\n\r]/gm, '')
14685
+ }
14686
+
14682
14687
  Sao.View.FormXMLViewParser = Sao.class_(Sao.View.XMLViewParser, {
14683
14688
  init: function(view, exclude_field, field_attrs) {
14684
14689
  Sao.View.FormXMLViewParser._super.init.call(
@@ -14886,7 +14891,6 @@ function eval_pyson(value){
14886
14891
  var group = new Sao.View.Form.Container(
14887
14892
  Number(node.getAttribute('col') || 4));
14888
14893
  this.view.containers.push(group);
14889
- this.parse_child(node, group);
14890
14894
 
14891
14895
  if (attributes.xalign === undefined) {
14892
14896
  attributes.xalign = 0.5;
@@ -14911,6 +14915,9 @@ function eval_pyson(value){
14911
14915
 
14912
14916
  this.view.state_widgets.push(widget);
14913
14917
  this.container.add(widget, attributes);
14918
+ // Parse the children at the end to preserve the order of the state
14919
+ // widgets
14920
+ this.parse_child(node, group);
14914
14921
  },
14915
14922
  _parse_hpaned: function(node, attributes) {
14916
14923
  this._parse_paned(node, attributes, 'horizontal');
@@ -17227,7 +17234,7 @@ function eval_pyson(value){
17227
17234
  get_text: function() {
17228
17235
  var record = this.record;
17229
17236
  if (record) {
17230
- return record.field_get_client(this.field_name);
17237
+ return remove_newline(record.field_get_client(this.field_name));
17231
17238
  }
17232
17239
  return '';
17233
17240
  },
@@ -17243,7 +17250,7 @@ function eval_pyson(value){
17243
17250
  set_value: function() {
17244
17251
  var record = this.record;
17245
17252
  var field = this.field;
17246
- if (field.get_client(record) != this.entry.val()) {
17253
+ if (this.get_text() != this.entry.val()) {
17247
17254
  field.set_client(record, this.value_from_id(null, ''));
17248
17255
  this.entry.val('');
17249
17256
  }
@@ -17338,7 +17345,7 @@ function eval_pyson(value){
17338
17345
  get modified() {
17339
17346
  if (this.record && this.field) {
17340
17347
  var value = this.entry.val();
17341
- return this.field.get_client(this.record) != value;
17348
+ return this.get_text() != value;
17342
17349
  }
17343
17350
  return false;
17344
17351
  },
@@ -17646,7 +17653,7 @@ function eval_pyson(value){
17646
17653
  name = '';
17647
17654
  if (value) {
17648
17655
  model = value[0];
17649
- name = value[1];
17656
+ name = remove_newline(value[1]);
17650
17657
  }
17651
17658
  return ((model != this.get_model()) ||
17652
17659
  (name != this.entry.val()));
@@ -17665,7 +17672,8 @@ function eval_pyson(value){
17665
17672
  get_text: function() {
17666
17673
  var record = this.record;
17667
17674
  if (record) {
17668
- return record.field_get_client(this.field_name)[1];
17675
+ return remove_newline(
17676
+ record.field_get_client(this.field_name)[1]);
17669
17677
  }
17670
17678
  return '';
17671
17679
  },
@@ -17719,7 +17727,7 @@ function eval_pyson(value){
17719
17727
  var model, name;
17720
17728
  if (value instanceof Array) {
17721
17729
  model = value[0];
17722
- name = value[1];
17730
+ name = remove_newline(value[1]);
17723
17731
  } else {
17724
17732
  model = '';
17725
17733
  name = '';
@@ -19012,7 +19020,8 @@ function eval_pyson(value){
19012
19020
  },
19013
19021
  set_readonly: function(readonly) {
19014
19022
  Sao.View.Form.Binary._super.set_readonly.call(this, readonly);
19015
- this.but_select.prop('disabled', readonly);
19023
+ this.but_select.toggleClass('disabled', readonly);
19024
+ this.input_select.toggle(!readonly);
19016
19025
  this.but_clear.prop('disabled', readonly);
19017
19026
  if (this.text) {
19018
19027
  this.text.prop('readonly', readonly);
@@ -20264,7 +20273,7 @@ function eval_pyson(value){
20264
20273
  }
20265
20274
  this.view.columns.push(column);
20266
20275
 
20267
- if (attributes.optional) {
20276
+ if (attributes.optional && (name !== this.exclude_field)) {
20268
20277
  this.view.optionals.push(column);
20269
20278
  }
20270
20279
 
@@ -27753,6 +27762,7 @@ function eval_pyson(value){
27753
27762
  _parse_board: function(node, attributes) {
27754
27763
  var container = new Sao.View.Form.Container(
27755
27764
  Number(node.getAttribute('col') || 4));
27765
+ this.view.containers.push(container);
27756
27766
  this.view.el.append(container.el);
27757
27767
  this.parse_child(node, container);
27758
27768
  if (this._containers.length > 0) {
@@ -27798,9 +27808,23 @@ function eval_pyson(value){
27798
27808
  for (i = 0; i < this.actions.length; i++) {
27799
27809
  this.actions[i].display();
27800
27810
  }
27801
- for (i = 0; i < this.state_widgets.length; i++) {
27802
- this.state_widgets[i].set_state(null);
27811
+ var promesses = [];
27812
+ for (let state_widget of this.state_widgets.toReversed()) {
27813
+ var prm = state_widget.set_state(null);
27814
+ if (prm) {
27815
+ promesses.push(prm);
27816
+ }
27817
+ }
27818
+ for (const container of this.containers) {
27819
+ container.set_grid_template();
27803
27820
  }
27821
+ // re-set the grid templates for the StateWidget that are
27822
+ // asynchronous
27823
+ jQuery.when.apply(jQuery, promesses).done(() => {
27824
+ for (const container of this.containers) {
27825
+ container.set_grid_template();
27826
+ }
27827
+ });
27804
27828
  },
27805
27829
  active_changed: function(event_action) {
27806
27830
  for (const action of this.actions) {