tryton-sao 6.0.74 → 6.0.76

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 6.0.76 - 2026-04-16
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 6.0.75 - 2026-03-18
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 6.0.74 - 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.
@@ -322,7 +322,7 @@ var Sao = {};
322
322
  navigator.userLanguage ||
323
323
  'en').replace('-', '_');
324
324
  }
325
- jQuery('html').attr('lang', lang);
325
+ jQuery('html').attr('lang', Sao.i18n.BC47(lang));
326
326
  Sao.i18n.setLocale(lang);
327
327
  moment.locale(lang.slice(0, 2));
328
328
  return jQuery.getJSON('locale/' + lang + '.json').then(function(data) {
@@ -4987,6 +4987,7 @@ var Sao = {};
4987
4987
  let [, thousandSeparator] = /^10(.)?000/.exec(format(10000));
4988
4988
  let [, decimalSign] = /^0(.)1$/.exec(format(0.1));
4989
4989
  return Number(string
4990
+ .replace(new RegExp(' ', 'g'), '')
4990
4991
  .replace(new RegExp(thousandSeparator, 'g'), '')
4991
4992
  .replace(decimalSign, '.'));
4992
4993
  }
@@ -5127,6 +5128,7 @@ var Sao = {};
5127
5128
  }
5128
5129
  var factor = Number(field.factor || 1);
5129
5130
  digit -= Math.round(Math.log10(factor));
5131
+ digit = Math.max(digit, 0);
5130
5132
  return (value * factor).toLocaleString(
5131
5133
  Sao.i18n.BC47(Sao.i18n.getlang()), {
5132
5134
  useGrouping: true,
@@ -9650,10 +9652,7 @@ var Sao = {};
9650
9652
  if (record2) {
9651
9653
  let to_update = Object.fromEntries(
9652
9654
  Object.entries(vals).filter(
9653
- ([k, v]) => {
9654
- !Object.prototype.hasOwnProperty.call(
9655
- vals_to_set, k)
9656
- }
9655
+ ([k, v]) => !Object.hasOwn(vals_to_set, k)
9657
9656
  ));
9658
9657
  record2.set_on_change(to_update);
9659
9658
  }
@@ -10955,6 +10954,8 @@ var Sao = {};
10955
10954
  }.bind(this));
10956
10955
  return set_cursor;
10957
10956
  }.bind(this));
10957
+ } else {
10958
+ this.refresh_resources(true);
10958
10959
  }
10959
10960
  return set_cursor;
10960
10961
  }.bind(this))
@@ -12288,8 +12289,14 @@ var Sao = {};
12288
12289
  break;
12289
12290
  case 'selection':
12290
12291
  case 'multiselection':
12292
+ var selection = jQuery.extend([], field.selection);
12293
+ if (field.sort === undefined || field.sort) {
12294
+ selection.sort(function(a, b) {
12295
+ return a[1].localeCompare(b[1]);
12296
+ });
12297
+ }
12291
12298
  entry = new Sao.ScreenContainer.Selection(
12292
- field.selection, prefix + field.name);
12299
+ selection, prefix + field.name);
12293
12300
  input = entry.el;
12294
12301
  break;
12295
12302
  case 'date':
@@ -12531,7 +12538,7 @@ var Sao = {};
12531
12538
  'class': 'form-control input-sm',
12532
12539
  'type': 'number',
12533
12540
  'step': 'any',
12534
- 'lang': Sao.i18n.getlang(),
12541
+ 'lang': Sao.i18n.BC47(Sao.i18n.getlang()),
12535
12542
  }).appendTo(el);
12536
12543
  return entry;
12537
12544
  },
@@ -13864,7 +13871,7 @@ var Sao = {};
13864
13871
  if (this.current_view &&
13865
13872
  ~['tree', 'graph', 'calendar'].indexOf(this.current_view.view_type) &&
13866
13873
  !this.group.parent) {
13867
- this.search_filter();
13874
+ this.search_filter(this.screen_container.get_text());
13868
13875
  }
13869
13876
  } else if (action == 'reload menu') {
13870
13877
  Sao.Session.current_session.reload_context()
@@ -16083,7 +16090,7 @@ function eval_pyson(value){
16083
16090
  input_text.attr('type', 'text');
16084
16091
  input.attr('type', 'number');
16085
16092
  input.attr('step', 1);
16086
- input.attr('lang', Sao.i18n.getlang());
16093
+ input.attr('lang', Sao.i18n.BC47(Sao.i18n.getlang()));
16087
16094
 
16088
16095
  input.hide().on('focusout', function() {
16089
16096
  if (input[0].checkValidity()) {
@@ -22829,7 +22836,7 @@ function eval_pyson(value){
22829
22836
  timeFormat: 'H:mm',
22830
22837
  events: this.view.get_events.bind(this.view),
22831
22838
  contentHeight: 'auto',
22832
- locale: Sao.i18n.getlang().slice(0, 2),
22839
+ locale: Sao.i18n.BC47(Sao.i18n.getlang()).toLowerCase(),
22833
22840
  isRTL: Sao.i18n.rtl,
22834
22841
  themeSystem: 'bootstrap3',
22835
22842
  bootstrapGlyphicons: {