tryton-sao 6.8.3 → 6.8.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 +10 -0
- package/dist/tryton-sao.css +7 -7
- package/dist/tryton-sao.js +43 -22
- package/dist/tryton-sao.min.css +7 -7
- package/dist/tryton-sao.min.js +2 -2
- package/package.json +1 -1
- package/src/common.js +1 -1
- package/src/model.js +17 -8
- package/src/sao.js +10 -6
- package/src/sao.less +7 -4
- package/src/screen.js +8 -5
- package/src/session.js +1 -1
- package/src/view/form.js +1 -1
- package/src/view/tree.js +5 -0
package/CHANGELOG
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
Version 6.8.5 - 2023-12-01
|
|
3
|
+
--------------------------
|
|
4
|
+
* Bug fixes (see mercurial logs for details)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Version 6.8.4 - 2023-11-03
|
|
8
|
+
--------------------------
|
|
9
|
+
* Bug fixes (see mercurial logs for details)
|
|
10
|
+
|
|
11
|
+
|
|
2
12
|
Version 6.8.3 - 2023-10-04
|
|
3
13
|
--------------------------
|
|
4
14
|
* Bug fixes (see mercurial logs for details)
|
package/dist/tryton-sao.css
CHANGED
|
@@ -9598,16 +9598,15 @@ img.icon {
|
|
|
9598
9598
|
.treeview > table.tree col.optional {
|
|
9599
9599
|
width: 30px;
|
|
9600
9600
|
}
|
|
9601
|
-
.treeview > table.tree td.draggable-handle,
|
|
9602
|
-
.treeview > table.tree td.optional {
|
|
9603
|
-
cursor: grab;
|
|
9604
|
-
}
|
|
9605
9601
|
.treeview > table.tree td.draggable-handle > img,
|
|
9606
9602
|
.treeview > table.tree td.optional > img {
|
|
9607
9603
|
display: block;
|
|
9608
9604
|
margin-right: auto;
|
|
9609
9605
|
margin-left: auto;
|
|
9610
9606
|
}
|
|
9607
|
+
.treeview > table.tree td.draggable-handle {
|
|
9608
|
+
cursor: grab;
|
|
9609
|
+
}
|
|
9611
9610
|
.treeview > table.tree th.selection-state > input,
|
|
9612
9611
|
.treeview > table.tree td.selection-state > input {
|
|
9613
9612
|
display: block;
|
|
@@ -9788,12 +9787,13 @@ img.icon {
|
|
|
9788
9787
|
}
|
|
9789
9788
|
.treeview .expander > img {
|
|
9790
9789
|
float: left;
|
|
9791
|
-
margin-right:
|
|
9792
|
-
width:
|
|
9790
|
+
margin-right: 1em;
|
|
9791
|
+
width: 1.42857143em;
|
|
9792
|
+
height: 1.42857143em;
|
|
9793
9793
|
}
|
|
9794
9794
|
[dir="rtl"] .treeview .expander > img {
|
|
9795
9795
|
float: right;
|
|
9796
|
-
margin-left:
|
|
9796
|
+
margin-left: 1em;
|
|
9797
9797
|
}
|
|
9798
9798
|
.treeview label {
|
|
9799
9799
|
font-weight: normal;
|
package/dist/tryton-sao.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
2
2
|
this repository contains the full copyright notices and license terms. */
|
|
3
3
|
var Sao = {
|
|
4
|
-
__version__: '6.8.
|
|
4
|
+
__version__: '6.8.5',
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
(function() {
|
|
@@ -778,11 +778,14 @@ var Sao = {
|
|
|
778
778
|
|
|
779
779
|
Sao.main_menu_row_activate = function() {
|
|
780
780
|
var screen = Sao.main_menu_screen;
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
'
|
|
785
|
-
|
|
781
|
+
const id = screen.get_id();
|
|
782
|
+
if (id) {
|
|
783
|
+
// ids is not defined to prevent to add suffix
|
|
784
|
+
Sao.Action.exec_keyword('tree_open', {
|
|
785
|
+
'model': screen.model_name,
|
|
786
|
+
'id': screen.get_id(),
|
|
787
|
+
}, null, false);
|
|
788
|
+
}
|
|
786
789
|
};
|
|
787
790
|
|
|
788
791
|
Sao.menu = function(preferences) {
|
|
@@ -824,6 +827,7 @@ var Sao = {
|
|
|
824
827
|
view.table.removeClass('table table-bordered');
|
|
825
828
|
view.table.addClass('no-responsive');
|
|
826
829
|
view.table.find('thead').hide();
|
|
830
|
+
view.table.find('colgroup > col.tree-menu').css('width', 0);
|
|
827
831
|
var gs = new Sao.GlobalSearch();
|
|
828
832
|
jQuery('#global-search').empty();
|
|
829
833
|
jQuery('#global-search').append(gs.el);
|
|
@@ -2731,7 +2735,7 @@ var Sao = {
|
|
|
2731
2735
|
'sao_device_cookies', JSON.stringify(device_cookies));
|
|
2732
2736
|
});
|
|
2733
2737
|
renew_prm.fail(() => {
|
|
2734
|
-
Sao.error("Cannot renew device cookie");
|
|
2738
|
+
Sao.Logger.error("Cannot renew device cookie");
|
|
2735
2739
|
});
|
|
2736
2740
|
}
|
|
2737
2741
|
});
|
|
@@ -6290,7 +6294,7 @@ var Sao = {
|
|
|
6290
6294
|
return img_url;
|
|
6291
6295
|
})
|
|
6292
6296
|
.fail(() => {
|
|
6293
|
-
Sao.error("Unknown icon %s", icon_name);
|
|
6297
|
+
Sao.Logger.error("Unknown icon %s", icon_name);
|
|
6294
6298
|
});
|
|
6295
6299
|
}
|
|
6296
6300
|
});
|
|
@@ -7576,13 +7580,13 @@ var Sao = {
|
|
|
7576
7580
|
if (this.indexOf(record) < 0) {
|
|
7577
7581
|
this.splice(position, 0, record);
|
|
7578
7582
|
}
|
|
7579
|
-
for (var record_rm
|
|
7583
|
+
for (var record_rm of this.record_removed) {
|
|
7580
7584
|
if (record_rm.id == record.id) {
|
|
7581
7585
|
this.record_removed.splice(
|
|
7582
7586
|
this.record_removed.indexOf(record_rm), 1);
|
|
7583
7587
|
}
|
|
7584
7588
|
}
|
|
7585
|
-
for (var record_del
|
|
7589
|
+
for (var record_del of this.record_deleted) {
|
|
7586
7590
|
if (record_del.id == record.id) {
|
|
7587
7591
|
this.record_deleted.splice(
|
|
7588
7592
|
this.record_deleted.indexOf(record_del), 1);
|
|
@@ -8276,10 +8280,13 @@ var Sao = {
|
|
|
8276
8280
|
(field instanceof Sao.field.Reference)) {
|
|
8277
8281
|
related = name + '.';
|
|
8278
8282
|
this._values[related] = values[related] || {};
|
|
8279
|
-
} else if (
|
|
8280
|
-
(name + ':string' in values)){
|
|
8283
|
+
} else if (field instanceof Sao.field.Selection) {
|
|
8281
8284
|
related = name + ':string';
|
|
8282
|
-
|
|
8285
|
+
if (name + ':string' in values) {
|
|
8286
|
+
this._values[related] = values[related];
|
|
8287
|
+
} else {
|
|
8288
|
+
delete this._values[related];
|
|
8289
|
+
}
|
|
8283
8290
|
}
|
|
8284
8291
|
this.model.fields[name].set(this, value);
|
|
8285
8292
|
this._loaded[name] = true;
|
|
@@ -8445,7 +8452,7 @@ var Sao = {
|
|
|
8445
8452
|
get_eval: function() {
|
|
8446
8453
|
var value = {};
|
|
8447
8454
|
for (var key in this.model.fields) {
|
|
8448
|
-
if (!this.
|
|
8455
|
+
if (!this._loaded.hasOwnProperty(key) && this.id >= 0)
|
|
8449
8456
|
continue;
|
|
8450
8457
|
value[key] = this.model.fields[key].get_eval(this);
|
|
8451
8458
|
}
|
|
@@ -9200,10 +9207,16 @@ var Sao = {
|
|
|
9200
9207
|
});
|
|
9201
9208
|
|
|
9202
9209
|
Sao.field.Selection = Sao.class_(Sao.field.Field, {
|
|
9203
|
-
_default: null
|
|
9210
|
+
_default: null,
|
|
9211
|
+
set_client: function(record, value, force_change) {
|
|
9212
|
+
// delete before trigger the display
|
|
9213
|
+
delete record._values[this.name + ':string'];
|
|
9214
|
+
Sao.field.Selection._super.set_client.call(
|
|
9215
|
+
this, record, value, force_change);
|
|
9216
|
+
}
|
|
9204
9217
|
});
|
|
9205
9218
|
|
|
9206
|
-
Sao.field.MultiSelection = Sao.class_(Sao.field.
|
|
9219
|
+
Sao.field.MultiSelection = Sao.class_(Sao.field.Selection, {
|
|
9207
9220
|
_default: null,
|
|
9208
9221
|
get: function(record) {
|
|
9209
9222
|
var value = Sao.field.MultiSelection._super.get.call(this, record);
|
|
@@ -13458,11 +13471,14 @@ var Sao = {
|
|
|
13458
13471
|
default_row_activate: function() {
|
|
13459
13472
|
if ((this.current_view.view_type == 'tree') &&
|
|
13460
13473
|
(this.current_view.attributes.keyword_open == 1)) {
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
'
|
|
13464
|
-
|
|
13465
|
-
|
|
13474
|
+
const id = this.get_id();
|
|
13475
|
+
if (id) {
|
|
13476
|
+
Sao.Action.exec_keyword('tree_open', {
|
|
13477
|
+
'model': this.model_name,
|
|
13478
|
+
'id': this.get_id(),
|
|
13479
|
+
'ids': [this.get_id()]
|
|
13480
|
+
}, this.local_context, false);
|
|
13481
|
+
}
|
|
13466
13482
|
} else {
|
|
13467
13483
|
if (!this.modified()) {
|
|
13468
13484
|
this.switch_view('form');
|
|
@@ -15288,7 +15304,7 @@ function eval_pyson(value){
|
|
|
15288
15304
|
hide: function() {
|
|
15289
15305
|
Sao.View.Form.Page._super.hide.call(this);
|
|
15290
15306
|
if (this.el.hasClass('active')) {
|
|
15291
|
-
this.el.
|
|
15307
|
+
this.el.siblings(':visible').first().find('a').tab('show');
|
|
15292
15308
|
}
|
|
15293
15309
|
}
|
|
15294
15310
|
});
|
|
@@ -21340,6 +21356,11 @@ function eval_pyson(value){
|
|
|
21340
21356
|
this.expander.children().html(' ');
|
|
21341
21357
|
this.expander.on('click keypress',
|
|
21342
21358
|
Sao.common.click_press(this.toggle_row.bind(this)));
|
|
21359
|
+
this.expander.dblclick((evt) => {
|
|
21360
|
+
// prevent calling switch_row on td
|
|
21361
|
+
evt.preventDefault();
|
|
21362
|
+
evt.stopImmediatePropagation();
|
|
21363
|
+
});
|
|
21343
21364
|
}
|
|
21344
21365
|
|
|
21345
21366
|
for (var i = 0; i < this.tree.columns.length; i++) {
|
package/dist/tryton-sao.min.css
CHANGED
|
@@ -9598,16 +9598,15 @@ img.icon {
|
|
|
9598
9598
|
.treeview > table.tree col.optional {
|
|
9599
9599
|
width: 30px;
|
|
9600
9600
|
}
|
|
9601
|
-
.treeview > table.tree td.draggable-handle,
|
|
9602
|
-
.treeview > table.tree td.optional {
|
|
9603
|
-
cursor: grab;
|
|
9604
|
-
}
|
|
9605
9601
|
.treeview > table.tree td.draggable-handle > img,
|
|
9606
9602
|
.treeview > table.tree td.optional > img {
|
|
9607
9603
|
display: block;
|
|
9608
9604
|
margin-right: auto;
|
|
9609
9605
|
margin-left: auto;
|
|
9610
9606
|
}
|
|
9607
|
+
.treeview > table.tree td.draggable-handle {
|
|
9608
|
+
cursor: grab;
|
|
9609
|
+
}
|
|
9611
9610
|
.treeview > table.tree th.selection-state > input,
|
|
9612
9611
|
.treeview > table.tree td.selection-state > input {
|
|
9613
9612
|
display: block;
|
|
@@ -9788,12 +9787,13 @@ img.icon {
|
|
|
9788
9787
|
}
|
|
9789
9788
|
.treeview .expander > img {
|
|
9790
9789
|
float: left;
|
|
9791
|
-
margin-right:
|
|
9792
|
-
width:
|
|
9790
|
+
margin-right: 1em;
|
|
9791
|
+
width: 1.42857143em;
|
|
9792
|
+
height: 1.42857143em;
|
|
9793
9793
|
}
|
|
9794
9794
|
[dir="rtl"] .treeview .expander > img {
|
|
9795
9795
|
float: right;
|
|
9796
|
-
margin-left:
|
|
9796
|
+
margin-left: 1em;
|
|
9797
9797
|
}
|
|
9798
9798
|
.treeview label {
|
|
9799
9799
|
font-weight: normal;
|