tryton-sao 7.0.45 → 7.0.47

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,4 +1,14 @@
1
1
 
2
+ Version 7.0.47 - 2026-03-18
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 7.0.46 - 2026-03-02
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 7.0.45 - 2026-02-18
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.0.45',
6
+ __version__: '7.0.47',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -362,7 +362,7 @@ var Sao = {
362
362
  navigator.userLanguage ||
363
363
  'en').replace('-', '_');
364
364
  }
365
- jQuery('html').attr('lang', lang);
365
+ jQuery('html').attr('lang', Sao.i18n.BC47(lang));
366
366
  Sao.i18n.setLocale(lang);
367
367
  moment.locale(lang.slice(0, 2));
368
368
  return jQuery.getJSON('locale/' + lang + '.json').then(function(data) {
@@ -1311,13 +1311,13 @@ var Sao = {
1311
1311
  var modalZIndex = 1040;
1312
1312
  jQuery('.modal.in').each(function(index) {
1313
1313
  var $modal = jQuery(this);
1314
- modalZIndex++;
1314
+ modalZIndex += 10;
1315
1315
  $modal.css('zIndex', modalZIndex);
1316
- $modal.next('.modal-backdrop.in').addClass('hidden')
1317
- .css('zIndex', modalZIndex - 1);
1316
+ $modal.prev('.modal-backdrop.in').addClass('hidden')
1317
+ .css('zIndex', modalZIndex - 5);
1318
1318
  });
1319
1319
  jQuery('.modal.in:visible:last').focus()
1320
- .next('.modal-backdrop.in').removeClass('hidden');
1320
+ .prev('.modal-backdrop.in').removeClass('hidden');
1321
1321
  }
1322
1322
 
1323
1323
  }());
@@ -5392,6 +5392,7 @@ var Sao = {
5392
5392
  }
5393
5393
  var factor = Number(field.factor || 1);
5394
5394
  digit -= Math.round(Math.log10(factor));
5395
+ digit = Math.max(digit, 0);
5395
5396
  return (value * factor).toLocaleString(
5396
5397
  Sao.i18n.BC47(Sao.i18n.getlang()), {
5397
5398
  useGrouping: true,
@@ -11476,7 +11477,9 @@ var Sao = {
11476
11477
  });
11477
11478
  },
11478
11479
  switch_: function() {
11479
- return this.modified_save().then(() => this.screen.switch_view());
11480
+ return this.modified_save().then(
11481
+ () => this.screen.switch_view(),
11482
+ (result) => result ? this.screen.switch_view() : null);
11480
11483
  },
11481
11484
  reload: function(test_modified=true) {
11482
11485
  const reload = () => {
@@ -11606,10 +11609,12 @@ var Sao = {
11606
11609
  revision = revisions[revisions.length - 1][0];
11607
11610
  }
11608
11611
  if (revision != this.screen.context._datetime) {
11609
- this.screen.clear();
11610
11612
  // Update group context that will be propagated by
11611
11613
  // recreating new group
11612
11614
  this.screen.group._context._datetime = revision;
11615
+ // clear after updating the datetime such that the tab
11616
+ // compute already the right URL
11617
+ this.screen.clear();
11613
11618
  if (this.screen.current_view.view_type != 'form') {
11614
11619
  this.screen.search_filter(
11615
11620
  this.screen.screen_container
@@ -13056,7 +13061,7 @@ var Sao = {
13056
13061
  'class': 'form-control input-sm',
13057
13062
  'type': 'number',
13058
13063
  'step': 'any',
13059
- 'lang': Sao.i18n.getlang(),
13064
+ 'lang': Sao.i18n.BC47(Sao.i18n.getlang()),
13060
13065
  }).appendTo(el);
13061
13066
  return entry;
13062
13067
  },
@@ -16761,7 +16766,7 @@ function eval_pyson(value){
16761
16766
  input_text.attr('type', 'text');
16762
16767
  input.attr('type', 'number');
16763
16768
  input.attr('step', 1);
16764
- input.attr('lang', Sao.i18n.getlang());
16769
+ input.attr('lang', Sao.i18n.BC47(Sao.i18n.getlang()));
16765
16770
 
16766
16771
  input.hide().on('focusout', function() {
16767
16772
  if (input[0].checkValidity()) {
@@ -24092,7 +24097,7 @@ function eval_pyson(value){
24092
24097
  this.view.screen.context.calendar_scroll_time ||
24093
24098
  Sao.Time(6)).toString(),
24094
24099
  events: this.view.get_events.bind(this.view),
24095
- locale: Sao.i18n.getlang().slice(0, 2),
24100
+ locale: Sao.i18n.BC47(Sao.i18n.getlang()).toLowerCase(),
24096
24101
  isRTL: Sao.i18n.rtl,
24097
24102
  themeSystem: 'bootstrap3',
24098
24103
  bootstrapGlyphicons: {