tryton-sao 6.8.9 → 6.8.11

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 6.8.11 - 2024-03-03
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 6.8.10 - 2024-02-15
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 6.8.9 - 2024-02-03
3
13
  --------------------------
4
14
  * Bug fixes (see mercurial logs for details)
package/COPYRIGHT CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (C) 2012-2023 Nicolas Évrard.
1
+ Copyright (C) 2012-2024 Nicolas Évrard.
2
2
  Copyright (C) 2012-2024 Cédric Krier.
3
3
  Copyright (C) 2012-2014 Bertrand Chenal.
4
4
  Copyright (C) 2012-2024 B2CK SPRL.
@@ -9952,16 +9952,18 @@ img.icon {
9952
9952
  max-height: 300px;
9953
9953
  }
9954
9954
  .form .form-text > textarea,
9955
- .form .form-richtext > textarea {
9956
- min-height: 150px;
9957
- max-height: 300px;
9955
+ .form .form-richtext > textarea,
9956
+ .form .form-text .richtext,
9957
+ .form .form-richtext .richtext {
9958
+ line-height: 2.5ex;
9959
+ max-height: 50ex;
9960
+ min-height: 12.5ex;
9961
+ overflow: auto;
9962
+ resize: vertical;
9958
9963
  }
9959
9964
  .form .form-richtext > .btn-toolbar {
9960
9965
  min-width: 450px;
9961
9966
  }
9962
- .form .form-richtext .richtext {
9963
- min-height: 5em;
9964
- }
9965
9967
  .form .form-separator label {
9966
9968
  margin-top: 10px;
9967
9969
  }
@@ -10173,7 +10175,11 @@ input.column-boolean {
10173
10175
  background-color: #d9edf7;
10174
10176
  }
10175
10177
  .email .email-richtext {
10176
- min-height: 10em;
10178
+ line-height: 2.5ex;
10179
+ max-height: 50ex;
10180
+ min-height: 12.5ex;
10181
+ overflow: auto;
10182
+ resize: vertical;
10177
10183
  }
10178
10184
  .email input[type='file'] {
10179
10185
  display: inline-block;
@@ -1,7 +1,7 @@
1
1
  /* This file is part of Tryton. The COPYRIGHT file at the top level of
2
2
  this repository contains the full copyright notices and license terms. */
3
3
  var Sao = {
4
- __version__: '6.8.9',
4
+ __version__: '6.8.11',
5
5
  };
6
6
 
7
7
  (function() {
@@ -1638,13 +1638,13 @@ var Sao = {
1638
1638
  throw 'NotImplementedError';
1639
1639
  },
1640
1640
  get: function(k, d='') {
1641
- return Sao.PYSON.Get(this, k, d);
1641
+ return new Sao.PYSON.Get(this, k, d);
1642
1642
  },
1643
1643
  in_: function(obj) {
1644
- return Sao.PYSON.In(this, obj);
1644
+ return new Sao.PYSON.In(this, obj);
1645
1645
  },
1646
1646
  contains: function(k) {
1647
- return Sao.PYSON.In(k, this);
1647
+ return new Sao.PYSON.In(k, this);
1648
1648
  },
1649
1649
  toString: function() {
1650
1650
  var klass = this.pyson().__class__;
@@ -4748,6 +4748,7 @@ var Sao = {
4748
4748
  'multiselection': complete_selection,
4749
4749
  'reference': complete_reference,
4750
4750
  'datetime': complete_datetime,
4751
+ 'timestamp': complete_datetime,
4751
4752
  'date': complete_date,
4752
4753
  'time': complete_time
4753
4754
  };
@@ -5025,8 +5026,10 @@ var Sao = {
5025
5026
  operator = '=';
5026
5027
  }
5027
5028
  }
5028
- if (~['integer', 'float', 'numeric', 'datetime', 'date',
5029
- 'time'].indexOf(field.type)) {
5029
+ if (~[
5030
+ 'integer', 'float', 'numeric',
5031
+ 'datetime', 'timestamp', 'date',
5032
+ 'time'].indexOf(field.type)) {
5030
5033
  if ((typeof value == 'string') && value.contains('..')) {
5031
5034
  var values = value.split('..', 2);
5032
5035
  var lvalue = this.convert_value(field, values[0], this.context);
@@ -5258,6 +5261,7 @@ var Sao = {
5258
5261
  }
5259
5262
  }
5260
5263
  };
5264
+ converts.timestamp = converts.datetime;
5261
5265
  var func = converts[field.type];
5262
5266
  if (func) {
5263
5267
  return func();
@@ -5374,6 +5378,7 @@ var Sao = {
5374
5378
  }
5375
5379
  }
5376
5380
  };
5381
+ converts.timestamp = converts.datetime;
5377
5382
  if (value instanceof Array) {
5378
5383
  return value.map(v => this.format_value(field, v)).join(';');
5379
5384
  } else {
@@ -5858,18 +5863,18 @@ var Sao = {
5858
5863
  if ((domain instanceof Array) &&
5859
5864
  (domain.length == 1)) {
5860
5865
  let [name, operator, value, ...model] = domain[0];
5861
- if (operator == '=' ||
5862
- (single_value && operator == 'in' && value.length == 1)) {
5866
+ const count = name.split('.').length - 1;
5867
+ if (
5868
+ (operator == '=' ||
5869
+ (single_value && operator == 'in' && value.length == 1)) &&
5870
+ (!count ||
5871
+ ((count === 1) && model.length && name.endsWith('.id')))) {
5863
5872
  value = operator == '=' ? value : value[0];
5864
- var count = 0;
5865
5873
  if (model.length && name.endsWith('.id')) {
5866
- count = 1;
5867
5874
  model = model[0];
5868
5875
  value = [model, value];
5869
5876
  }
5870
- if ((name.split('.').length - 1) == count) {
5871
- return [true, name, value];
5872
- }
5877
+ return [true, name, value];
5873
5878
  }
5874
5879
  }
5875
5880
  return [false, null, null];
@@ -6773,7 +6778,7 @@ var Sao = {
6773
6778
  el.closest('.modal-body').css('overflow', overflow);
6774
6779
  el.closest('.navbar-collapse.in').css('overflow-y', overflow);
6775
6780
  el.closest('.content-box').css('overflow-y', overflow);
6776
- el.closest('fieldset.form-group_').css('overflow', overflow);
6781
+ el.parents('fieldset.form-group_').css('overflow', overflow);
6777
6782
  Sao.common.scrollIntoViewIfNeeded(el);
6778
6783
  };
6779
6784
 
@@ -10205,10 +10210,11 @@ var Sao = {
10205
10210
  return data;
10206
10211
  },
10207
10212
  get_data: function(record) {
10208
- var data = record._values[this.name] || [];
10213
+ var data = record._values[this.name];
10209
10214
  var prm = jQuery.when(data);
10210
10215
  if (!(data instanceof Uint8Array) &&
10211
- (typeof(data) != 'string')) {
10216
+ (typeof(data) != 'string') &&
10217
+ (data !== null)) {
10212
10218
  if (record.id < 0) {
10213
10219
  return prm;
10214
10220
  }
@@ -9952,16 +9952,18 @@ img.icon {
9952
9952
  max-height: 300px;
9953
9953
  }
9954
9954
  .form .form-text > textarea,
9955
- .form .form-richtext > textarea {
9956
- min-height: 150px;
9957
- max-height: 300px;
9955
+ .form .form-richtext > textarea,
9956
+ .form .form-text .richtext,
9957
+ .form .form-richtext .richtext {
9958
+ line-height: 2.5ex;
9959
+ max-height: 50ex;
9960
+ min-height: 12.5ex;
9961
+ overflow: auto;
9962
+ resize: vertical;
9958
9963
  }
9959
9964
  .form .form-richtext > .btn-toolbar {
9960
9965
  min-width: 450px;
9961
9966
  }
9962
- .form .form-richtext .richtext {
9963
- min-height: 5em;
9964
- }
9965
9967
  .form .form-separator label {
9966
9968
  margin-top: 10px;
9967
9969
  }
@@ -10173,7 +10175,11 @@ input.column-boolean {
10173
10175
  background-color: #d9edf7;
10174
10176
  }
10175
10177
  .email .email-richtext {
10176
- min-height: 10em;
10178
+ line-height: 2.5ex;
10179
+ max-height: 50ex;
10180
+ min-height: 12.5ex;
10181
+ overflow: auto;
10182
+ resize: vertical;
10177
10183
  }
10178
10184
  .email input[type='file'] {
10179
10185
  display: inline-block;