tryton-sao 7.0.39 → 7.0.40

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.0.40 - 2025-11-21
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+ * Escape completion content with custom format (issue14363)
6
+
2
7
  Version 7.0.39 - 2025-11-02
3
8
  ---------------------------
4
9
  * Bug fixes (see mercurial logs for details)
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.0.39',
6
+ __version__: '7.0.40',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -7027,9 +7027,13 @@ var Sao = {
7027
7027
  },
7028
7028
  _format: function(content) {
7029
7029
  if (this.format) {
7030
- return this.format(content);
7030
+ content = this.format(content);
7031
+ }
7032
+ if (content instanceof jQuery) {
7033
+ return content;
7034
+ } else {
7035
+ return jQuery('<span/>').text(content);
7031
7036
  }
7032
- return jQuery('<span/>').text(content);
7033
7037
  },
7034
7038
  _format_action: function(content) {
7035
7039
  if (this.format_action) {
@@ -7893,7 +7897,7 @@ var Sao = {
7893
7897
  array.save = function() {
7894
7898
  var deferreds = [];
7895
7899
  this.forEach(record => {
7896
- deferreds.push(record.save());
7900
+ deferreds.push(record.save(false));
7897
7901
  });
7898
7902
  if (!jQuery.isEmptyObject(this.record_deleted)) {
7899
7903
  for (const record of this.record_deleted) {
@@ -8175,7 +8179,7 @@ var Sao = {
8175
8179
  return false;
8176
8180
  }
8177
8181
  },
8178
- save: function(force_reload=false) {
8182
+ save: function(force_reload=true) {
8179
8183
  var context = this.get_context();
8180
8184
  if (this._save_prm.state() == 'pending') {
8181
8185
  return this._save_prm.then(() => this.save(force_reload));
@@ -22877,12 +22881,18 @@ function eval_pyson(value){
22877
22881
  cell = cell.children('a');
22878
22882
  cell.unbind('click');
22879
22883
  Sao.View.Tree.Many2OneColumn._super.update_text.call(this, cell, record);
22884
+ let view_ids = (this.attributes.view_ids || '').split(',');
22885
+ if (!jQuery.isEmptyObject(view_ids)) {
22886
+ // Remove the first tree view as mode is form only
22887
+ view_ids.shift();
22888
+ }
22880
22889
  cell.click(event => {
22881
22890
  event.stopPropagation();
22882
22891
  var params = {};
22883
22892
  params.model = this.attributes.relation;
22884
22893
  params.res_id = this.field.get(record);
22885
22894
  params.mode = ['form'];
22895
+ params.view_ids = view_ids;
22886
22896
  params.name = this.attributes.string;
22887
22897
  params.context = this.field.get_context(record);
22888
22898
  Sao.Tab.create(params);
@@ -23807,7 +23817,7 @@ function eval_pyson(value){
23807
23817
  },
23808
23818
  action: function(data, element) {
23809
23819
  var ids = this.ids[this._action_key(data)];
23810
- var ctx = jQuery.extend({}, this.view.screen.group._context);
23820
+ var ctx = jQuery.extend({}, this.view.screen.group.local_context);
23811
23821
  delete ctx.active_ids;
23812
23822
  delete ctx.active_id;
23813
23823
  Sao.Action.exec_keyword('graph_open', {
@@ -23928,7 +23938,8 @@ function eval_pyson(value){
23928
23938
  Sao.View.Graph.Pie._super._add_id.call(this, key, id);
23929
23939
  },
23930
23940
  _action_key: function(data) {
23931
- return data.id;
23941
+ // data.name is the label used for the x axis
23942
+ return data.name;
23932
23943
  }
23933
23944
  });
23934
23945