tryton-sao 6.2.13 → 6.2.14

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,3 +1,7 @@
1
+ Version 6.2.14 - 2022-11-05
2
+ ---------------------------
3
+ * Bug fixes (see mercurial logs for details)
4
+
1
5
  Version 6.2.13 - 2022-10-17
2
6
  * Bug fixes (see mercurial logs for details)
3
7
 
@@ -15750,7 +15750,10 @@ function eval_pyson(value){
15750
15750
  value = this._parse(this._input_format, value);
15751
15751
  value = this._format(this.get_format(), value);
15752
15752
  this.date.val(value).change();
15753
- this.date.focus();
15753
+ if (!~navigator.userAgent.indexOf("Firefox")) {
15754
+ // Firefox triggers change when navigate by month/year
15755
+ this.date.focus();
15756
+ }
15754
15757
  }
15755
15758
  }.bind(this));
15756
15759
  if (this.input[0].type == this._input) {
@@ -15758,6 +15761,7 @@ function eval_pyson(value){
15758
15761
  'class': 'icon-input icon-secondary',
15759
15762
  'aria-label': Sao.i18n.gettext("Open the calendar"),
15760
15763
  'title': Sao.i18n.gettext("Open the calendar"),
15764
+ 'tabindex': -1,
15761
15765
  }).appendTo(group);
15762
15766
  this.input.appendTo(this.icon);
15763
15767
  Sao.common.ICONFACTORY.get_icon_img('tryton-date')
@@ -17423,7 +17427,7 @@ function eval_pyson(value){
17423
17427
  size_limit = record.expr_eval(this.attributes.size);
17424
17428
  }
17425
17429
  if (this._readonly) {
17426
- if (size_limit === null) {
17430
+ if ((size_limit === null) || (size_limit === undefined)) {
17427
17431
  size_limit = this.screen.group.length;
17428
17432
  } else {
17429
17433
  size_limit = Math.min(
@@ -20683,12 +20687,19 @@ function eval_pyson(value){
20683
20687
  var redraw = function() {
20684
20688
  for (; i < rows.length; i++) {
20685
20689
  var row = rows[i];
20686
- var record = row.record,
20687
- column = row.tree.columns[0];
20688
- if (!record.is_loaded(column.attributes.name)) {
20690
+ var record = row.record;
20691
+ var field_name;
20692
+ for (var j=0; j < row.tree.columns.length; j++) {
20693
+ var column = row.tree.columns[j];
20694
+ if (column.type == 'field') {
20695
+ field_name = column.attributes.name;
20696
+ break;
20697
+ }
20698
+ }
20699
+ if (field_name && !record.is_loaded(field_name)) {
20689
20700
  // Prefetch the first field to prevent promises in
20690
20701
  // Cell.render
20691
- record.load(column.attributes.name).done(redraw);
20702
+ record.load(field_name).done(redraw);
20692
20703
  return;
20693
20704
  } else {
20694
20705
  row.redraw(selected, expanded);
@@ -21254,7 +21265,7 @@ function eval_pyson(value){
21254
21265
 
21255
21266
  var current_record = this.tree.screen.current_record;
21256
21267
  if ((this.record != current_record) &&
21257
- !current_record.validate(
21268
+ current_record && !current_record.validate(
21258
21269
  this.tree.get_fields(), false, false, true)) {
21259
21270
  return;
21260
21271
  }