tryton-sao 7.2.4 → 7.2.5

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,9 @@
1
1
 
2
+ Version 7.2.5 - 2024-08-01
3
+ --------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
2
7
  Version 7.2.4 - 2024-07-17
3
8
  --------------------------
4
9
  * Bug fixes (see mercurial logs for details)
@@ -9342,12 +9342,6 @@ html[theme="default"] .carousel-caption h6 {
9342
9342
  display: flex;
9343
9343
  flex: 1;
9344
9344
  }
9345
- @media screen and (max-width: 767px) {
9346
- #tabcontent > .tab-pane > .panel > .panel-body {
9347
- flex-direction: column-reverse;
9348
- min-height: unset;
9349
- }
9350
- }
9351
9345
  #tabcontent[data-view-type="tree"] {
9352
9346
  display: flex;
9353
9347
  flex: 1;
@@ -9679,9 +9673,7 @@ img.icon {
9679
9673
  border-style: solid;
9680
9674
  border-width: 0 0 0 1px;
9681
9675
  flex: 1;
9682
- margin-left: 5px;
9683
- min-width: 20%;
9684
- overflow: auto;
9676
+ overflow: unset;
9685
9677
  }
9686
9678
  .attachment-preview > div {
9687
9679
  flex: 1;
@@ -9691,8 +9683,10 @@ img.icon {
9691
9683
  }
9692
9684
  @media screen and (max-width: 991px) {
9693
9685
  .attachment-preview:not(:empty) {
9694
- border-width: 0 0 1px 0;
9695
- margin-bottom: 5px;
9686
+ flex: 2;
9687
+ }
9688
+ .attachment-preview:not(:empty) > div.preview-resizer {
9689
+ resize: none;
9696
9690
  }
9697
9691
  }
9698
9692
  .list-form {
@@ -10340,8 +10334,8 @@ input.column-boolean {
10340
10334
  float: none;
10341
10335
  }
10342
10336
  @media screen and (max-width: 767px) {
10343
- .treeview {
10344
- height: calc(100vh - 370px);
10337
+ .dict-row {
10338
+ grid-column: 1;
10345
10339
  }
10346
10340
  .dict-label {
10347
10341
  text-align: left;
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.2.4',
6
+ __version__: '7.2.5',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -10544,12 +10544,11 @@ var Sao = {
10544
10544
  Sao.field.Dict._super.set.call(this, record, value);
10545
10545
  },
10546
10546
  get: function(record) {
10547
- return (Sao.field.Dict._super.get.call(this, record) ||
10548
- this._default);
10547
+ return jQuery.extend(
10548
+ {}, Sao.field.Dict._super.get.call(this, record));
10549
10549
  },
10550
10550
  get_client: function(record) {
10551
- return (Sao.field.Dict._super.get_client.call(this, record) ||
10552
- this._default);
10551
+ return Sao.field.Dict._super.get_client.call(this, record);
10553
10552
  },
10554
10553
  validation_domains: function(record, pre_validate) {
10555
10554
  return this.get_domains(record, pre_validate)[0];
@@ -19844,6 +19843,7 @@ function eval_pyson(value){
19844
19843
  for (const key of new_names) {
19845
19844
  value[key] = null;
19846
19845
  }
19846
+ this.field.set_client(this.record, value);
19847
19847
  this._display().then(() => {
19848
19848
  this.fields[new_names[0]].input.focus();
19849
19849
  });
@@ -20226,7 +20226,9 @@ function eval_pyson(value){
20226
20226
  return value.map(function(e) { return JSON.parse(e); });
20227
20227
  },
20228
20228
  set_value: function(value) {
20229
- value = value.map(function(e) { return JSON.stringify(e); });
20229
+ if (value) {
20230
+ value = value.map(function(e) { return JSON.stringify(e); });
20231
+ }
20230
20232
  this.input.val(value);
20231
20233
  }
20232
20234
  });
@@ -21423,6 +21425,7 @@ function eval_pyson(value){
21423
21425
  }).map(function(row) {
21424
21426
  return row.el;
21425
21427
  }));
21428
+ this.update_selection(); // update after new rows has been added
21426
21429
  if ((this.display_size < this.group.length) &&
21427
21430
  (!this.tbody.children().last().hasClass('more-row'))) {
21428
21431
  var more_row = jQuery('<tr/>', {
@@ -21487,9 +21490,7 @@ function eval_pyson(value){
21487
21490
  }
21488
21491
  },
21489
21492
  redraw: function(selected, expanded) {
21490
- return redraw_async(this.rows, selected, expanded).then(() => {
21491
- this.update_selection();
21492
- });
21493
+ return redraw_async(this.rows, selected, expanded);
21493
21494
  },
21494
21495
  switch_: function(path) {
21495
21496
  this.screen.row_activate();
@@ -21714,9 +21715,9 @@ function eval_pyson(value){
21714
21715
  this.selection.prop('indeterminate', false);
21715
21716
  if (jQuery.isEmptyObject(selected_records)) {
21716
21717
  this.selection.prop('checked', false);
21717
- } else if (selected_records.length ==
21718
- this.tbody.children().length &&
21719
- this.display_size >= this.group.length) {
21718
+ } else if (
21719
+ this.rows.every((row) => row.is_selected()) &&
21720
+ (selected_records.length >= this.tbody.children().length)) {
21720
21721
  this.selection.prop('checked', true);
21721
21722
  } else {
21722
21723
  this.selection.prop('indeterminate', true);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tryton-sao",
3
3
  "title": "sao",
4
4
  "description": "Tryton webclient",
5
- "version": "7.2.4",
5
+ "version": "7.2.5",
6
6
  "homepage": "http://www.tryton.org/",
7
7
  "author": {
8
8
  "name": "Tryton"
package/src/model.js CHANGED
@@ -2906,12 +2906,11 @@
2906
2906
  Sao.field.Dict._super.set.call(this, record, value);
2907
2907
  },
2908
2908
  get: function(record) {
2909
- return (Sao.field.Dict._super.get.call(this, record) ||
2910
- this._default);
2909
+ return jQuery.extend(
2910
+ {}, Sao.field.Dict._super.get.call(this, record));
2911
2911
  },
2912
2912
  get_client: function(record) {
2913
- return (Sao.field.Dict._super.get_client.call(this, record) ||
2914
- this._default);
2913
+ return Sao.field.Dict._super.get_client.call(this, record);
2915
2914
  },
2916
2915
  validation_domains: function(record, pre_validate) {
2917
2916
  return this.get_domains(record, pre_validate)[0];
package/src/sao.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.2.4',
6
+ __version__: '7.2.5',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
package/src/sao.less CHANGED
@@ -266,15 +266,6 @@ html[theme="default"] {
266
266
  }
267
267
  }
268
268
 
269
- @media screen and (max-width: @screen-xs-max) {
270
- #tabcontent {
271
- > .tab-pane > .panel > .panel-body {
272
- flex-direction: column-reverse;
273
- min-height: unset;
274
- }
275
- }
276
- }
277
-
278
269
  #tabcontent[data-view-type="tree"] {
279
270
  display: flex;
280
271
  flex: 1;
@@ -545,9 +536,7 @@ img.icon {
545
536
  border-style: solid;
546
537
  border-width: 0 0 0 1px;
547
538
  flex: 1;
548
- margin-left: 5px;
549
- min-width: 20%;
550
- overflow: auto;
539
+ overflow: unset;
551
540
 
552
541
  > div {
553
542
  flex: 1;
@@ -560,8 +549,11 @@ img.icon {
560
549
 
561
550
  @media screen and (max-width: @screen-sm-max) {
562
551
  .attachment-preview:not(:empty) {
563
- border-width: 0 0 1px 0;
564
- margin-bottom: 5px;
552
+ flex: 2;
553
+
554
+ > div.preview-resizer {
555
+ resize: none;
556
+ }
565
557
  }
566
558
  }
567
559
 
@@ -1101,8 +1093,8 @@ input.column-boolean {
1101
1093
  }
1102
1094
 
1103
1095
  @media screen and (max-width: @screen-xs-max) {
1104
- .treeview {
1105
- height: calc(100vh - 370px);
1096
+ .dict-row {
1097
+ grid-column: 1;
1106
1098
  }
1107
1099
  .dict-label {
1108
1100
  text-align: left;
package/src/view/form.js CHANGED
@@ -5015,6 +5015,7 @@ function eval_pyson(value){
5015
5015
  for (const key of new_names) {
5016
5016
  value[key] = null;
5017
5017
  }
5018
+ this.field.set_client(this.record, value);
5018
5019
  this._display().then(() => {
5019
5020
  this.fields[new_names[0]].input.focus();
5020
5021
  });
@@ -5397,7 +5398,9 @@ function eval_pyson(value){
5397
5398
  return value.map(function(e) { return JSON.parse(e); });
5398
5399
  },
5399
5400
  set_value: function(value) {
5400
- value = value.map(function(e) { return JSON.stringify(e); });
5401
+ if (value) {
5402
+ value = value.map(function(e) { return JSON.stringify(e); });
5403
+ }
5401
5404
  this.input.val(value);
5402
5405
  }
5403
5406
  });
package/src/view/tree.js CHANGED
@@ -930,6 +930,7 @@
930
930
  }).map(function(row) {
931
931
  return row.el;
932
932
  }));
933
+ this.update_selection(); // update after new rows has been added
933
934
  if ((this.display_size < this.group.length) &&
934
935
  (!this.tbody.children().last().hasClass('more-row'))) {
935
936
  var more_row = jQuery('<tr/>', {
@@ -994,9 +995,7 @@
994
995
  }
995
996
  },
996
997
  redraw: function(selected, expanded) {
997
- return redraw_async(this.rows, selected, expanded).then(() => {
998
- this.update_selection();
999
- });
998
+ return redraw_async(this.rows, selected, expanded);
1000
999
  },
1001
1000
  switch_: function(path) {
1002
1001
  this.screen.row_activate();
@@ -1221,9 +1220,9 @@
1221
1220
  this.selection.prop('indeterminate', false);
1222
1221
  if (jQuery.isEmptyObject(selected_records)) {
1223
1222
  this.selection.prop('checked', false);
1224
- } else if (selected_records.length ==
1225
- this.tbody.children().length &&
1226
- this.display_size >= this.group.length) {
1223
+ } else if (
1224
+ this.rows.every((row) => row.is_selected()) &&
1225
+ (selected_records.length >= this.tbody.children().length)) {
1227
1226
  this.selection.prop('checked', true);
1228
1227
  } else {
1229
1228
  this.selection.prop('indeterminate', true);