From b8f93a7bc653d41bd519e7769573fe2ccab8ccbe Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 14 Aug 2012 14:16:10 +0200 Subject: [ADD] base import logic: implement creating an import, uploading a file and displaying the preview bzr revid: xmo@openerp.com-20120814121610-j2rpg7u5zh4h93j1 --- addons/base_import/static/src/xml/import.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 addons/base_import/static/src/xml/import.xml (limited to 'addons/base_import/static/src/xml/import.xml') diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml new file mode 100644 index 00000000000..d2a3ec4f66d --- /dev/null +++ b/addons/base_import/static/src/xml/import.xml @@ -0,0 +1,25 @@ + + +
+ + + + + + +
+
+
+ + + + + + + + + +
-- cgit v1.2.3 From 323b979146d6e0ba428a3e15e98f112cf9f80d43 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 14 Aug 2012 14:48:35 +0200 Subject: [ADD] error reporting to user during preview bzr revid: xmo@openerp.com-20120814124835-9nkqni98ie2eyt5r --- addons/base_import/static/src/xml/import.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'addons/base_import/static/src/xml/import.xml') diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml index d2a3ec4f66d..7cf04c55292 100644 --- a/addons/base_import/static/src/xml/import.xml +++ b/addons/base_import/static/src/xml/import.xml @@ -1,6 +1,6 @@ -
+ @@ -9,6 +9,7 @@
+
@@ -22,4 +23,9 @@ > + +

Import preview failed due to:

+

Here is the start of the file we could not import:

+
+
-- cgit v1.2.3 From 8fa23a95186edd2f5bf6f223337d34f3a4e55e70 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 14 Aug 2012 16:14:56 +0200 Subject: [ADD] actual importing, no fields matching yet also no error pinpointing because API does not allow for it currently bzr revid: xmo@openerp.com-20120814141456-zh9kdbjy8wj1sxys --- addons/base_import/static/src/xml/import.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'addons/base_import/static/src/xml/import.xml') diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml index 7cf04c55292..483c9a4a3cb 100644 --- a/addons/base_import/static/src/xml/import.xml +++ b/addons/base_import/static/src/xml/import.xml @@ -7,9 +7,9 @@ +
-
@@ -18,14 +18,27 @@ + + + + + + - +

Import preview failed due to:

Here is the start of the file we could not import:

+
    +
  • + + +
  • +
-- cgit v1.2.3 From 7f319f5a374842a2731e7fbacb468452be784c69 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 14 Aug 2012 19:23:22 +0200 Subject: [ADD] blahblahblahblah also basic CSS effects bzr revid: xmo@openerp.com-20120814172322-1hx09qqh90umjdcq --- addons/base_import/static/src/xml/import.xml | 46 +++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) (limited to 'addons/base_import/static/src/xml/import.xml') diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml index 483c9a4a3cb..bb4f1d742d5 100644 --- a/addons/base_import/static/src/xml/import.xml +++ b/addons/base_import/static/src/xml/import.xml @@ -4,15 +4,51 @@ - +

Upload your file

+

Select the .CSV + file to import. If you need a sample importable file, you + can use the export + tool to generate one.

+ -
- -
+
+

Map your data to OpenERP

+ + +

If the file contains + the column names, OpenERP can try auto-detecting the + field corresponding to the column. This makes imports + simpler especially when the file has many columns.

+ +
+ + + +

Frequently Asked Questions

+
+
Need to import data from an other application?
+
+

In order to re-create relationships between + different records, you should use the unique + identifier from the original application and + map it to the ID + column in OpenERP. When you + import an other record that links to the first + one, use XXX/ID + to the original unique identifier.

+

The ID + will also be used to update the original + import if you need to re-import modified data + later, it's thus good practice to specify it + whenever possible

+
+
+ -
Date: Thu, 30 Aug 2012 14:52:32 +0200 Subject: [IMP] Make CSV options (quoting and separator) customizable Also autogen input ids so labels work correctly without collision risks, and make toggling links more flexible bzr revid: xmo@openerp.com-20120830125232-d7g7s5oid4qivaq2 --- addons/base_import/static/src/xml/import.xml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'addons/base_import/static/src/xml/import.xml') diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml index bb4f1d742d5..a85f8e960c1 100644 --- a/addons/base_import/static/src/xml/import.xml +++ b/addons/base_import/static/src/xml/import.xml @@ -1,5 +1,6 @@ +
@@ -9,8 +10,9 @@ file to import. If you need a sample importable file, you can use the export tool to generate one.

- - + +

Map your data to OpenERP

@@ -25,11 +27,23 @@
- + + File Format Options… +
+ + + +
+ + +

Frequently Asked Questions

-
Need to import data from an other application?
+
+ Need to import data from an other application?

In order to re-create relationships between different records, you should use the unique -- cgit v1.2.3 From cdb686980986b0fc200483b90dbb18fbdda6c585 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 30 Aug 2012 16:12:26 +0200 Subject: [IMP] add encoding csv option and generify handling of options a bit, imprive styling, and rename 'quote' to 'quoting' bzr revid: xmo@openerp.com-20120830141226-exli9s1hh4vij6sd --- addons/base_import/static/src/xml/import.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'addons/base_import/static/src/xml/import.xml') diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml index a85f8e960c1..a2844f8d7b9 100644 --- a/addons/base_import/static/src/xml/import.xml +++ b/addons/base_import/static/src/xml/import.xml @@ -29,15 +29,15 @@

File Format Options… -
- - - -
- - +
+

+ + + +

Frequently Asked Questions

-- cgit v1.2.3 From ad670b6887097b14888b8f960f03ae1f64e6150b Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 6 Sep 2012 12:35:16 +0200 Subject: [FIX] field-selection UI in import table: replace jquery-autocomplete by select2 * jQuery autocomplete requires complex hacks to work out and look select-ish * select2 is more straightforward to use for people expecting
-- cgit v1.2.3 From e401ca9d69a5a4f76bad7b21a6c9882f97cdfbef Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 11 Sep 2012 08:38:49 +0200 Subject: [IMP] re-introduce Import button/link when base_import is installed bzr revid: xmo@openerp.com-20120911063849-xqw380wglzxviojf --- addons/base_import/static/src/xml/import.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'addons/base_import/static/src/xml/import.xml') diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml index 733a93fd104..386348bea4b 100644 --- a/addons/base_import/static/src/xml/import.xml +++ b/addons/base_import/static/src/xml/import.xml @@ -92,4 +92,12 @@ + + + this.attr('t-if', 'widget.options.import_enabled'); + + + Import + + -- cgit v1.2.3
- +