tryton-sao 7.4.3 → 7.4.5

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.4.5 - 2025-02-16
3
+ --------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 7.4.4 - 2025-01-16
8
+ --------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 7.4.3 - 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
@@ -10100,6 +10100,16 @@ img.icon {
10100
10100
  .board .form-binary input {
10101
10101
  min-width: 12ch;
10102
10102
  }
10103
+ .form .form-many2one input[type='file'],
10104
+ .board .form-many2one input[type='file'],
10105
+ .form .form-one2one input[type='file'],
10106
+ .board .form-one2one input[type='file'],
10107
+ .form .form-reference input[type='file'],
10108
+ .board .form-reference input[type='file'],
10109
+ .form .form-binary input[type='file'],
10110
+ .board .form-binary input[type='file'] {
10111
+ min-width: unset;
10112
+ }
10103
10113
  @media screen and (min-width: 768px) {
10104
10114
  .form .form-reference > .input-sm,
10105
10115
  .board .form-reference > .input-sm,
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.4.3',
6
+ __version__: '7.4.5',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -7703,7 +7703,7 @@ var Sao = {
7703
7703
  'use strict';
7704
7704
 
7705
7705
  function get_x2m_sub_fields(f_attrs, prefix) {
7706
- if (f_attrs.loading == 'eager' && f_attrs.views) {
7706
+ if (f_attrs.visible && f_attrs.views) {
7707
7707
  // There's only one key but we don't know its value
7708
7708
  const [[, view],] = Object.entries(f_attrs.views);
7709
7709
 
@@ -14574,7 +14574,9 @@ var Sao = {
14574
14574
  }
14575
14575
  }
14576
14576
  }
14577
- if ((this.views.length == 1) && this.current_record) {
14577
+ }
14578
+ if ((view === this.current_view) && (view.view_type == 'form')) {
14579
+ if (this.current_record) {
14578
14580
  if (!(parent_ in this.tree_states)) {
14579
14581
  this.tree_states[parent_] = {};
14580
14582
  }
@@ -14590,11 +14592,13 @@ var Sao = {
14590
14592
  paths = [];
14591
14593
  }
14592
14594
  var selected_paths = view.get_selected_paths();
14593
- if (!(parent_ in this.tree_states)) {
14594
- this.tree_states[parent_] = {};
14595
+ if (view === this.current_view) {
14596
+ if (!(parent_ in this.tree_states)) {
14597
+ this.tree_states[parent_] = {};
14598
+ }
14599
+ this.tree_states[parent_][view.children_field || null] = [
14600
+ paths, selected_paths];
14595
14601
  }
14596
- this.tree_states[parent_][view.children_field || null] = [
14597
- paths, selected_paths];
14598
14602
  if (store && parseInt(view.attributes.tree_state, 10)) {
14599
14603
  var tree_state_model = new Sao.Model(
14600
14604
  'ir.ui.view_tree_state');
@@ -14942,8 +14946,8 @@ function eval_pyson(value){
14942
14946
  return;
14943
14947
  }
14944
14948
 
14945
- if (attributes.loading == 'eager') {
14946
- this.field_attrs[name].loading = 'eager';
14949
+ if (attributes.visible) {
14950
+ this.field_attrs[name].visible = true;
14947
14951
  }
14948
14952
 
14949
14953
  var WidgetFactory = Sao.View.FormXMLViewParser.WIDGETS[
@@ -19468,10 +19472,14 @@ function eval_pyson(value){
19468
19472
  var editable = !this.text.prop('readonly');
19469
19473
  if (evt.which == Sao.common.F3_KEYCODE && editable) {
19470
19474
  evt.preventDefault();
19471
- this.new_();
19475
+ this.select();
19472
19476
  } else if (evt.which == Sao.common.F2_KEYCODE) {
19473
19477
  evt.preventDefault();
19474
- this.open();
19478
+ if (this.filename) {
19479
+ this.open();
19480
+ } else {
19481
+ this.save_as();
19482
+ }
19475
19483
  }
19476
19484
  },
19477
19485
  set_value: function() {
@@ -19484,7 +19492,7 @@ function eval_pyson(value){
19484
19492
  Sao.View.Form.Binary._super.set_readonly.call(this, readonly);
19485
19493
  var record = this.record;
19486
19494
  this.but_select.toggleClass('disabled', readonly || !record);
19487
- this.input_select.toggle(!readonly && record);
19495
+ this.input_select.toggle(!readonly && Boolean(record));
19488
19496
  this.but_clear.prop('disabled', readonly || !record);
19489
19497
  if (this.text) {
19490
19498
  this.text.prop('readonly', readonly);
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.4.3",
5
+ "version": "7.4.5",
6
6
  "homepage": "https://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.4.3',
6
+ __version__: '7.4.5',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
package/src/sao.less CHANGED
@@ -877,6 +877,10 @@ img.icon {
877
877
  }
878
878
  input {
879
879
  min-width: 12ch;
880
+
881
+ &[type='file'] {
882
+ min-width: unset;
883
+ }
880
884
  }
881
885
  }
882
886
 
package/src/screen.js CHANGED
@@ -2165,7 +2165,9 @@
2165
2165
  }
2166
2166
  }
2167
2167
  }
2168
- if ((this.views.length == 1) && this.current_record) {
2168
+ }
2169
+ if ((view === this.current_view) && (view.view_type == 'form')) {
2170
+ if (this.current_record) {
2169
2171
  if (!(parent_ in this.tree_states)) {
2170
2172
  this.tree_states[parent_] = {};
2171
2173
  }
@@ -2181,11 +2183,13 @@
2181
2183
  paths = [];
2182
2184
  }
2183
2185
  var selected_paths = view.get_selected_paths();
2184
- if (!(parent_ in this.tree_states)) {
2185
- this.tree_states[parent_] = {};
2186
+ if (view === this.current_view) {
2187
+ if (!(parent_ in this.tree_states)) {
2188
+ this.tree_states[parent_] = {};
2189
+ }
2190
+ this.tree_states[parent_][view.children_field || null] = [
2191
+ paths, selected_paths];
2186
2192
  }
2187
- this.tree_states[parent_][view.children_field || null] = [
2188
- paths, selected_paths];
2189
2193
  if (store && parseInt(view.attributes.tree_state, 10)) {
2190
2194
  var tree_state_model = new Sao.Model(
2191
2195
  '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[
@@ -4589,10 +4589,14 @@ function eval_pyson(value){
4589
4589
  var editable = !this.text.prop('readonly');
4590
4590
  if (evt.which == Sao.common.F3_KEYCODE && editable) {
4591
4591
  evt.preventDefault();
4592
- this.new_();
4592
+ this.select();
4593
4593
  } else if (evt.which == Sao.common.F2_KEYCODE) {
4594
4594
  evt.preventDefault();
4595
- this.open();
4595
+ if (this.filename) {
4596
+ this.open();
4597
+ } else {
4598
+ this.save_as();
4599
+ }
4596
4600
  }
4597
4601
  },
4598
4602
  set_value: function() {
@@ -4605,7 +4609,7 @@ function eval_pyson(value){
4605
4609
  Sao.View.Form.Binary._super.set_readonly.call(this, readonly);
4606
4610
  var record = this.record;
4607
4611
  this.but_select.toggleClass('disabled', readonly || !record);
4608
- this.input_select.toggle(!readonly && record);
4612
+ this.input_select.toggle(!readonly && Boolean(record));
4609
4613
  this.but_clear.prop('disabled', readonly || !record);
4610
4614
  if (this.text) {
4611
4615
  this.text.prop('readonly', readonly);