tryton-sao 6.0.20 → 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,9 @@
1
+ Version 6.0.22 - 2022-10-17
2
+ * Bug fixes (see mercurial logs for details)
3
+
4
+ Version 6.0.21 - 2022-08-17
5
+ * Bug fixes (see mercurial logs for details)
6
+
1
7
  Version 6.0.20 - 2022-07-01
2
8
  * Bug fixes (see mercurial logs for details)
3
9
 
@@ -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
  });
@@ -14558,7 +14555,7 @@ function eval_pyson(value){
14558
14555
  i = 0;
14559
14556
  row.children().map(function() {
14560
14557
  var cell = jQuery(this);
14561
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14558
+ var colspan = Math.min(Number(cell.attr('colspan')), col || 1);
14562
14559
  if (cell.hasClass('xexpand') &&
14563
14560
  (!jQuery.isEmptyObject(cell.children())) &&
14564
14561
  (cell.children(':not(.tooltip)').css('display') != 'none')) {
@@ -14578,7 +14575,7 @@ function eval_pyson(value){
14578
14575
  var reduce = function(previous, current) {
14579
14576
  var cell = current[0];
14580
14577
  var colspan = Math.min(
14581
- Number(cell.attr('colspan')), col);
14578
+ Number(cell.attr('colspan')), col || 1);
14582
14579
  return previous + colspan;
14583
14580
  };
14584
14581
  return a.reduce(reduce, 0) - b.reduce(reduce, 0);
@@ -14593,7 +14590,8 @@ function eval_pyson(value){
14593
14590
  xexpands.forEach(function(e) {
14594
14591
  var cell = e[0];
14595
14592
  i = e[1];
14596
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14593
+ var colspan = Math.min(
14594
+ Number(cell.attr('colspan')), col || 1);
14597
14595
  var current_width = 0;
14598
14596
  for (j = 0; j < colspan; j++) {
14599
14597
  current_width += widths[i + j] || 0;
@@ -14621,7 +14619,8 @@ function eval_pyson(value){
14621
14619
  i = 0;
14622
14620
  row.children().map(function() {
14623
14621
  var cell = jQuery(this);
14624
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14622
+ var colspan = Math.min(
14623
+ Number(cell.attr('colspan')), col || 1);
14625
14624
  if (cell.hasClass('xexpand') &&
14626
14625
  (cell.children(':not(.tooltip)').css('display') !=
14627
14626
  'none')) {
@@ -15583,7 +15582,6 @@ function eval_pyson(value){
15583
15582
  _input_format: '%Y-%m-%d',
15584
15583
  _format: Sao.common.format_date,
15585
15584
  _parse: Sao.common.parse_date,
15586
- _default_format: '%x',
15587
15585
  init: function(view, attributes) {
15588
15586
  Sao.View.Form.Date._super.init.call(this, view, attributes);
15589
15587
  this.el = jQuery('<div/>', {
@@ -15662,7 +15660,8 @@ function eval_pyson(value){
15662
15660
  if (this.field && this.record) {
15663
15661
  return this.field.date_format(this.record);
15664
15662
  } else {
15665
- return this._default_format;
15663
+ return Sao.common.date_format(
15664
+ this.view.screen.context.date_format);
15666
15665
  }
15667
15666
  },
15668
15667
  get_value: function() {
@@ -15719,13 +15718,13 @@ function eval_pyson(value){
15719
15718
  _input_format: '%Y-%m-%dT%H:%M:%S',
15720
15719
  _format: Sao.common.format_datetime,
15721
15720
  _parse: Sao.common.parse_datetime,
15722
- _default_format: '%x %X',
15723
15721
  get_format: function() {
15724
15722
  if (this.field && this.record) {
15725
15723
  return (this.field.date_format(this.record) + ' ' +
15726
15724
  this.field.time_format(this.record));
15727
15725
  } else {
15728
- return this._default_format;
15726
+ return (Sao.common.date_format(
15727
+ this.view.screen.context.date_format) + ' %X');
15729
15728
  }
15730
15729
  },
15731
15730
  cast: function(value){
@@ -15740,7 +15739,6 @@ function eval_pyson(value){
15740
15739
  _input_format: '%H:%M:%S',
15741
15740
  _format: Sao.common.format_time,
15742
15741
  _parse: Sao.common.parse_time,
15743
- _default_format: '%X',
15744
15742
  init: function(view, attributes) {
15745
15743
  Sao.View.Form.Time._super.init.call(this, view, attributes);
15746
15744
  if (~navigator.userAgent.indexOf("Firefox")) {
@@ -15752,7 +15750,7 @@ function eval_pyson(value){
15752
15750
  if (this.field && this.record) {
15753
15751
  return this.field.time_format(this.record);
15754
15752
  } else {
15755
- return this._default_format;
15753
+ return '%X';
15756
15754
  }
15757
15755
  },
15758
15756
  cast: function(value){