diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-10-19 18:16:14 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-10-19 18:16:14 +0200 |
| commit | 938ffb92da1ea898f661aec04745f7630e2f378c (patch) | |
| tree | 7faeed8433101836cd0239cf6c23629ef1f1289d /addons/base_import/static | |
| parent | 1f9e92dfef325b6727e1bee3de55bff095ec6cf2 (diff) | |
| parent | 6466aa499fc37bba5f4feeeecac99448ef88e62e (diff) | |
[MERGE] forward port branch 10.0 up to 6466aa4
Diffstat (limited to 'addons/base_import/static')
| -rw-r--r-- | addons/base_import/static/src/js/base_import.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/addons/base_import/static/src/js/base_import.js b/addons/base_import/static/src/js/base_import.js index 1901a2c180e..b3b905b36a5 100644 --- a/addons/base_import/static/src/js/base_import.js +++ b/addons/base_import/static/src/js/base_import.js @@ -119,11 +119,12 @@ var DataImport = Widget.extend(ControlPanelMixin, { opts: [ {name: 'encoding', label: _lt("Encoding:"), value: 'utf-8'}, {name: 'separator', label: _lt("Separator:"), value: ','}, - {name: 'quoting', label: _lt("Quoting:"), value: '"'} + {name: 'quoting', label: _lt("Text Delimiter:"), value: '"'} ], parse_opts: [ {name: 'date_format', label: _lt("Date Format:"), value: ''}, - {name: 'float_thousand_separator', label: _lt("Thousand Separator:"), value: ','}, + {name: 'datetime_format', label: _lt("Datetime Format:"), value: ''}, + {name: 'float_thousand_separator', label: _lt("Thousands Separator:"), value: ','}, {name: 'float_decimal_separator', label: _lt("Decimal Separator:"), value: '.'} ], events: { @@ -295,8 +296,8 @@ var DataImport = Widget.extend(ControlPanelMixin, { self.$('input.oe_import_' + opt.name).val(); }); _(this.parse_opts).each(function (opt) { - if (opt.name === 'date_format') { - options[opt.name] = time.moment_to_strftime_format(self.$('input.oe_import_date_format').val()); + if (opt.name === 'date_format' || opt.name === 'datetime_format') { + options[opt.name] = time.moment_to_strftime_format(self.$('input.oe_import_' + opt.name).val()); } else { options[opt.name] = self.$('input.oe_import_' + opt.name).val(); @@ -320,6 +321,7 @@ var DataImport = Widget.extend(ControlPanelMixin, { .prop('disabled', true); if (!this.$('input.oe_import_file').val()) { return this['settings_changed'](); } this.$('.oe_import_date_format').val(''); + this.$('.oe_import_datetime_format').val(''); this.$el.removeClass('oe_import_preview oe_import_error'); var import_toggle = false; @@ -375,6 +377,7 @@ var DataImport = Widget.extend(ControlPanelMixin, { } this.$('.oe_import_date_format').val(time.strftime_to_moment_format(result.options.date_format)); + this.$('.oe_import_datetime_format').val(time.strftime_to_moment_format(result.options.datetime_format)); this.$('.oe_import_float_thousand_separator').val(result.options.float_thousand_separator).change(); this.$('.oe_import_float_decimal_separator').val(result.options.float_decimal_separator).change(); if (result.debug === false){ |
