tryton-sao 7.8.11 → 7.8.12
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/dist/tryton-sao.css +8 -0
- package/dist/tryton-sao.js +57 -13
- package/package.json +1 -1
- package/src/sao.js +1 -1
- package/src/sao.less +8 -0
- package/src/screen.js +3 -0
- package/src/view/form.js +37 -10
- package/src/view/list_form.js +6 -0
- package/src/view/tree.js +7 -0
- package/src/window.js +3 -2
package/CHANGELOG
CHANGED
package/dist/tryton-sao.css
CHANGED
|
@@ -9534,6 +9534,10 @@ html[theme="default"] .carousel-caption h6 {
|
|
|
9534
9534
|
margin-bottom: -25px;
|
|
9535
9535
|
width: 15px;
|
|
9536
9536
|
}
|
|
9537
|
+
#user-preferences ul.notification-menu {
|
|
9538
|
+
background-color: #fff;
|
|
9539
|
+
color: #333333;
|
|
9540
|
+
}
|
|
9537
9541
|
@media (min-width: 768px) {
|
|
9538
9542
|
#user-preferences ul.notification-menu {
|
|
9539
9543
|
width: 320px;
|
|
@@ -9546,6 +9550,7 @@ html[theme="default"] .carousel-caption h6 {
|
|
|
9546
9550
|
background-color: #bceaeb;
|
|
9547
9551
|
}
|
|
9548
9552
|
#user-preferences ul.notification-menu > li.notification-item > a {
|
|
9553
|
+
color: #333333;
|
|
9549
9554
|
display: flex;
|
|
9550
9555
|
padding: 3px 10px;
|
|
9551
9556
|
}
|
|
@@ -9572,6 +9577,9 @@ html[theme="default"] .carousel-caption h6 {
|
|
|
9572
9577
|
text-align: center;
|
|
9573
9578
|
background-color: #f5f5f5;
|
|
9574
9579
|
}
|
|
9580
|
+
#user-preferences ul.notification-menu > li.divider {
|
|
9581
|
+
background-color: #e5e5e5;
|
|
9582
|
+
}
|
|
9575
9583
|
.attachment-preview {
|
|
9576
9584
|
border-bottom: 1px solid #eeeeee;
|
|
9577
9585
|
display: flex;
|
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.12',
|
|
7
7
|
};
|
|
8
8
|
/* eslint-enable no-redeclare */
|
|
9
9
|
|
|
@@ -13992,6 +13992,9 @@ var Sao = {
|
|
|
13992
13992
|
});
|
|
13993
13993
|
},
|
|
13994
13994
|
get current_record() {
|
|
13995
|
+
if (this.__current_record && this.__current_record.destroyed) {
|
|
13996
|
+
this.__current_record = null;
|
|
13997
|
+
}
|
|
13995
13998
|
return this.__current_record;
|
|
13996
13999
|
},
|
|
13997
14000
|
set current_record(record) {
|
|
@@ -15565,11 +15568,12 @@ function eval_pyson(value){
|
|
|
15565
15568
|
});
|
|
15566
15569
|
for (const e of fields) {
|
|
15567
15570
|
const name = e[0];
|
|
15568
|
-
|
|
15571
|
+
if (!record.is_loaded(name)) {
|
|
15572
|
+
promesses.push(record.load(name));
|
|
15573
|
+
}
|
|
15569
15574
|
}
|
|
15570
15575
|
}
|
|
15571
|
-
|
|
15572
|
-
.then(() => {
|
|
15576
|
+
let display = function() {
|
|
15573
15577
|
let promesses = [];
|
|
15574
15578
|
var record = this.record;
|
|
15575
15579
|
for (const name in this.widgets) {
|
|
@@ -15607,7 +15611,13 @@ function eval_pyson(value){
|
|
|
15607
15611
|
container.set_grid_template();
|
|
15608
15612
|
}
|
|
15609
15613
|
});
|
|
15610
|
-
});
|
|
15614
|
+
}.bind(this);
|
|
15615
|
+
if (promesses.length) {
|
|
15616
|
+
return jQuery.when.apply(jQuery, promesses).then(
|
|
15617
|
+
() => display());
|
|
15618
|
+
} else {
|
|
15619
|
+
return display();
|
|
15620
|
+
}
|
|
15611
15621
|
},
|
|
15612
15622
|
set_value: function() {
|
|
15613
15623
|
var record = this.record;
|
|
@@ -18703,7 +18713,11 @@ function eval_pyson(value){
|
|
|
18703
18713
|
},
|
|
18704
18714
|
set_readonly: function(readonly) {
|
|
18705
18715
|
Sao.View.Form.One2Many._super.set_readonly.call(this, readonly);
|
|
18706
|
-
this.prm.
|
|
18716
|
+
if (this.prm.state() == 'pending') {
|
|
18717
|
+
this.prm.done(() => this._set_button_sensitive());
|
|
18718
|
+
} else {
|
|
18719
|
+
this._set_button_sensitive();
|
|
18720
|
+
}
|
|
18707
18721
|
this._set_label_state();
|
|
18708
18722
|
},
|
|
18709
18723
|
set_required: function(required) {
|
|
@@ -18816,7 +18830,7 @@ function eval_pyson(value){
|
|
|
18816
18830
|
display: function() {
|
|
18817
18831
|
Sao.View.Form.One2Many._super.display.call(this);
|
|
18818
18832
|
|
|
18819
|
-
|
|
18833
|
+
let display = function() {
|
|
18820
18834
|
this._set_button_sensitive();
|
|
18821
18835
|
|
|
18822
18836
|
var record = this.record;
|
|
@@ -18863,7 +18877,13 @@ function eval_pyson(value){
|
|
|
18863
18877
|
.css('max-height', this.attributes.height + 'px');
|
|
18864
18878
|
}
|
|
18865
18879
|
return this.screen.display();
|
|
18866
|
-
});
|
|
18880
|
+
}.bind(this);
|
|
18881
|
+
|
|
18882
|
+
if (this.prm.state() == 'pending') {
|
|
18883
|
+
return this.prm.then(() => display());
|
|
18884
|
+
} else {
|
|
18885
|
+
return display();
|
|
18886
|
+
}
|
|
18867
18887
|
},
|
|
18868
18888
|
focus: function() {
|
|
18869
18889
|
if (this.attributes.add_remove) {
|
|
@@ -19140,7 +19160,11 @@ function eval_pyson(value){
|
|
|
19140
19160
|
}
|
|
19141
19161
|
var message = name + ' / ' + Sao.common.humanize(size);
|
|
19142
19162
|
this.label.text(message).attr('title', message);
|
|
19143
|
-
this.prm.
|
|
19163
|
+
if (this.prm.state() == 'pending') {
|
|
19164
|
+
this.prm.done(() => this._set_button_sensitive());
|
|
19165
|
+
} else {
|
|
19166
|
+
this._set_button_sensitive();
|
|
19167
|
+
}
|
|
19144
19168
|
},
|
|
19145
19169
|
validate: function() {
|
|
19146
19170
|
var prm = jQuery.Deferred();
|
|
@@ -19395,7 +19419,7 @@ function eval_pyson(value){
|
|
|
19395
19419
|
display: function() {
|
|
19396
19420
|
Sao.View.Form.Many2Many._super.display.call(this);
|
|
19397
19421
|
|
|
19398
|
-
|
|
19422
|
+
let display = function() {
|
|
19399
19423
|
var record = this.record;
|
|
19400
19424
|
var field = this.field;
|
|
19401
19425
|
|
|
@@ -19417,7 +19441,13 @@ function eval_pyson(value){
|
|
|
19417
19441
|
.css('max-height', this.attributes.height + 'px');
|
|
19418
19442
|
}
|
|
19419
19443
|
return this.screen.display();
|
|
19420
|
-
});
|
|
19444
|
+
}.bind(this);
|
|
19445
|
+
|
|
19446
|
+
if (this.prm.state() == 'pending') {
|
|
19447
|
+
return this.prm.then(() => display());
|
|
19448
|
+
} else {
|
|
19449
|
+
return display();
|
|
19450
|
+
}
|
|
19421
19451
|
},
|
|
19422
19452
|
focus: function() {
|
|
19423
19453
|
this.entry.focus();
|
|
@@ -22641,6 +22671,13 @@ function eval_pyson(value){
|
|
|
22641
22671
|
this.display_size = this.group.length;
|
|
22642
22672
|
this.display();
|
|
22643
22673
|
}
|
|
22674
|
+
if (reset_view) {
|
|
22675
|
+
let current_path = this.record.get_path(this.group);
|
|
22676
|
+
current_path = current_path.map(function(e) {
|
|
22677
|
+
return e[1];
|
|
22678
|
+
});
|
|
22679
|
+
this.display([current_path]);
|
|
22680
|
+
}
|
|
22644
22681
|
if (path.length > 1) {
|
|
22645
22682
|
prm = this.rows[path[0]].expand_to_path(
|
|
22646
22683
|
path.slice(1),
|
|
@@ -25529,6 +25566,12 @@ function eval_pyson(value){
|
|
|
25529
25566
|
return this.group.slice();
|
|
25530
25567
|
},
|
|
25531
25568
|
set_cursor: function(new_, reset_view) {
|
|
25569
|
+
if (!this.record) {
|
|
25570
|
+
return;
|
|
25571
|
+
}
|
|
25572
|
+
if (reset_view) {
|
|
25573
|
+
this.display([this.record.id]);
|
|
25574
|
+
}
|
|
25532
25575
|
if (new_) {
|
|
25533
25576
|
this.el.animate({
|
|
25534
25577
|
scrollTop: this.el[0].scrollHeight
|
|
@@ -28545,15 +28588,16 @@ function eval_pyson(value){
|
|
|
28545
28588
|
},
|
|
28546
28589
|
_fill_with: function(template) {
|
|
28547
28590
|
var prm;
|
|
28591
|
+
let context = this.record.get_context();
|
|
28548
28592
|
if (template) {
|
|
28549
28593
|
prm = Sao.rpc({
|
|
28550
28594
|
'method': 'model.ir.email.template.get',
|
|
28551
|
-
'params': [template, this.record.id,
|
|
28595
|
+
'params': [template, this.record.id, context],
|
|
28552
28596
|
}, this.record.model.session);
|
|
28553
28597
|
} else {
|
|
28554
28598
|
prm = Sao.rpc({
|
|
28555
28599
|
'method': 'model.ir.email.template.get_default',
|
|
28556
|
-
'params': [this.record.model.name, this.record.id,
|
|
28600
|
+
'params': [this.record.model.name, this.record.id, context],
|
|
28557
28601
|
}, this.record.model.session);
|
|
28558
28602
|
}
|
|
28559
28603
|
prm.then(values => {
|
package/package.json
CHANGED
package/src/sao.js
CHANGED
package/src/sao.less
CHANGED
|
@@ -460,6 +460,9 @@ html[theme="default"] {
|
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
ul.notification-menu {
|
|
463
|
+
background-color: @body-bg;
|
|
464
|
+
color: @text-color;
|
|
465
|
+
|
|
463
466
|
@media (min-width: @grid-float-breakpoint) {
|
|
464
467
|
width: 320px;
|
|
465
468
|
}
|
|
@@ -472,6 +475,7 @@ html[theme="default"] {
|
|
|
472
475
|
}
|
|
473
476
|
|
|
474
477
|
> a {
|
|
478
|
+
color: @text-color;
|
|
475
479
|
display: flex;
|
|
476
480
|
padding: 3px 10px;
|
|
477
481
|
|
|
@@ -508,6 +512,10 @@ html[theme="default"] {
|
|
|
508
512
|
}
|
|
509
513
|
}
|
|
510
514
|
}
|
|
515
|
+
|
|
516
|
+
> li.divider {
|
|
517
|
+
background-color: @dropdown-divider-bg;
|
|
518
|
+
}
|
|
511
519
|
}
|
|
512
520
|
}
|
|
513
521
|
|
package/src/screen.js
CHANGED
package/src/view/form.js
CHANGED
|
@@ -378,11 +378,12 @@ function eval_pyson(value){
|
|
|
378
378
|
});
|
|
379
379
|
for (const e of fields) {
|
|
380
380
|
const name = e[0];
|
|
381
|
-
|
|
381
|
+
if (!record.is_loaded(name)) {
|
|
382
|
+
promesses.push(record.load(name));
|
|
383
|
+
}
|
|
382
384
|
}
|
|
383
385
|
}
|
|
384
|
-
|
|
385
|
-
.then(() => {
|
|
386
|
+
let display = function() {
|
|
386
387
|
let promesses = [];
|
|
387
388
|
var record = this.record;
|
|
388
389
|
for (const name in this.widgets) {
|
|
@@ -420,7 +421,13 @@ function eval_pyson(value){
|
|
|
420
421
|
container.set_grid_template();
|
|
421
422
|
}
|
|
422
423
|
});
|
|
423
|
-
});
|
|
424
|
+
}.bind(this);
|
|
425
|
+
if (promesses.length) {
|
|
426
|
+
return jQuery.when.apply(jQuery, promesses).then(
|
|
427
|
+
() => display());
|
|
428
|
+
} else {
|
|
429
|
+
return display();
|
|
430
|
+
}
|
|
424
431
|
},
|
|
425
432
|
set_value: function() {
|
|
426
433
|
var record = this.record;
|
|
@@ -3516,7 +3523,11 @@ function eval_pyson(value){
|
|
|
3516
3523
|
},
|
|
3517
3524
|
set_readonly: function(readonly) {
|
|
3518
3525
|
Sao.View.Form.One2Many._super.set_readonly.call(this, readonly);
|
|
3519
|
-
this.prm.
|
|
3526
|
+
if (this.prm.state() == 'pending') {
|
|
3527
|
+
this.prm.done(() => this._set_button_sensitive());
|
|
3528
|
+
} else {
|
|
3529
|
+
this._set_button_sensitive();
|
|
3530
|
+
}
|
|
3520
3531
|
this._set_label_state();
|
|
3521
3532
|
},
|
|
3522
3533
|
set_required: function(required) {
|
|
@@ -3629,7 +3640,7 @@ function eval_pyson(value){
|
|
|
3629
3640
|
display: function() {
|
|
3630
3641
|
Sao.View.Form.One2Many._super.display.call(this);
|
|
3631
3642
|
|
|
3632
|
-
|
|
3643
|
+
let display = function() {
|
|
3633
3644
|
this._set_button_sensitive();
|
|
3634
3645
|
|
|
3635
3646
|
var record = this.record;
|
|
@@ -3676,7 +3687,13 @@ function eval_pyson(value){
|
|
|
3676
3687
|
.css('max-height', this.attributes.height + 'px');
|
|
3677
3688
|
}
|
|
3678
3689
|
return this.screen.display();
|
|
3679
|
-
});
|
|
3690
|
+
}.bind(this);
|
|
3691
|
+
|
|
3692
|
+
if (this.prm.state() == 'pending') {
|
|
3693
|
+
return this.prm.then(() => display());
|
|
3694
|
+
} else {
|
|
3695
|
+
return display();
|
|
3696
|
+
}
|
|
3680
3697
|
},
|
|
3681
3698
|
focus: function() {
|
|
3682
3699
|
if (this.attributes.add_remove) {
|
|
@@ -3953,7 +3970,11 @@ function eval_pyson(value){
|
|
|
3953
3970
|
}
|
|
3954
3971
|
var message = name + ' / ' + Sao.common.humanize(size);
|
|
3955
3972
|
this.label.text(message).attr('title', message);
|
|
3956
|
-
this.prm.
|
|
3973
|
+
if (this.prm.state() == 'pending') {
|
|
3974
|
+
this.prm.done(() => this._set_button_sensitive());
|
|
3975
|
+
} else {
|
|
3976
|
+
this._set_button_sensitive();
|
|
3977
|
+
}
|
|
3957
3978
|
},
|
|
3958
3979
|
validate: function() {
|
|
3959
3980
|
var prm = jQuery.Deferred();
|
|
@@ -4208,7 +4229,7 @@ function eval_pyson(value){
|
|
|
4208
4229
|
display: function() {
|
|
4209
4230
|
Sao.View.Form.Many2Many._super.display.call(this);
|
|
4210
4231
|
|
|
4211
|
-
|
|
4232
|
+
let display = function() {
|
|
4212
4233
|
var record = this.record;
|
|
4213
4234
|
var field = this.field;
|
|
4214
4235
|
|
|
@@ -4230,7 +4251,13 @@ function eval_pyson(value){
|
|
|
4230
4251
|
.css('max-height', this.attributes.height + 'px');
|
|
4231
4252
|
}
|
|
4232
4253
|
return this.screen.display();
|
|
4233
|
-
});
|
|
4254
|
+
}.bind(this);
|
|
4255
|
+
|
|
4256
|
+
if (this.prm.state() == 'pending') {
|
|
4257
|
+
return this.prm.then(() => display());
|
|
4258
|
+
} else {
|
|
4259
|
+
return display();
|
|
4260
|
+
}
|
|
4234
4261
|
},
|
|
4235
4262
|
focus: function() {
|
|
4236
4263
|
this.entry.focus();
|
package/src/view/list_form.js
CHANGED
|
@@ -115,6 +115,12 @@
|
|
|
115
115
|
return this.group.slice();
|
|
116
116
|
},
|
|
117
117
|
set_cursor: function(new_, reset_view) {
|
|
118
|
+
if (!this.record) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (reset_view) {
|
|
122
|
+
this.display([this.record.id]);
|
|
123
|
+
}
|
|
118
124
|
if (new_) {
|
|
119
125
|
this.el.animate({
|
|
120
126
|
scrollTop: this.el[0].scrollHeight
|
package/src/view/tree.js
CHANGED
|
@@ -1528,6 +1528,13 @@
|
|
|
1528
1528
|
this.display_size = this.group.length;
|
|
1529
1529
|
this.display();
|
|
1530
1530
|
}
|
|
1531
|
+
if (reset_view) {
|
|
1532
|
+
let current_path = this.record.get_path(this.group);
|
|
1533
|
+
current_path = current_path.map(function(e) {
|
|
1534
|
+
return e[1];
|
|
1535
|
+
});
|
|
1536
|
+
this.display([current_path]);
|
|
1537
|
+
}
|
|
1531
1538
|
if (path.length > 1) {
|
|
1532
1539
|
prm = this.rows[path[0]].expand_to_path(
|
|
1533
1540
|
path.slice(1),
|
package/src/window.js
CHANGED
|
@@ -2699,15 +2699,16 @@
|
|
|
2699
2699
|
},
|
|
2700
2700
|
_fill_with: function(template) {
|
|
2701
2701
|
var prm;
|
|
2702
|
+
let context = this.record.get_context();
|
|
2702
2703
|
if (template) {
|
|
2703
2704
|
prm = Sao.rpc({
|
|
2704
2705
|
'method': 'model.ir.email.template.get',
|
|
2705
|
-
'params': [template, this.record.id,
|
|
2706
|
+
'params': [template, this.record.id, context],
|
|
2706
2707
|
}, this.record.model.session);
|
|
2707
2708
|
} else {
|
|
2708
2709
|
prm = Sao.rpc({
|
|
2709
2710
|
'method': 'model.ir.email.template.get_default',
|
|
2710
|
-
'params': [this.record.model.name, this.record.id,
|
|
2711
|
+
'params': [this.record.model.name, this.record.id, context],
|
|
2711
2712
|
}, this.record.model.session);
|
|
2712
2713
|
}
|
|
2713
2714
|
prm.then(values => {
|