summaryrefslogtreecommitdiff
path: root/addons/base_import/static
diff options
context:
space:
mode:
authorHaresh Shyara <hsh@odoo.com>2016-10-07 16:38:30 +0530
committerYannick Tivisse <yti@odoo.com>2016-11-10 09:44:20 +0100
commit1ba4fbe640cf22abe484174a6ad231e69d9f12e7 (patch)
treed124d94af214ce2f6820894f54896b2fa222847e /addons/base_import/static
parenta07012fbc280c2ed7573199da60d9053c167d6be (diff)
[IMP] base_import: Improve import preview for related fields
normal mode: Importing only regular/basic fields from source file advanced mode: Importing any related fields from source file(i.e. if detected pattern in header like '<relational_fieldname>/<fname>') - Rename following checkbox "Show all fields for completion (advanced)" in "Show fields of relation fields (advanced)" - If the import file contains a column with a field of a relation field, show the column label in the preview, even if "Show fields of relation fields (advanced)" is not checked > to make it less confusing when importing advanced files (e.g. products with attributes)
Diffstat (limited to 'addons/base_import/static')
-rw-r--r--addons/base_import/static/src/js/base_import.js1
-rw-r--r--addons/base_import/static/src/xml/base_import.xml4
2 files changed, 3 insertions, 2 deletions
diff --git a/addons/base_import/static/src/js/base_import.js b/addons/base_import/static/src/js/base_import.js
index b3b905b36a5..a0d8b135228 100644
--- a/addons/base_import/static/src/js/base_import.js
+++ b/addons/base_import/static/src/js/base_import.js
@@ -366,6 +366,7 @@ var DataImport = Widget.extend(ControlPanelMixin, {
this.$buttons.filter('.o_import_button').add(this.$('.oe_import_file_reload'))
.prop('disabled', false);
this.$el.addClass('oe_import_preview');
+ this.$('input.oe_import_advanced_mode').prop('checked', result.advanced_mode);
this.$('.oe_import_grid').html(QWeb.render('ImportView.preview', result));
if (result.headers.length === 1) {
diff --git a/addons/base_import/static/src/xml/base_import.xml b/addons/base_import/static/src/xml/base_import.xml
index 0d23096f691..8a416c3ca42 100644
--- a/addons/base_import/static/src/xml/base_import.xml
+++ b/addons/base_import/static/src/xml/base_import.xml
@@ -67,9 +67,9 @@
id="oe_import_has_header" checked="checked"/>
<label for="oe_import_has_header">The first row
contains the label of the column</label>
- <input type="checkbox" class="oe_import_advanced_mode"
+ <input type="checkbox" class="oe_import_advanced_mode" disabled="disabled"
id="oe_import_advanced_mode"/>
- <label for="oe_import_advanced_mode">Show all fields for completion (advanced)</label>
+ <label for="oe_import_advanced_mode">Show fields of relation fields (advanced)</label>
<p class="oe_import_noheaders">If the file contains
the column names, Odoo can try auto-detecting the
field corresponding to the column. This makes imports