tryton-sao 7.8.7 → 7.8.8
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 +27 -8
- 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 +3 -1
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.8.
|
|
6
|
+
__version__: '7.8.8',
|
|
7
7
|
};
|
|
8
8
|
/* eslint-enable no-redeclare */
|
|
9
9
|
|
|
@@ -2986,6 +2986,7 @@ var Sao = {
|
|
|
2986
2986
|
if (service_window.closed) {
|
|
2987
2987
|
window.clearInterval(timer);
|
|
2988
2988
|
session.database = database;
|
|
2989
|
+
session.login = null;
|
|
2989
2990
|
session.restore();
|
|
2990
2991
|
if (session.session) {
|
|
2991
2992
|
dfd.resolve(session);
|
|
@@ -3204,6 +3205,9 @@ var Sao = {
|
|
|
3204
3205
|
});
|
|
3205
3206
|
}).prependTo(dialog.footer);
|
|
3206
3207
|
dialog.modal.find('.modal-dialog').removeClass('modal-sm');
|
|
3208
|
+
prm.fail(() => {
|
|
3209
|
+
session.login = null;
|
|
3210
|
+
});
|
|
3207
3211
|
return dialog;
|
|
3208
3212
|
},
|
|
3209
3213
|
});
|
|
@@ -5389,6 +5393,7 @@ var Sao = {
|
|
|
5389
5393
|
let [, thousandSeparator] = /^10(.)?000/.exec(format(10000));
|
|
5390
5394
|
let [, decimalSign] = /^0(.)1$/.exec(format(0.1));
|
|
5391
5395
|
return Number(string
|
|
5396
|
+
.replaceAll(' ', '')
|
|
5392
5397
|
.replaceAll(thousandSeparator, '')
|
|
5393
5398
|
.replace(decimalSign, '.'));
|
|
5394
5399
|
}
|
|
@@ -10372,10 +10377,7 @@ var Sao = {
|
|
|
10372
10377
|
if (record2) {
|
|
10373
10378
|
let to_update = Object.fromEntries(
|
|
10374
10379
|
Object.entries(vals).filter(
|
|
10375
|
-
([k, v]) =>
|
|
10376
|
-
!Object.prototype.hasOwnProperty.call(
|
|
10377
|
-
vals_to_set, k)
|
|
10378
|
-
}
|
|
10380
|
+
([k, v]) => !Object.hasOwn(vals_to_set, k)
|
|
10379
10381
|
));
|
|
10380
10382
|
record2.set_on_change(to_update);
|
|
10381
10383
|
}
|
|
@@ -10954,6 +10956,8 @@ var Sao = {
|
|
|
10954
10956
|
if (this.info_bar) {
|
|
10955
10957
|
this.el.append(this.info_bar.el);
|
|
10956
10958
|
}
|
|
10959
|
+
|
|
10960
|
+
this._chat = null;
|
|
10957
10961
|
},
|
|
10958
10962
|
set_menu: function(menu) {
|
|
10959
10963
|
var previous;
|
|
@@ -11163,6 +11167,9 @@ var Sao = {
|
|
|
11163
11167
|
tabs.trigger('ready');
|
|
11164
11168
|
if (this._chat) {
|
|
11165
11169
|
this._chat.unregister();
|
|
11170
|
+
let chat = this.sidebar_content.find('.chat');
|
|
11171
|
+
chat.remove();
|
|
11172
|
+
this._chat = null;
|
|
11166
11173
|
}
|
|
11167
11174
|
});
|
|
11168
11175
|
},
|
|
@@ -11759,6 +11766,8 @@ var Sao = {
|
|
|
11759
11766
|
}
|
|
11760
11767
|
return set_cursor;
|
|
11761
11768
|
});
|
|
11769
|
+
} else {
|
|
11770
|
+
this.refresh_resources(true);
|
|
11762
11771
|
}
|
|
11763
11772
|
return set_cursor;
|
|
11764
11773
|
})
|
|
@@ -12222,6 +12231,8 @@ var Sao = {
|
|
|
12222
12231
|
let chat = this.sidebar_content.find('.chat');
|
|
12223
12232
|
if (chat.length) {
|
|
12224
12233
|
chat.remove();
|
|
12234
|
+
this._chat.unregister()
|
|
12235
|
+
this._chat = null;
|
|
12225
12236
|
} else {
|
|
12226
12237
|
if (this.screen.current_reference) {
|
|
12227
12238
|
this._chat = new Sao.Chat(this.screen.current_reference);
|
|
@@ -13105,8 +13116,14 @@ var Sao = {
|
|
|
13105
13116
|
break;
|
|
13106
13117
|
case 'selection':
|
|
13107
13118
|
case 'multiselection':
|
|
13119
|
+
var selection = jQuery.extend([], field.selection);
|
|
13120
|
+
if (field.sort === undefined || field.sort) {
|
|
13121
|
+
selection.sort(function(a, b) {
|
|
13122
|
+
return a[1].localeCompare(b[1]);
|
|
13123
|
+
});
|
|
13124
|
+
}
|
|
13108
13125
|
entry = new Sao.ScreenContainer.Selection(
|
|
13109
|
-
|
|
13126
|
+
selection, prefix + field.name);
|
|
13110
13127
|
input = entry.el;
|
|
13111
13128
|
input.prop('size', field.selection.length);
|
|
13112
13129
|
break;
|
|
@@ -14736,7 +14753,7 @@ var Sao = {
|
|
|
14736
14753
|
if (this.current_view &&
|
|
14737
14754
|
~['tree', 'graph', 'calendar'].indexOf(this.current_view.view_type) &&
|
|
14738
14755
|
!this.group.parent) {
|
|
14739
|
-
return this.search_filter();
|
|
14756
|
+
return this.search_filter(this.screen_container.get_text());
|
|
14740
14757
|
}
|
|
14741
14758
|
} else if (action == 'reload menu') {
|
|
14742
14759
|
return Sao.Session.current_session.reload_context()
|
|
@@ -21490,6 +21507,8 @@ function eval_pyson(value){
|
|
|
21490
21507
|
'reset_width',
|
|
21491
21508
|
[this.screen.model_name, window.screen.width],
|
|
21492
21509
|
{});
|
|
21510
|
+
Sao.Session.current_session.cache.clear(
|
|
21511
|
+
`model.${this.screen.model_name}.fields_view_get`);
|
|
21493
21512
|
|
|
21494
21513
|
for (let column of this.columns) {
|
|
21495
21514
|
if (column.col.data('default-width')) {
|
|
@@ -21539,7 +21558,7 @@ function eval_pyson(value){
|
|
|
21539
21558
|
|
|
21540
21559
|
let tree_column_width = (
|
|
21541
21560
|
Sao.Screen.tree_column_width[this.screen.model_name] || {});
|
|
21542
|
-
let width = tree_column_width[name];
|
|
21561
|
+
let width = tree_column_width[column.attributes.name];
|
|
21543
21562
|
if (width || column.attributes.width) {
|
|
21544
21563
|
if (!width) {
|
|
21545
21564
|
width = column.attributes.width;
|
package/package.json
CHANGED
package/src/common.js
CHANGED
|
@@ -2086,6 +2086,7 @@
|
|
|
2086
2086
|
let [, thousandSeparator] = /^10(.)?000/.exec(format(10000));
|
|
2087
2087
|
let [, decimalSign] = /^0(.)1$/.exec(format(0.1));
|
|
2088
2088
|
return Number(string
|
|
2089
|
+
.replaceAll(' ', '')
|
|
2089
2090
|
.replaceAll(thousandSeparator, '')
|
|
2090
2091
|
.replace(decimalSign, '.'));
|
|
2091
2092
|
}
|
package/src/model.js
CHANGED
|
@@ -2571,10 +2571,7 @@
|
|
|
2571
2571
|
if (record2) {
|
|
2572
2572
|
let to_update = Object.fromEntries(
|
|
2573
2573
|
Object.entries(vals).filter(
|
|
2574
|
-
([k, v]) =>
|
|
2575
|
-
!Object.prototype.hasOwnProperty.call(
|
|
2576
|
-
vals_to_set, k)
|
|
2577
|
-
}
|
|
2574
|
+
([k, v]) => !Object.hasOwn(vals_to_set, k)
|
|
2578
2575
|
));
|
|
2579
2576
|
record2.set_on_change(to_update);
|
|
2580
2577
|
}
|
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;
|
|
@@ -2132,7 +2138,7 @@
|
|
|
2132
2138
|
if (this.current_view &&
|
|
2133
2139
|
~['tree', 'graph', 'calendar'].indexOf(this.current_view.view_type) &&
|
|
2134
2140
|
!this.group.parent) {
|
|
2135
|
-
return this.search_filter();
|
|
2141
|
+
return this.search_filter(this.screen_container.get_text());
|
|
2136
2142
|
}
|
|
2137
2143
|
} else if (action == 'reload menu') {
|
|
2138
2144
|
return Sao.Session.current_session.reload_context()
|
package/src/session.js
CHANGED
|
@@ -346,6 +346,7 @@
|
|
|
346
346
|
if (service_window.closed) {
|
|
347
347
|
window.clearInterval(timer);
|
|
348
348
|
session.database = database;
|
|
349
|
+
session.login = null;
|
|
349
350
|
session.restore();
|
|
350
351
|
if (session.session) {
|
|
351
352
|
dfd.resolve(session);
|
|
@@ -564,6 +565,9 @@
|
|
|
564
565
|
});
|
|
565
566
|
}).prependTo(dialog.footer);
|
|
566
567
|
dialog.modal.find('.modal-dialog').removeClass('modal-sm');
|
|
568
|
+
prm.fail(() => {
|
|
569
|
+
session.login = null;
|
|
570
|
+
});
|
|
567
571
|
return dialog;
|
|
568
572
|
},
|
|
569
573
|
});
|
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
|
@@ -426,6 +426,8 @@
|
|
|
426
426
|
'reset_width',
|
|
427
427
|
[this.screen.model_name, window.screen.width],
|
|
428
428
|
{});
|
|
429
|
+
Sao.Session.current_session.cache.clear(
|
|
430
|
+
`model.${this.screen.model_name}.fields_view_get`);
|
|
429
431
|
|
|
430
432
|
for (let column of this.columns) {
|
|
431
433
|
if (column.col.data('default-width')) {
|
|
@@ -475,7 +477,7 @@
|
|
|
475
477
|
|
|
476
478
|
let tree_column_width = (
|
|
477
479
|
Sao.Screen.tree_column_width[this.screen.model_name] || {});
|
|
478
|
-
let width = tree_column_width[name];
|
|
480
|
+
let width = tree_column_width[column.attributes.name];
|
|
479
481
|
if (width || column.attributes.width) {
|
|
480
482
|
if (!width) {
|
|
481
483
|
width = column.attributes.width;
|