tryton-sao 7.0.3 → 7.0.4
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 +2 -1
- package/dist/tryton-sao.js +23 -10
- package/dist/tryton-sao.min.css +2 -1
- package/dist/tryton-sao.min.js +2 -2
- package/package.json +1 -1
- package/src/common.js +8 -5
- package/src/model.js +4 -2
- package/src/sao.js +1 -1
- package/src/sao.less +2 -1
- package/src/view/form.js +10 -2
- package/tests/sao.js +3 -1
package/CHANGELOG
CHANGED
package/dist/tryton-sao.css
CHANGED
|
@@ -10229,7 +10229,8 @@ input.column-boolean {
|
|
|
10229
10229
|
}
|
|
10230
10230
|
.xalign-center,
|
|
10231
10231
|
.xalign-end {
|
|
10232
|
-
|
|
10232
|
+
justify-self: start;
|
|
10233
|
+
justify-content: start;
|
|
10233
10234
|
}
|
|
10234
10235
|
}
|
|
10235
10236
|
@media screen and (max-width: 767px) {
|
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__: '7.0.
|
|
4
|
+
__version__: '7.0.4',
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
(function() {
|
|
@@ -3989,8 +3989,12 @@ var Sao = {
|
|
|
3989
3989
|
}
|
|
3990
3990
|
});
|
|
3991
3991
|
prm.fail(() => {
|
|
3992
|
+
var selection = [];
|
|
3993
|
+
if (this.nullable_widget) {
|
|
3994
|
+
selection.push([null, '']);
|
|
3995
|
+
}
|
|
3992
3996
|
this._last_domain = null;
|
|
3993
|
-
this.selection =
|
|
3997
|
+
this.selection = selection;
|
|
3994
3998
|
if (callback) {
|
|
3995
3999
|
callback(this.selection, this.help);
|
|
3996
4000
|
}
|
|
@@ -4036,6 +4040,9 @@ var Sao = {
|
|
|
4036
4040
|
if (!this.attributes.relation) {
|
|
4037
4041
|
return jQuery.when([]);
|
|
4038
4042
|
}
|
|
4043
|
+
if (value === null) {
|
|
4044
|
+
return jQuery.when([null, '']);
|
|
4045
|
+
}
|
|
4039
4046
|
for (var i = 0, len = this.inactive_selection.length; i < len; i++) {
|
|
4040
4047
|
if (value == this.inactive_selection[i][0]) {
|
|
4041
4048
|
return jQuery.when(this.inactive_selection[i]);
|
|
@@ -5612,10 +5619,6 @@ var Sao = {
|
|
|
5612
5619
|
if (!domain.length) {
|
|
5613
5620
|
return [0, domain];
|
|
5614
5621
|
} else if (this.is_leaf(domain)) {
|
|
5615
|
-
if (domain[2] === null) {
|
|
5616
|
-
domain = domain.slice();
|
|
5617
|
-
domain[2] = Number.NEGATIVE_INFINITY;
|
|
5618
|
-
}
|
|
5619
5622
|
return [1, domain];
|
|
5620
5623
|
} else if (~['AND', 'OR'].indexOf(domain)) {
|
|
5621
5624
|
return [0, domain];
|
|
@@ -8667,7 +8670,8 @@ var Sao = {
|
|
|
8667
8670
|
}
|
|
8668
8671
|
fieldnames[fieldname] = true;
|
|
8669
8672
|
values = jQuery.extend(values,
|
|
8670
|
-
|
|
8673
|
+
this._get_on_change_args(
|
|
8674
|
+
on_change_with.concat([fieldname])));
|
|
8671
8675
|
if ((this.model.fields[fieldname] instanceof
|
|
8672
8676
|
Sao.field.Many2One) ||
|
|
8673
8677
|
(this.model.fields[fieldname] instanceof
|
|
@@ -8706,7 +8710,8 @@ var Sao = {
|
|
|
8706
8710
|
.description.on_change_with;
|
|
8707
8711
|
values = jQuery.extend(
|
|
8708
8712
|
values,
|
|
8709
|
-
this._get_on_change_args(
|
|
8713
|
+
this._get_on_change_args(
|
|
8714
|
+
on_change_with.concat([fieldname])));
|
|
8710
8715
|
}
|
|
8711
8716
|
fieldnames = Object.keys(later);
|
|
8712
8717
|
try {
|
|
@@ -18652,8 +18657,12 @@ function eval_pyson(value){
|
|
|
18652
18657
|
const callback = result => {
|
|
18653
18658
|
if (result) {
|
|
18654
18659
|
screen.current_record.save().done(() => {
|
|
18660
|
+
var added = 'id' in this.screen.current_record.modified_fields;
|
|
18655
18661
|
// Force a reload on next display
|
|
18656
18662
|
this.screen.current_record.cancel();
|
|
18663
|
+
if (added) {
|
|
18664
|
+
this.screen.current_record.modified_fields.id = true;
|
|
18665
|
+
}
|
|
18657
18666
|
});
|
|
18658
18667
|
}
|
|
18659
18668
|
};
|
|
@@ -19113,12 +19122,16 @@ function eval_pyson(value){
|
|
|
19113
19122
|
});
|
|
19114
19123
|
url = window.URL.createObjectURL(blob);
|
|
19115
19124
|
}
|
|
19125
|
+
// duplicate object to force refresh on buggy browsers
|
|
19126
|
+
const object = this.object.clone();
|
|
19116
19127
|
// set onload before data to be always called
|
|
19117
|
-
|
|
19128
|
+
object.get(0).onload = function() {
|
|
19118
19129
|
this.onload = null;
|
|
19119
19130
|
window.URL.revokeObjectURL(url);
|
|
19120
19131
|
};
|
|
19121
|
-
|
|
19132
|
+
object.attr('data', url);
|
|
19133
|
+
this.object.replaceWith(object);
|
|
19134
|
+
this.object = object;
|
|
19122
19135
|
});
|
|
19123
19136
|
},
|
|
19124
19137
|
});
|
package/dist/tryton-sao.min.css
CHANGED
|
@@ -10229,7 +10229,8 @@ input.column-boolean {
|
|
|
10229
10229
|
}
|
|
10230
10230
|
.xalign-center,
|
|
10231
10231
|
.xalign-end {
|
|
10232
|
-
|
|
10232
|
+
justify-self: start;
|
|
10233
|
+
justify-content: start;
|
|
10233
10234
|
}
|
|
10234
10235
|
}
|
|
10235
10236
|
@media screen and (max-width: 767px) {
|