tryton-sao 6.0.21 → 6.0.22

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 CHANGED
@@ -1,3 +1,6 @@
1
+ Version 6.0.22 - 2022-10-17
2
+ * Bug fixes (see mercurial logs for details)
3
+
1
4
  Version 6.0.21 - 2022-08-17
2
5
  * Bug fixes (see mercurial logs for details)
3
6
 
@@ -504,8 +504,8 @@ var Sao = {};
504
504
  }
505
505
  function open_wizard(path) {
506
506
  var attributes = {};
507
- attributes.name = path[0];
508
- if (!attributes.name) {
507
+ attributes.action = path[0];
508
+ if (!attributes.action) {
509
509
  return;
510
510
  }
511
511
  try {
@@ -3171,7 +3171,7 @@ var Sao = {};
3171
3171
 
3172
3172
  Sao.common.date_format = function(format) {
3173
3173
  if (jQuery.isEmptyObject(format)) {
3174
- format = '%Y-%m-%d';
3174
+ format = '%x';
3175
3175
  if (Sao.Session.current_session) {
3176
3176
  var context = Sao.Session.current_session.context;
3177
3177
  if (context.locale && context.locale.date) {
@@ -11563,20 +11563,17 @@ var Sao = {};
11563
11563
  },
11564
11564
  _close_allowed: function() {
11565
11565
  var wizard = this.wizard;
11566
- var prm = jQuery.when();
11567
11566
  if ((wizard.state !== wizard.end_state) &&
11568
11567
  (wizard.end_state in wizard.states)) {
11569
- prm = wizard.response(
11568
+ wizard.response(
11570
11569
  wizard.states[wizard.end_state].attributes);
11571
11570
  }
11572
11571
  var dfd = jQuery.Deferred();
11573
- prm.always(function() {
11574
- if (wizard.state === wizard.end_state) {
11575
- dfd.resolve();
11576
- } else {
11577
- dfd.reject();
11578
- }
11579
- });
11572
+ if (wizard.state === wizard.end_state) {
11573
+ dfd.resolve();
11574
+ } else {
11575
+ dfd.reject();
11576
+ }
11580
11577
  return dfd.promise();
11581
11578
  }
11582
11579
  });
@@ -15585,7 +15582,6 @@ function eval_pyson(value){
15585
15582
  _input_format: '%Y-%m-%d',
15586
15583
  _format: Sao.common.format_date,
15587
15584
  _parse: Sao.common.parse_date,
15588
- _default_format: '%x',
15589
15585
  init: function(view, attributes) {
15590
15586
  Sao.View.Form.Date._super.init.call(this, view, attributes);
15591
15587
  this.el = jQuery('<div/>', {
@@ -15664,7 +15660,8 @@ function eval_pyson(value){
15664
15660
  if (this.field && this.record) {
15665
15661
  return this.field.date_format(this.record);
15666
15662
  } else {
15667
- return this._default_format;
15663
+ return Sao.common.date_format(
15664
+ this.view.screen.context.date_format);
15668
15665
  }
15669
15666
  },
15670
15667
  get_value: function() {
@@ -15721,13 +15718,13 @@ function eval_pyson(value){
15721
15718
  _input_format: '%Y-%m-%dT%H:%M:%S',
15722
15719
  _format: Sao.common.format_datetime,
15723
15720
  _parse: Sao.common.parse_datetime,
15724
- _default_format: '%x %X',
15725
15721
  get_format: function() {
15726
15722
  if (this.field && this.record) {
15727
15723
  return (this.field.date_format(this.record) + ' ' +
15728
15724
  this.field.time_format(this.record));
15729
15725
  } else {
15730
- return this._default_format;
15726
+ return (Sao.common.date_format(
15727
+ this.view.screen.context.date_format) + ' %X');
15731
15728
  }
15732
15729
  },
15733
15730
  cast: function(value){
@@ -15742,7 +15739,6 @@ function eval_pyson(value){
15742
15739
  _input_format: '%H:%M:%S',
15743
15740
  _format: Sao.common.format_time,
15744
15741
  _parse: Sao.common.parse_time,
15745
- _default_format: '%X',
15746
15742
  init: function(view, attributes) {
15747
15743
  Sao.View.Form.Time._super.init.call(this, view, attributes);
15748
15744
  if (~navigator.userAgent.indexOf("Firefox")) {
@@ -15754,7 +15750,7 @@ function eval_pyson(value){
15754
15750
  if (this.field && this.record) {
15755
15751
  return this.field.time_format(this.record);
15756
15752
  } else {
15757
- return this._default_format;
15753
+ return '%X';
15758
15754
  }
15759
15755
  },
15760
15756
  cast: function(value){