Help

4

How to check "Show fields of relation fields (advanced)" on the import page?

Avatar
Pascal Tremblay

Hello all,

I'm with Odoo 10 community.

I need the external_id column when importing product. Because I want to reimport many times the same products.

So, I want to check the "Show fields of relation fields (advanced)" option on the import page. But I can't check the box. Even with admin in debug mode.

How could I check this box?




Edit #1

In the code of /home/odoo-10/odoo-10.0/addons/base_import/static/src/xml/base_import.xml, the box is defined like this :

<input type="checkbox" class="oe_import_advanced_mode" disabled="disabled"
                       id="oe_import_advanced_mode"/>

Why disabled????


EDIT #2

No trace of 'oe_import_advanced_mode' in the odoo 10 enterprise code... ??? What is this? I don't understand!


EDIT #3

I have tried removing the "disabled="disabled"" in the code and updating the module base_import. But when I check the box, it comes back disabled as soon.



2 Comments
Avatar
Discard

I am having the same problem. In my local development version it works, probably a bit different version?

Avatar
Pascal Tremblay
-

My importation was right finally. If your fields are well declared in the header of your csv/excel file, odoo will recognize them (even if they are many2one and other relationnal fields). After two or 3 importation tests, all my header was correctly set. But the checkbox was always disabled. Never manage to enable this checkbox. But you can import anything without this checkbox.

5 Answers
1
Best Answer

I reccomend to copy the files that you have to modify.

First of all you, on the base_import.xml file find a line like:

<input type="checkbox" class="oe_import_advanced_mode" disabled="disabled" id="oe_import_advanced_mode"/>


Modify the line to:

<input type="checkbox" class="oe_import_advanced_mode" id="oe_import_advanced_mode"/>


After that, you have to modify the base_import.js file (which is located on /YourOdoo/addons/base_import/static/src/js/). On that file, search "oe_import_advanced_mode" (without the " ")  since you find a line like this:

this.$('input.oe_import_advanced_mode').prop('checked', result.advanced_mode);

On that line just change the 'checked' value to 'unchecked'.

1 Comment
Avatar
Discard
Avatar
Xavier Brochard
-

Don't do that. Just put a slash "/" in a header (you way want to add fields name but it works without). No need to add datas in the column.

0
Best Answer

I forgot this when the problem disappeared, but now we stuck with this issue in another environment, running recent version of Odoo 10.0. Our customer finally solved the problem. We tried to import data from excel, using csv + UTF-8 encoding.

MS Excel generates UTF-8 BOM marker to the beginning of the file, and because of that, Odoo fails to identify the first field as "id".

IMHO this is odoo import bug, if it does not cope with UTF-8 BOM for UTF-8 files, but workaround is take the data e.g. in windows character set, then import works just fine. 

Avatar
Discard
0
Best Answer

Put a slash "/" in a header (you way want to add fields name but it works without). No need to add datas in the column.


Avatar
Discard
0
Avatar
Pascal Tremblay
Best Answer

This is not really an answer to original post.

How I manage my Visa each month... 

I download the ofx on AccesD (ofx quicken, conciliation bancaire carte) :


I import it :


I reconcile. Note that total of 0 $ each month end.



My account chart :