tryton-sao 7.2.13 → 7.2.15

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 7.2.15 - 2025-02-16
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 7.2.14 - 2025-01-16
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 7.2.13 - 2025-01-01
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
package/COPYRIGHT CHANGED
@@ -1,7 +1,7 @@
1
1
  Copyright (C) 2012-2024 Nicolas Évrard.
2
- Copyright (C) 2012-2024 Cédric Krier.
2
+ Copyright (C) 2012-2025 Cédric Krier.
3
3
  Copyright (C) 2012-2014 Bertrand Chenal.
4
- Copyright (C) 2012-2024 B2CK SPRL.
4
+ Copyright (C) 2012-2025 B2CK SPRL.
5
5
  Copyright (C) 2019 Jitbit.
6
6
  Copyright (C) 2013 Thomas Park
7
7
  Copyright (C) 2020-2021 Maxime Richez
@@ -10032,6 +10032,16 @@ img.icon {
10032
10032
  .board .form-binary input {
10033
10033
  min-width: 12ch;
10034
10034
  }
10035
+ .form .form-many2one input[type='file'],
10036
+ .board .form-many2one input[type='file'],
10037
+ .form .form-one2one input[type='file'],
10038
+ .board .form-one2one input[type='file'],
10039
+ .form .form-reference input[type='file'],
10040
+ .board .form-reference input[type='file'],
10041
+ .form .form-binary input[type='file'],
10042
+ .board .form-binary input[type='file'] {
10043
+ min-width: unset;
10044
+ }
10035
10045
  @media screen and (min-width: 768px) {
10036
10046
  .form .form-reference > .input-sm,
10037
10047
  .board .form-reference > .input-sm,
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.2.13',
6
+ __version__: '7.2.15',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -7659,7 +7659,7 @@ var Sao = {
7659
7659
  'use strict';
7660
7660
 
7661
7661
  function get_x2m_sub_fields(f_attrs, prefix) {
7662
- if (f_attrs.loading == 'eager' && f_attrs.views) {
7662
+ if (f_attrs.visible && f_attrs.views) {
7663
7663
  // There's only one key but we don't know its value
7664
7664
  const [[, view],] = Object.entries(f_attrs.views);
7665
7665
 
@@ -14546,7 +14546,9 @@ var Sao = {
14546
14546
  }
14547
14547
  }
14548
14548
  }
14549
- if ((this.views.length == 1) && this.current_record) {
14549
+ }
14550
+ if ((view === this.current_view) && (view.view_type == 'form')) {
14551
+ if (this.current_record) {
14550
14552
  if (!(parent_ in this.tree_states)) {
14551
14553
  this.tree_states[parent_] = {};
14552
14554
  }
@@ -14562,11 +14564,13 @@ var Sao = {
14562
14564
  paths = [];
14563
14565
  }
14564
14566
  var selected_paths = view.get_selected_paths();
14565
- if (!(parent_ in this.tree_states)) {
14566
- this.tree_states[parent_] = {};
14567
+ if (view === this.current_view) {
14568
+ if (!(parent_ in this.tree_states)) {
14569
+ this.tree_states[parent_] = {};
14570
+ }
14571
+ this.tree_states[parent_][view.children_field || null] = [
14572
+ paths, selected_paths];
14567
14573
  }
14568
- this.tree_states[parent_][view.children_field || null] = [
14569
- paths, selected_paths];
14570
14574
  if (store && parseInt(view.attributes.tree_state, 10)) {
14571
14575
  var tree_state_model = new Sao.Model(
14572
14576
  'ir.ui.view_tree_state');
@@ -14914,8 +14918,8 @@ function eval_pyson(value){
14914
14918
  return;
14915
14919
  }
14916
14920
 
14917
- if (attributes.loading == 'eager') {
14918
- this.field_attrs[name].loading = 'eager';
14921
+ if (attributes.visible) {
14922
+ this.field_attrs[name].visible = true;
14919
14923
  }
14920
14924
 
14921
14925
  var WidgetFactory = Sao.View.FormXMLViewParser.WIDGETS[
@@ -19343,10 +19347,14 @@ function eval_pyson(value){
19343
19347
  var editable = !this.text.prop('readonly');
19344
19348
  if (evt.which == Sao.common.F3_KEYCODE && editable) {
19345
19349
  evt.preventDefault();
19346
- this.new_();
19350
+ this.select();
19347
19351
  } else if (evt.which == Sao.common.F2_KEYCODE) {
19348
19352
  evt.preventDefault();
19349
- this.open();
19353
+ if (this.filename) {
19354
+ this.open();
19355
+ } else {
19356
+ this.save_as();
19357
+ }
19350
19358
  }
19351
19359
  },
19352
19360
  set_value: function() {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tryton-sao",
3
3
  "title": "sao",
4
4
  "description": "Tryton webclient",
5
- "version": "7.2.13",
5
+ "version": "7.2.15",
6
6
  "homepage": "http://www.tryton.org/",
7
7
  "author": {
8
8
  "name": "Tryton"
package/src/model.js CHANGED
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  function get_x2m_sub_fields(f_attrs, prefix) {
7
- if (f_attrs.loading == 'eager' && f_attrs.views) {
7
+ if (f_attrs.visible && f_attrs.views) {
8
8
  // There's only one key but we don't know its value
9
9
  const [[, view],] = Object.entries(f_attrs.views);
10
10
 
package/src/sao.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.2.13',
6
+ __version__: '7.2.15',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
package/src/sao.less CHANGED
@@ -806,6 +806,10 @@ img.icon {
806
806
  }
807
807
  input {
808
808
  min-width: 12ch;
809
+
810
+ &[type='file'] {
811
+ min-width: unset;
812
+ }
809
813
  }
810
814
  }
811
815
 
package/src/screen.js CHANGED
@@ -2164,7 +2164,9 @@
2164
2164
  }
2165
2165
  }
2166
2166
  }
2167
- if ((this.views.length == 1) && this.current_record) {
2167
+ }
2168
+ if ((view === this.current_view) && (view.view_type == 'form')) {
2169
+ if (this.current_record) {
2168
2170
  if (!(parent_ in this.tree_states)) {
2169
2171
  this.tree_states[parent_] = {};
2170
2172
  }
@@ -2180,11 +2182,13 @@
2180
2182
  paths = [];
2181
2183
  }
2182
2184
  var selected_paths = view.get_selected_paths();
2183
- if (!(parent_ in this.tree_states)) {
2184
- this.tree_states[parent_] = {};
2185
+ if (view === this.current_view) {
2186
+ if (!(parent_ in this.tree_states)) {
2187
+ this.tree_states[parent_] = {};
2188
+ }
2189
+ this.tree_states[parent_][view.children_field || null] = [
2190
+ paths, selected_paths];
2185
2191
  }
2186
- this.tree_states[parent_][view.children_field || null] = [
2187
- paths, selected_paths];
2188
2192
  if (store && parseInt(view.attributes.tree_state, 10)) {
2189
2193
  var tree_state_model = new Sao.Model(
2190
2194
  'ir.ui.view_tree_state');
package/src/view/form.js CHANGED
@@ -63,8 +63,8 @@ function eval_pyson(value){
63
63
  return;
64
64
  }
65
65
 
66
- if (attributes.loading == 'eager') {
67
- this.field_attrs[name].loading = 'eager';
66
+ if (attributes.visible) {
67
+ this.field_attrs[name].visible = true;
68
68
  }
69
69
 
70
70
  var WidgetFactory = Sao.View.FormXMLViewParser.WIDGETS[
@@ -4492,10 +4492,14 @@ function eval_pyson(value){
4492
4492
  var editable = !this.text.prop('readonly');
4493
4493
  if (evt.which == Sao.common.F3_KEYCODE && editable) {
4494
4494
  evt.preventDefault();
4495
- this.new_();
4495
+ this.select();
4496
4496
  } else if (evt.which == Sao.common.F2_KEYCODE) {
4497
4497
  evt.preventDefault();
4498
- this.open();
4498
+ if (this.filename) {
4499
+ this.open();
4500
+ } else {
4501
+ this.save_as();
4502
+ }
4499
4503
  }
4500
4504
  },
4501
4505
  set_value: function() {