tryton-sao 7.6.18 → 7.6.19
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 +5 -0
- package/COPYRIGHT +1 -1
- package/dist/tryton-sao.js +26 -7
- package/package.json +1 -1
- package/src/common.js +1 -0
- package/src/model.js +1 -4
- package/src/sao.js +1 -1
- package/src/screen.js +8 -2
- package/src/session.js +4 -0
- package/src/tab.js +9 -0
- package/src/view/tree.js +2 -0
package/CHANGELOG
CHANGED
package/COPYRIGHT
CHANGED
package/dist/tryton-sao.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/* eslint-disable no-redeclare */
|
|
5
5
|
var Sao = {
|
|
6
|
-
__version__: '7.6.
|
|
6
|
+
__version__: '7.6.19',
|
|
7
7
|
};
|
|
8
8
|
/* eslint-enable no-redeclare */
|
|
9
9
|
|
|
@@ -3032,6 +3032,7 @@ var Sao = {
|
|
|
3032
3032
|
if (service_window.closed) {
|
|
3033
3033
|
window.clearInterval(timer);
|
|
3034
3034
|
session.database = database;
|
|
3035
|
+
session.login = null;
|
|
3035
3036
|
session.restore();
|
|
3036
3037
|
if (session.session) {
|
|
3037
3038
|
dfd.resolve(session);
|
|
@@ -3250,6 +3251,9 @@ var Sao = {
|
|
|
3250
3251
|
});
|
|
3251
3252
|
}).prependTo(dialog.footer);
|
|
3252
3253
|
dialog.modal.find('.modal-dialog').removeClass('modal-sm');
|
|
3254
|
+
prm.fail(() => {
|
|
3255
|
+
session.login = null;
|
|
3256
|
+
});
|
|
3253
3257
|
return dialog;
|
|
3254
3258
|
},
|
|
3255
3259
|
});
|
|
@@ -5436,6 +5440,7 @@ var Sao = {
|
|
|
5436
5440
|
let [, thousandSeparator] = /^10(.)?000/.exec(format(10000));
|
|
5437
5441
|
let [, decimalSign] = /^0(.)1$/.exec(format(0.1));
|
|
5438
5442
|
return Number(string
|
|
5443
|
+
.replaceAll(' ', '')
|
|
5439
5444
|
.replaceAll(thousandSeparator, '')
|
|
5440
5445
|
.replace(decimalSign, '.'));
|
|
5441
5446
|
}
|
|
@@ -10405,10 +10410,7 @@ var Sao = {
|
|
|
10405
10410
|
if (record2) {
|
|
10406
10411
|
let to_update = Object.fromEntries(
|
|
10407
10412
|
Object.entries(vals).filter(
|
|
10408
|
-
([k, v]) =>
|
|
10409
|
-
!Object.prototype.hasOwnProperty.call(
|
|
10410
|
-
vals_to_set, k)
|
|
10411
|
-
}
|
|
10413
|
+
([k, v]) => !Object.hasOwn(vals_to_set, k)
|
|
10412
10414
|
));
|
|
10413
10415
|
record2.set_on_change(to_update);
|
|
10414
10416
|
}
|
|
@@ -10987,6 +10989,8 @@ var Sao = {
|
|
|
10987
10989
|
if (this.info_bar) {
|
|
10988
10990
|
this.el.append(this.info_bar.el);
|
|
10989
10991
|
}
|
|
10992
|
+
|
|
10993
|
+
this._chat = null;
|
|
10990
10994
|
},
|
|
10991
10995
|
set_menu: function(menu) {
|
|
10992
10996
|
var previous;
|
|
@@ -11196,6 +11200,9 @@ var Sao = {
|
|
|
11196
11200
|
tabs.trigger('ready');
|
|
11197
11201
|
if (this._chat) {
|
|
11198
11202
|
this._chat.unregister();
|
|
11203
|
+
let chat = this.sidebar_content.find('.chat');
|
|
11204
|
+
chat.remove();
|
|
11205
|
+
this._chat = null;
|
|
11199
11206
|
}
|
|
11200
11207
|
});
|
|
11201
11208
|
},
|
|
@@ -11792,6 +11799,8 @@ var Sao = {
|
|
|
11792
11799
|
}
|
|
11793
11800
|
return set_cursor;
|
|
11794
11801
|
});
|
|
11802
|
+
} else {
|
|
11803
|
+
this.refresh_resources(true);
|
|
11795
11804
|
}
|
|
11796
11805
|
return set_cursor;
|
|
11797
11806
|
})
|
|
@@ -12255,6 +12264,8 @@ var Sao = {
|
|
|
12255
12264
|
let chat = this.sidebar_content.find('.chat');
|
|
12256
12265
|
if (chat.length) {
|
|
12257
12266
|
chat.remove();
|
|
12267
|
+
this._chat.unregister()
|
|
12268
|
+
this._chat = null;
|
|
12258
12269
|
} else {
|
|
12259
12270
|
if (this.screen.current_reference) {
|
|
12260
12271
|
this._chat = new Sao.Chat(this.screen.current_reference);
|
|
@@ -13136,8 +13147,14 @@ var Sao = {
|
|
|
13136
13147
|
break;
|
|
13137
13148
|
case 'selection':
|
|
13138
13149
|
case 'multiselection':
|
|
13150
|
+
var selection = jQuery.extend([], field.selection);
|
|
13151
|
+
if (field.sort === undefined || field.sort) {
|
|
13152
|
+
selection.sort(function(a, b) {
|
|
13153
|
+
return a[1].localeCompare(b[1]);
|
|
13154
|
+
});
|
|
13155
|
+
}
|
|
13139
13156
|
entry = new Sao.ScreenContainer.Selection(
|
|
13140
|
-
|
|
13157
|
+
selection, prefix + field.name);
|
|
13141
13158
|
input = entry.el;
|
|
13142
13159
|
input.prop('size', field.selection.length);
|
|
13143
13160
|
break;
|
|
@@ -14763,7 +14780,7 @@ var Sao = {
|
|
|
14763
14780
|
if (this.current_view &&
|
|
14764
14781
|
~['tree', 'graph', 'calendar'].indexOf(this.current_view.view_type) &&
|
|
14765
14782
|
!this.group.parent) {
|
|
14766
|
-
return this.search_filter();
|
|
14783
|
+
return this.search_filter(this.screen_container.get_text());
|
|
14767
14784
|
}
|
|
14768
14785
|
} else if (action == 'reload menu') {
|
|
14769
14786
|
return Sao.Session.current_session.reload_context()
|
|
@@ -21533,6 +21550,8 @@ function eval_pyson(value){
|
|
|
21533
21550
|
'reset_width',
|
|
21534
21551
|
[this.screen.model_name, window.screen.width],
|
|
21535
21552
|
{});
|
|
21553
|
+
Sao.Session.current_session.cache.clear(
|
|
21554
|
+
`model.${this.screen.model_name}.fields_view_get`);
|
|
21536
21555
|
|
|
21537
21556
|
for (let column of this.columns) {
|
|
21538
21557
|
if (column.col.data('computed-width')) {
|
package/package.json
CHANGED
package/src/common.js
CHANGED
|
@@ -2087,6 +2087,7 @@
|
|
|
2087
2087
|
let [, thousandSeparator] = /^10(.)?000/.exec(format(10000));
|
|
2088
2088
|
let [, decimalSign] = /^0(.)1$/.exec(format(0.1));
|
|
2089
2089
|
return Number(string
|
|
2090
|
+
.replaceAll(' ', '')
|
|
2090
2091
|
.replaceAll(thousandSeparator, '')
|
|
2091
2092
|
.replace(decimalSign, '.'));
|
|
2092
2093
|
}
|
package/src/model.js
CHANGED
|
@@ -2570,10 +2570,7 @@
|
|
|
2570
2570
|
if (record2) {
|
|
2571
2571
|
let to_update = Object.fromEntries(
|
|
2572
2572
|
Object.entries(vals).filter(
|
|
2573
|
-
([k, v]) =>
|
|
2574
|
-
!Object.prototype.hasOwnProperty.call(
|
|
2575
|
-
vals_to_set, k)
|
|
2576
|
-
}
|
|
2573
|
+
([k, v]) => !Object.hasOwn(vals_to_set, k)
|
|
2577
2574
|
));
|
|
2578
2575
|
record2.set_on_change(to_update);
|
|
2579
2576
|
}
|
package/src/sao.js
CHANGED
package/src/screen.js
CHANGED
|
@@ -501,8 +501,14 @@
|
|
|
501
501
|
break;
|
|
502
502
|
case 'selection':
|
|
503
503
|
case 'multiselection':
|
|
504
|
+
var selection = jQuery.extend([], field.selection);
|
|
505
|
+
if (field.sort === undefined || field.sort) {
|
|
506
|
+
selection.sort(function(a, b) {
|
|
507
|
+
return a[1].localeCompare(b[1]);
|
|
508
|
+
});
|
|
509
|
+
}
|
|
504
510
|
entry = new Sao.ScreenContainer.Selection(
|
|
505
|
-
|
|
511
|
+
selection, prefix + field.name);
|
|
506
512
|
input = entry.el;
|
|
507
513
|
input.prop('size', field.selection.length);
|
|
508
514
|
break;
|
|
@@ -2128,7 +2134,7 @@
|
|
|
2128
2134
|
if (this.current_view &&
|
|
2129
2135
|
~['tree', 'graph', 'calendar'].indexOf(this.current_view.view_type) &&
|
|
2130
2136
|
!this.group.parent) {
|
|
2131
|
-
return this.search_filter();
|
|
2137
|
+
return this.search_filter(this.screen_container.get_text());
|
|
2132
2138
|
}
|
|
2133
2139
|
} else if (action == 'reload menu') {
|
|
2134
2140
|
return Sao.Session.current_session.reload_context()
|
package/src/session.js
CHANGED
|
@@ -341,6 +341,7 @@
|
|
|
341
341
|
if (service_window.closed) {
|
|
342
342
|
window.clearInterval(timer);
|
|
343
343
|
session.database = database;
|
|
344
|
+
session.login = null;
|
|
344
345
|
session.restore();
|
|
345
346
|
if (session.session) {
|
|
346
347
|
dfd.resolve(session);
|
|
@@ -559,6 +560,9 @@
|
|
|
559
560
|
});
|
|
560
561
|
}).prependTo(dialog.footer);
|
|
561
562
|
dialog.modal.find('.modal-dialog').removeClass('modal-sm');
|
|
563
|
+
prm.fail(() => {
|
|
564
|
+
session.login = null;
|
|
565
|
+
});
|
|
562
566
|
return dialog;
|
|
563
567
|
},
|
|
564
568
|
});
|
package/src/tab.js
CHANGED
|
@@ -141,6 +141,8 @@
|
|
|
141
141
|
if (this.info_bar) {
|
|
142
142
|
this.el.append(this.info_bar.el);
|
|
143
143
|
}
|
|
144
|
+
|
|
145
|
+
this._chat = null;
|
|
144
146
|
},
|
|
145
147
|
set_menu: function(menu) {
|
|
146
148
|
var previous;
|
|
@@ -350,6 +352,9 @@
|
|
|
350
352
|
tabs.trigger('ready');
|
|
351
353
|
if (this._chat) {
|
|
352
354
|
this._chat.unregister();
|
|
355
|
+
let chat = this.sidebar_content.find('.chat');
|
|
356
|
+
chat.remove();
|
|
357
|
+
this._chat = null;
|
|
353
358
|
}
|
|
354
359
|
});
|
|
355
360
|
},
|
|
@@ -946,6 +951,8 @@
|
|
|
946
951
|
}
|
|
947
952
|
return set_cursor;
|
|
948
953
|
});
|
|
954
|
+
} else {
|
|
955
|
+
this.refresh_resources(true);
|
|
949
956
|
}
|
|
950
957
|
return set_cursor;
|
|
951
958
|
})
|
|
@@ -1409,6 +1416,8 @@
|
|
|
1409
1416
|
let chat = this.sidebar_content.find('.chat');
|
|
1410
1417
|
if (chat.length) {
|
|
1411
1418
|
chat.remove();
|
|
1419
|
+
this._chat.unregister()
|
|
1420
|
+
this._chat = null;
|
|
1412
1421
|
} else {
|
|
1413
1422
|
if (this.screen.current_reference) {
|
|
1414
1423
|
this._chat = new Sao.Chat(this.screen.current_reference);
|
package/src/view/tree.js
CHANGED
|
@@ -447,6 +447,8 @@
|
|
|
447
447
|
'reset_width',
|
|
448
448
|
[this.screen.model_name, window.screen.width],
|
|
449
449
|
{});
|
|
450
|
+
Sao.Session.current_session.cache.clear(
|
|
451
|
+
`model.${this.screen.model_name}.fields_view_get`);
|
|
450
452
|
|
|
451
453
|
for (let column of this.columns) {
|
|
452
454
|
if (column.col.data('computed-width')) {
|