tryton-sao 6.0.69 → 6.0.71

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.71 - 2026-01-15
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 6.0.70 - 2025-12-17
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 6.0.69 - 2025-11-21
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
@@ -4166,11 +4166,12 @@ var Sao = {};
4166
4166
  var name = clause[0];
4167
4167
  var operator = clause[1];
4168
4168
  var value = clause[2];
4169
- if (name.endsWith('.rec_name')) {
4169
+ if (name.endsWith('.rec_name')
4170
+ && (value || (clause.length > 3))) {
4170
4171
  name = name.slice(0, -9);
4171
4172
  }
4172
4173
  if (!(name in this.fields)) {
4173
- if (this.is_full_text(value)) {
4174
+ if ((value !== null) && this.is_full_text(value)) {
4174
4175
  value = value.slice(1, -1);
4175
4176
  }
4176
4177
  return this.quote(value);
@@ -5111,7 +5112,7 @@ var Sao = {};
5111
5112
  break;
5112
5113
  }
5113
5114
  }
5114
- return target + ',' + value;
5115
+ return target + ',' + (value || '');
5115
5116
  };
5116
5117
 
5117
5118
  var converts = {
@@ -16173,7 +16174,7 @@ function eval_pyson(value){
16173
16174
  },
16174
16175
  get width() {
16175
16176
  var digits = this.digits;
16176
- if (digits) {
16177
+ if (digits && digits.every(d => d !== null)) {
16177
16178
  return digits.reduce(function(acc, cur) {
16178
16179
  return acc + cur;
16179
16180
  });
@@ -16774,15 +16775,21 @@ function eval_pyson(value){
16774
16775
  this.entry.val('');
16775
16776
  return;
16776
16777
  }
16778
+ let view_ids = (this.attributes.view_ids || '').split(',');
16777
16779
  if (this.has_target(value)) {
16778
16780
  var m2o_id =
16779
16781
  this.id_from_value(record.field_get(this.field_name));
16780
16782
  if (evt && (evt.ctrlKey || evt.metaKey)) {
16783
+ if (!jQuery.isEmptyObject(view_ids)) {
16784
+ // Remove the first tree view as mode is form only
16785
+ view_ids.shift();
16786
+ }
16781
16787
  var params = {};
16782
16788
  params.model = this.get_model();
16783
16789
  params.res_id = m2o_id;
16784
16790
  params.mode = ['form'];
16785
16791
  params.name = this.attributes.string;
16792
+ params.view_ids = view_ids;
16786
16793
  params.context = this.field.get_context(this.record);
16787
16794
  Sao.Tab.create(params);
16788
16795
  return;
@@ -16828,8 +16835,7 @@ function eval_pyson(value){
16828
16835
  context: context,
16829
16836
  domain: domain,
16830
16837
  order: order,
16831
- view_ids: (this.attributes.view_ids ||
16832
- '').split(','),
16838
+ view_ids: view_ids,
16833
16839
  views_preload: (this.attributes.views || {}),
16834
16840
  new_: this.create_access,
16835
16841
  search_filter: parser.quote(text),
@@ -21258,9 +21264,11 @@ function eval_pyson(value){
21258
21264
  return;
21259
21265
  }
21260
21266
 
21261
- body = listener = jQuery(document.body);
21267
+ body = jQuery(document.body);
21262
21268
  if (body.hasClass('modal-open')) {
21263
21269
  listener = this.tree.el.parents('.modal').last();
21270
+ } else {
21271
+ listener = this.tree.el.parents('.tab-pane').last();
21264
21272
  }
21265
21273
  var handler = function(event_) {
21266
21274
  if ((event_.currentTarget == body[0]) &&
@@ -21273,7 +21281,7 @@ function eval_pyson(value){
21273
21281
  event_.stopPropagation();
21274
21282
  return;
21275
21283
  }
21276
- body.off('click.sao.editabletree');
21284
+ listener.off('click.sao.editabletree');
21277
21285
  this.tree.edit_row(null);
21278
21286
  return true;
21279
21287
  }.bind(this);
@@ -21772,6 +21780,7 @@ function eval_pyson(value){
21772
21780
  view_ids.shift();
21773
21781
  }
21774
21782
  cell.click(function(event) {
21783
+ event.preventDefault();
21775
21784
  event.stopPropagation();
21776
21785
  var params = {};
21777
21786
  params.model = this.attributes.relation;