tryton-sao 7.0.46 → 7.0.48

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.48 - 2026-04-16
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 7.0.47 - 2026-03-18
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 7.0.46 - 2026-03-02
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
package/COPYRIGHT CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (C) 2012-2025 Nicolas Évrard.
1
+ Copyright (C) 2012-2026 Nicolas Évrard.
2
2
  Copyright (C) 2012-2026 Cédric Krier.
3
3
  Copyright (C) 2012-2014 Bertrand Chenal.
4
4
  Copyright (C) 2012-2026 B2CK SPRL.
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.0.46',
6
+ __version__: '7.0.48',
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) {
@@ -2901,6 +2901,7 @@ var Sao = {
2901
2901
  if (service_window.closed) {
2902
2902
  window.clearInterval(timer);
2903
2903
  session.database = database;
2904
+ session.login = null;
2904
2905
  session.restore();
2905
2906
  if (session.session) {
2906
2907
  dfd.resolve(session);
@@ -5261,6 +5262,7 @@ var Sao = {
5261
5262
  let [, thousandSeparator] = /^10(.)?000/.exec(format(10000));
5262
5263
  let [, decimalSign] = /^0(.)1$/.exec(format(0.1));
5263
5264
  return Number(string
5265
+ .replace(new RegExp(' ', 'g'), '')
5264
5266
  .replace(new RegExp(thousandSeparator, 'g'), '')
5265
5267
  .replace(decimalSign, '.'));
5266
5268
  }
@@ -5392,6 +5394,7 @@ var Sao = {
5392
5394
  }
5393
5395
  var factor = Number(field.factor || 1);
5394
5396
  digit -= Math.round(Math.log10(factor));
5397
+ digit = Math.max(digit, 0);
5395
5398
  return (value * factor).toLocaleString(
5396
5399
  Sao.i18n.BC47(Sao.i18n.getlang()), {
5397
5400
  useGrouping: true,
@@ -10178,10 +10181,7 @@ var Sao = {
10178
10181
  if (record2) {
10179
10182
  let to_update = Object.fromEntries(
10180
10183
  Object.entries(vals).filter(
10181
- ([k, v]) => {
10182
- !Object.prototype.hasOwnProperty.call(
10183
- vals_to_set, k)
10184
- }
10184
+ ([k, v]) => !Object.hasOwn(vals_to_set, k)
10185
10185
  ));
10186
10186
  record2.set_on_change(to_update);
10187
10187
  }
@@ -11500,6 +11500,8 @@ var Sao = {
11500
11500
  }
11501
11501
  return set_cursor;
11502
11502
  });
11503
+ } else {
11504
+ this.refresh_resources(true);
11503
11505
  }
11504
11506
  return set_cursor;
11505
11507
  })
@@ -12816,8 +12818,14 @@ var Sao = {
12816
12818
  break;
12817
12819
  case 'selection':
12818
12820
  case 'multiselection':
12821
+ var selection = jQuery.extend([], field.selection);
12822
+ if (field.sort === undefined || field.sort) {
12823
+ selection.sort(function(a, b) {
12824
+ return a[1].localeCompare(b[1]);
12825
+ });
12826
+ }
12819
12827
  entry = new Sao.ScreenContainer.Selection(
12820
- field.selection, prefix + field.name);
12828
+ selection, prefix + field.name);
12821
12829
  input = entry.el;
12822
12830
  break;
12823
12831
  case 'date':
@@ -13060,7 +13068,7 @@ var Sao = {
13060
13068
  'class': 'form-control input-sm',
13061
13069
  'type': 'number',
13062
13070
  'step': 'any',
13063
- 'lang': Sao.i18n.getlang(),
13071
+ 'lang': Sao.i18n.BC47(Sao.i18n.getlang()),
13064
13072
  }).appendTo(el);
13065
13073
  return entry;
13066
13074
  },
@@ -14396,7 +14404,7 @@ var Sao = {
14396
14404
  if (this.current_view &&
14397
14405
  ~['tree', 'graph', 'calendar'].indexOf(this.current_view.view_type) &&
14398
14406
  !this.group.parent) {
14399
- this.search_filter();
14407
+ this.search_filter(this.screen_container.get_text());
14400
14408
  }
14401
14409
  } else if (action == 'reload menu') {
14402
14410
  Sao.Session.current_session.reload_context()
@@ -16765,7 +16773,7 @@ function eval_pyson(value){
16765
16773
  input_text.attr('type', 'text');
16766
16774
  input.attr('type', 'number');
16767
16775
  input.attr('step', 1);
16768
- input.attr('lang', Sao.i18n.getlang());
16776
+ input.attr('lang', Sao.i18n.BC47(Sao.i18n.getlang()));
16769
16777
 
16770
16778
  input.hide().on('focusout', function() {
16771
16779
  if (input[0].checkValidity()) {
@@ -24096,7 +24104,7 @@ function eval_pyson(value){
24096
24104
  this.view.screen.context.calendar_scroll_time ||
24097
24105
  Sao.Time(6)).toString(),
24098
24106
  events: this.view.get_events.bind(this.view),
24099
- locale: Sao.i18n.getlang().slice(0, 2),
24107
+ locale: Sao.i18n.BC47(Sao.i18n.getlang()).toLowerCase(),
24100
24108
  isRTL: Sao.i18n.rtl,
24101
24109
  themeSystem: 'bootstrap3',
24102
24110
  bootstrapGlyphicons: {