tryton-sao 6.0.64 → 6.0.66

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.0.66 - 2025-10-02
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 6.0.65 - 2025-09-15
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 6.0.64 - 2025-08-01
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
@@ -17475,7 +17475,7 @@ function eval_pyson(value){
17475
17475
  this.screen.size_limit = size_limit;
17476
17476
  this.screen.display();
17477
17477
  if (this.attributes.height !== undefined) {
17478
- this.screen.current_view.el
17478
+ this.content
17479
17479
  .find('.treeview,.list-form').first()
17480
17480
  .css('min-height', this.attributes.height + 'px')
17481
17481
  .css('max-height', this.attributes.height + 'px');
@@ -17925,7 +17925,7 @@ function eval_pyson(value){
17925
17925
  }
17926
17926
  this.screen.display();
17927
17927
  if (this.attributes.height !== undefined) {
17928
- this.screen.current_view.el
17928
+ this.content
17929
17929
  .find('.treeview,.list-form').first()
17930
17930
  .css('min-height', this.attributes.height + 'px')
17931
17931
  .css('max-height', this.attributes.height + 'px');
@@ -22531,20 +22531,15 @@ function eval_pyson(value){
22531
22531
  }
22532
22532
  };
22533
22533
  }
22534
+ let keys = this._data_keys(data);
22534
22535
  var color = this.view.attributes.color || Sao.config.graph_color;
22535
22536
  var rgb = Sao.common.hex2rgb(
22536
22537
  Sao.common.COLOR_SCHEMES[color] || color);
22537
22538
  var maxcolor = Math.max.apply(null, rgb);
22538
- var keys = [];
22539
- var i, yfield;
22540
- for (i = 0; i < this.yfields.length; i++) {
22541
- yfield = this.yfields[i];
22542
- keys.push(yfield.key || yfield.name);
22543
- }
22544
22539
  var colors = Sao.common.generateColorscheme(
22545
22540
  color, keys, maxcolor / (keys.length || 1));
22546
- for (i = 0; i < this.yfields.length; i++) {
22547
- yfield = this.yfields[i];
22541
+ for (let i = 0; i < this.yfields.length; i++) {
22542
+ let yfield = this.yfields[i];
22548
22543
  if (yfield.color) {
22549
22544
  colors[yfield.key || yfield.name] = yfield.color;
22550
22545
  }
@@ -22556,6 +22551,14 @@ function eval_pyson(value){
22556
22551
  };
22557
22552
  return c3_config;
22558
22553
  },
22554
+ _data_keys: function(data) {
22555
+ let keys = [];
22556
+ for (let i = 0; i < this.yfields.length; i++) {
22557
+ let yfield = this.yfields[i];
22558
+ keys.push(yfield.key || yfield.name);
22559
+ }
22560
+ return keys;
22561
+ },
22559
22562
  action: function(data, element) {
22560
22563
  var ids = this.ids[this._action_key(data)];
22561
22564
  var ctx = jQuery.extend({}, this.view.screen.group._context);
@@ -22654,8 +22657,16 @@ function eval_pyson(value){
22654
22657
 
22655
22658
  config.data.columns = pie_columns;
22656
22659
  config.data.names = pie_names;
22660
+ config.data.order = null;
22657
22661
  return config;
22658
22662
  },
22663
+ _data_keys: function(data) {
22664
+ let keys = [];
22665
+ for (let i = 0; i < data.columns[1].length - 1; i++) {
22666
+ keys.push(i);
22667
+ }
22668
+ return keys;
22669
+ },
22659
22670
  _add_id: function(key, id) {
22660
22671
  var type = this.xfield.type;
22661
22672
  if ((type == 'date') || (type == 'datetime')) {
@@ -24902,7 +24913,7 @@ function eval_pyson(value){
24902
24913
  }, this.session).then(function(count) {
24903
24914
  return Sao.common.message.run(
24904
24915
  Sao.i18n.ngettext('%1 record imported',
24905
- '%1 records imported', count));
24916
+ '%1 records imported', count, count));
24906
24917
  }).then(prm.resolve, prm.reject);
24907
24918
  }.bind(this)
24908
24919
  });
@@ -25415,7 +25426,7 @@ function eval_pyson(value){
25415
25426
  csv, this.name + '.csv', {type: 'text/csv;charset=utf-8'});
25416
25427
  return Sao.common.message.run(
25417
25428
  Sao.i18n.ngettext('%1 record saved', '%1 records saved',
25418
- data.length));
25429
+ data.length, data.length));
25419
25430
  },
25420
25431
  set_url: function() {
25421
25432
  var path = [this.session.database, 'data', this.screen.model_name];