tryton-sao 6.4.4 → 6.4.6
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 +6 -0
- package/dist/tryton-sao.js +18 -20
- package/dist/tryton-sao.min.js +2 -2
- package/package.json +1 -1
- package/src/common.js +1 -1
- package/src/sao.js +2 -2
- package/src/tab.js +6 -9
- package/src/view/calendar.js +4 -2
- package/src/view/form.js +5 -6
- package/tests/sao.js +16 -6
package/CHANGELOG
CHANGED
package/dist/tryton-sao.js
CHANGED
|
@@ -535,8 +535,8 @@ var Sao = {};
|
|
|
535
535
|
}
|
|
536
536
|
function open_wizard(path) {
|
|
537
537
|
var attributes = {};
|
|
538
|
-
attributes.
|
|
539
|
-
if (!attributes.
|
|
538
|
+
attributes.action = path[0];
|
|
539
|
+
if (!attributes.action) {
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
542
|
try {
|
|
@@ -3163,7 +3163,7 @@ var Sao = {};
|
|
|
3163
3163
|
|
|
3164
3164
|
Sao.common.date_format = function(format) {
|
|
3165
3165
|
if (jQuery.isEmptyObject(format)) {
|
|
3166
|
-
format = '%
|
|
3166
|
+
format = '%x';
|
|
3167
3167
|
if (Sao.Session.current_session) {
|
|
3168
3168
|
var context = Sao.Session.current_session.context;
|
|
3169
3169
|
if (context.locale && context.locale.date) {
|
|
@@ -11671,20 +11671,17 @@ var Sao = {};
|
|
|
11671
11671
|
},
|
|
11672
11672
|
_close_allowed: function() {
|
|
11673
11673
|
var wizard = this.wizard;
|
|
11674
|
-
var prm = jQuery.when();
|
|
11675
11674
|
if ((wizard.state !== wizard.end_state) &&
|
|
11676
11675
|
(wizard.end_state in wizard.states)) {
|
|
11677
|
-
|
|
11676
|
+
wizard.response(
|
|
11678
11677
|
wizard.states[wizard.end_state].attributes);
|
|
11679
11678
|
}
|
|
11680
11679
|
var dfd = jQuery.Deferred();
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
}
|
|
11687
|
-
});
|
|
11680
|
+
if (wizard.state === wizard.end_state) {
|
|
11681
|
+
dfd.resolve();
|
|
11682
|
+
} else {
|
|
11683
|
+
dfd.reject();
|
|
11684
|
+
}
|
|
11688
11685
|
return dfd.promise();
|
|
11689
11686
|
}
|
|
11690
11687
|
});
|
|
@@ -15779,7 +15776,6 @@ function eval_pyson(value){
|
|
|
15779
15776
|
_input_format: '%Y-%m-%d',
|
|
15780
15777
|
_format: Sao.common.format_date,
|
|
15781
15778
|
_parse: Sao.common.parse_date,
|
|
15782
|
-
_default_format: '%x',
|
|
15783
15779
|
init: function(view, attributes) {
|
|
15784
15780
|
Sao.View.Form.Date._super.init.call(this, view, attributes);
|
|
15785
15781
|
this.el = jQuery('<div/>', {
|
|
@@ -15860,7 +15856,8 @@ function eval_pyson(value){
|
|
|
15860
15856
|
if (this.field && this.record) {
|
|
15861
15857
|
return this.field.date_format(this.record);
|
|
15862
15858
|
} else {
|
|
15863
|
-
return
|
|
15859
|
+
return Sao.common.date_format(
|
|
15860
|
+
this.view.screen.context.date_format);
|
|
15864
15861
|
}
|
|
15865
15862
|
},
|
|
15866
15863
|
get_value: function() {
|
|
@@ -15917,13 +15914,13 @@ function eval_pyson(value){
|
|
|
15917
15914
|
_input_format: '%Y-%m-%dT%H:%M:%S',
|
|
15918
15915
|
_format: Sao.common.format_datetime,
|
|
15919
15916
|
_parse: Sao.common.parse_datetime,
|
|
15920
|
-
_default_format: '%x %X',
|
|
15921
15917
|
get_format: function() {
|
|
15922
15918
|
if (this.field && this.record) {
|
|
15923
15919
|
return (this.field.date_format(this.record) + ' ' +
|
|
15924
15920
|
this.field.time_format(this.record));
|
|
15925
15921
|
} else {
|
|
15926
|
-
return
|
|
15922
|
+
return (Sao.common.date_format(
|
|
15923
|
+
this.view.screen.context.date_format) + ' %X');
|
|
15927
15924
|
}
|
|
15928
15925
|
},
|
|
15929
15926
|
cast: function(value){
|
|
@@ -15938,7 +15935,6 @@ function eval_pyson(value){
|
|
|
15938
15935
|
_input_format: '%H:%M:%S',
|
|
15939
15936
|
_format: Sao.common.format_time,
|
|
15940
15937
|
_parse: Sao.common.parse_time,
|
|
15941
|
-
_default_format: '%X',
|
|
15942
15938
|
init: function(view, attributes) {
|
|
15943
15939
|
Sao.View.Form.Time._super.init.call(this, view, attributes);
|
|
15944
15940
|
if (~navigator.userAgent.indexOf("Firefox")) {
|
|
@@ -15950,7 +15946,7 @@ function eval_pyson(value){
|
|
|
15950
15946
|
if (this.field && this.record) {
|
|
15951
15947
|
return this.field.time_format(this.record);
|
|
15952
15948
|
} else {
|
|
15953
|
-
return
|
|
15949
|
+
return '%X';
|
|
15954
15950
|
}
|
|
15955
15951
|
},
|
|
15956
15952
|
cast: function(value){
|
|
@@ -23047,7 +23043,9 @@ function eval_pyson(value){
|
|
|
23047
23043
|
}
|
|
23048
23044
|
},
|
|
23049
23045
|
insert_event: function(record) {
|
|
23050
|
-
var
|
|
23046
|
+
var description_fields = jQuery.extend([], this.fields);
|
|
23047
|
+
var title_field = description_fields.shift();
|
|
23048
|
+
var title = this.screen.model.fields[title_field].get_client(
|
|
23051
23049
|
record);
|
|
23052
23050
|
var field_start = record.model.fields[this.attributes.dtstart];
|
|
23053
23051
|
var date_start = field_start.get_client(record);
|
|
@@ -23067,7 +23065,7 @@ function eval_pyson(value){
|
|
|
23067
23065
|
model_access.write);
|
|
23068
23066
|
|
|
23069
23067
|
var description = [];
|
|
23070
|
-
for (const field of
|
|
23068
|
+
for (const field of description_fields) {
|
|
23071
23069
|
description.push(
|
|
23072
23070
|
this.screen.model.fields[field].get_client( record));
|
|
23073
23071
|
}
|