diff --git a/content/applications/general.rst b/content/applications/general.rst index 2e269a6db..ea863936f 100644 --- a/content/applications/general.rst +++ b/content/applications/general.rst @@ -6,7 +6,7 @@ General .. toctree:: general/odoo_basics - general/base_import + general/export_import_data general/multi_companies general/auth general/tags diff --git a/content/applications/general/base_import.rst b/content/applications/general/base_import.rst deleted file mode 100644 index 92a43880a..000000000 --- a/content/applications/general/base_import.rst +++ /dev/null @@ -1,9 +0,0 @@ -=========== -Data Import -=========== - -.. toctree:: - :titlesonly: - - base_import/adapt_template - base_import/import_faq \ No newline at end of file diff --git a/content/applications/general/base_import/adapt_template.rst b/content/applications/general/base_import/adapt_template.rst deleted file mode 100644 index 468db7cc0..000000000 --- a/content/applications/general/base_import/adapt_template.rst +++ /dev/null @@ -1,50 +0,0 @@ -=============================== -How to adapt an import template -=============================== - -Import templates are provided in the import tool of the most common data to -import (contacts, products, bank statements, etc.). -You can open them with any spreadsheets software (Microsoft Office, -OpenOffice, Google Drive, etc.). - -How to customize the file -========================= - -* Remove columns you don't need. We advise to not remove the *ID* one (see - why here below). -* Set a unique ID to every single record by dragging down the ID sequencing. - -.. image:: media/dragdown.gif - :align: center - -* When you add a new column, Odoo might not be able to map it automatically if its - label doesn't fit any field of the system. - If so, find the corresponding field using the search. - - .. image:: media/field_list.png - :align: center - - Then, use the label you found in your import template in order to make it work - straight away the very next time you try to import. - -Why an “ID” column -================== - -The **ID** (External ID) is an unique identifier for the line item. -Feel free to use the one of your previous software to ease the transition to Odoo. - -Setting an ID is not mandatory when importing but it helps in many cases: - -* Update imports: you can import the same file several times without creating duplicates; -* Import relation fields (see here below). - -How to import relation fields -============================= - -An Odoo object is always related to many other objects (e.g. a product is linked -to product categories, attributes, vendors, etc.). To import those relations you need to -import the records of the related object first from their own list menu. - -You can do it using either the name of the related record or its ID. The ID is expected when -two records have the same name. In such a case add " / ID" at the end of the column title -(e.g. for product attributes: Product Attributes / Attribute / ID). \ No newline at end of file diff --git a/content/applications/general/base_import/import_faq.rst b/content/applications/general/export_import_data.rst similarity index 70% rename from content/applications/general/base_import/import_faq.rst rename to content/applications/general/export_import_data.rst index 61ccae0ac..e82c962d3 100644 --- a/content/applications/general/base_import/import_faq.rst +++ b/content/applications/general/export_import_data.rst @@ -1,17 +1,78 @@ -============================ -How to import data into Odoo -============================ +====================== +Export and import data +====================== + +.. _export-data: + +Export data from Odoo +===================== + +When working with a database, it sometimes is necessary to export your data in a distinct file. +Doing so can help to do reporting over your activities (even if Odoo offers a precise and easy +reporting tool with each available application). + +With Odoo, you can export the values from any field in any record. To do so, +activate the list view on the items that need to be exported, click on *Action*, and, then, +on *Export*. + +.. image:: export_import_data/list-view-export.png + :align: center + :alt: view of the different things to enable/click to export data + +Pretty simple, this action still comes with some specificities. In fact, +when clicking on *Export*, a pop-up window appears with several +options for the data to export: + +.. image:: export_import_data/export-data-overview.png + :align: center + :alt: overview of all the options to take into account when exporting data in Odoo + +#. With the *I want to update data* option ticked, the system only + shows the fields which can be imported. This is very helpful in + case you want to update existing records. Basically, this works + like a filter. Leaving the box unticked gives way more field + options because it shows all the fields, not just the ones which + can be imported. +#. When exporting, you can choose between two formats: .csv and .xls. + With .csv, items are separated with a comma, while .xls holds information about all the + worksheets in a file, including both content and formatting. +#. Those are the items you may want to export. Use the arrows to display + more sub-field options. Of course, you can use the search bar to + find specific fields more easily. To use the search option more + efficiently, display all the fields by clicking on all the + arrows! +#. The + button is there to add fields to the "to export" list. +#. The "handles" next to the selected fields allow you to move the fields up and down to + change the order in which they must be displayed in the exported + file. +#. The trashcan is there if you need to remove fields. +#. For recurring reports, it might be interesting to save export presets. + Select all the needed ones and click on the template bar. + There, click on *New template* and give a name to yours. The + next time you need to export the same list, simply select the + related template. + +.. tip:: + It’s good to keep the field’s external identifier in mind. For example, + *Related Company* is equal to *parent_id*. Doing so helps export + only what you would like to import next. + +.. _import-data: + +Import data into Odoo +===================== How to start ------------ + You can import data on any Odoo's business object using either Excel (.xlsx) or CSV (.csv) formats: contacts, products, bank statements, journal entries and even orders! Open the view of the object you want to populate and click *Import*. -.. image:: media/import_button.png - :align: center +.. image:: export_import_data/import_button.png + :align: center There you are provided with templates you can easily populate with your own data. Such templates can be imported in one click; @@ -24,21 +85,20 @@ How to adapt the template * We advise to not remove the **ID** one (see why in the next section). * Set a unique ID to every single record by dragging down the ID sequencing. -.. image:: media/dragdown.gif - :align: center +.. image:: export_import_data/dragdown.gif + :align: center * When you add a new column, Odoo might not be able to map it automatically if its label doesn't fit any field in Odoo. Don't worry! You can map new columns manually when you test the import. Search the list for the corresponding field. - .. image:: media/field_list.png - :align: center + .. image:: export_import_data/field_list.png + :align: center Then, use this field's label in your file in order to make it work straight on the very next time. - How to import from another application -------------------------------------- @@ -71,8 +131,8 @@ If that happens, you just have to check the ** Show fields of relation fields (advanced)** option, you will then be able to choose from the complete list of fields for each column. -.. image:: media/field_list.png - :align: center +.. image:: export_import_data/field_list.png + :align: center Where can I change the date import format? ------------------------------------------ @@ -174,10 +234,10 @@ with columns like "Field/External ID". The following two CSV files give you an e and their Categories. :download:`CSV file for categories -`. +`. :download:`CSV file for Products -`. +`. What can I do if I have multiple matches for a field? ----------------------------------------------------- @@ -198,7 +258,7 @@ The tags should be separated by a comma without any spacing. For example, if you to be linked to both tags 'Manufacturer' and 'Retailer' then you will encode "Manufacturer,Retailer" in the same column of your CSV file. -:download:`CSV file for Manufacturer, Retailer ` +:download:`CSV file for Manufacturer, Retailer ` How can I import a one2many relationship (e.g. several Order Lines of a Sales Order)? @@ -211,16 +271,16 @@ any information in the fields relative to the order. As an example, here is ``purchase.order_functional_error_line_cant_adpat.CSV`` file of some quotations you can import, based on demo data. -:download:`File for some Quotations `. +:download:`File for some Quotations `. The following CSV file shows how to import purchase orders with their respective purchase order lines: -:download:`Purchase orders with their respective purchase order lines `. +:download:`Purchase orders with their respective purchase order lines `. The following CSV file shows how to import customers and their respective contacts: -:download:`Customers and their respective contacts `. +:download:`Customers and their respective contacts `. Can I import several times the same record? ------------------------------------------- @@ -256,7 +316,7 @@ must be unique across all the records of all objects, so it's a good practice to As an example, suppose you have a SQL database with two tables you want to import: companies and persons. Each person belong to one company, so you will have to recreate the link between a person and the company he work for. (If you want to test this example, here is a :download:`dump of such a -PostgreSQL database `) +PostgreSQL database `) We will first export all companies and their "External ID". In PSQL, write the following command: @@ -298,3 +358,53 @@ original database). The two files produced are ready to be imported in Odoo without any modifications. After having imported these two CSV files, you will have 4 contacts and 3 companies. (the firsts two contacts are linked to the first company). You must first import the companies and then the persons. + +How to adapt an import template +=============================== + +Import templates are provided in the import tool of the most common data to +import (contacts, products, bank statements, etc.). +You can open them with any spreadsheets software (Microsoft Office, +OpenOffice, Google Drive, etc.). + +How to customize the file +------------------------- + +* Remove columns you don't need. We advise to not remove the *ID* one (see + why here below). +* Set a unique ID to every single record by dragging down the ID sequencing. + + .. image:: export_import_data/dragdown.gif + :align: center + +* When you add a new column, Odoo might not be able to map it automatically if its + label doesn't fit any field of the system. + If so, find the corresponding field using the search. + + .. image:: export_import_data/field_list.png + :align: center + + Then, use the label you found in your import template in order to make it work + straight away the very next time you try to import. + +Why an "ID" column +------------------ + +The **ID** (External ID) is an unique identifier for the line item. +Feel free to use the one of your previous software to ease the transition to Odoo. + +Setting an ID is not mandatory when importing but it helps in many cases: + +* Update imports: you can import the same file several times without creating duplicates; +* Import relation fields (see here below). + +How to import relation fields +----------------------------- + +An Odoo object is always related to many other objects (e.g. a product is linked +to product categories, attributes, vendors, etc.). To import those relations you need to +import the records of the related object first from their own list menu. + +You can do it using either the name of the related record or its ID. The ID is expected when +two records have the same name. In such a case add " / ID" at the end of the column title +(e.g. for product attributes: Product Attributes / Attribute / ID). \ No newline at end of file diff --git a/content/applications/general/base_import/files/External_id_3rd_party_application_product_categories.csv b/content/applications/general/export_import_data/External_id_3rd_party_application_product_categories.csv similarity index 100% rename from content/applications/general/base_import/files/External_id_3rd_party_application_product_categories.csv rename to content/applications/general/export_import_data/External_id_3rd_party_application_product_categories.csv diff --git a/content/applications/general/base_import/files/External_id_3rd_party_application_products.csv b/content/applications/general/export_import_data/External_id_3rd_party_application_products.csv similarity index 100% rename from content/applications/general/base_import/files/External_id_3rd_party_application_products.csv rename to content/applications/general/export_import_data/External_id_3rd_party_application_products.csv diff --git a/content/applications/general/base_import/files/database_import_test.sql b/content/applications/general/export_import_data/database_import_test.sql similarity index 100% rename from content/applications/general/base_import/files/database_import_test.sql rename to content/applications/general/export_import_data/database_import_test.sql diff --git a/content/applications/general/base_import/media/dragdown.gif b/content/applications/general/export_import_data/dragdown.gif similarity index 100% rename from content/applications/general/base_import/media/dragdown.gif rename to content/applications/general/export_import_data/dragdown.gif diff --git a/content/applications/general/odoo_basics/media/export-data-overview.png b/content/applications/general/export_import_data/export-data-overview.png similarity index 100% rename from content/applications/general/odoo_basics/media/export-data-overview.png rename to content/applications/general/export_import_data/export-data-overview.png diff --git a/content/applications/general/base_import/media/field_list.png b/content/applications/general/export_import_data/field_list.png similarity index 100% rename from content/applications/general/base_import/media/field_list.png rename to content/applications/general/export_import_data/field_list.png diff --git a/content/applications/general/base_import/media/import_button.png b/content/applications/general/export_import_data/import_button.png similarity index 100% rename from content/applications/general/base_import/media/import_button.png rename to content/applications/general/export_import_data/import_button.png diff --git a/content/applications/general/odoo_basics/media/list-view-export.png b/content/applications/general/export_import_data/list-view-export.png similarity index 100% rename from content/applications/general/odoo_basics/media/list-view-export.png rename to content/applications/general/export_import_data/list-view-export.png diff --git a/content/applications/general/base_import/files/m2m_customers_tags.csv b/content/applications/general/export_import_data/m2m_customers_tags.csv similarity index 100% rename from content/applications/general/base_import/files/m2m_customers_tags.csv rename to content/applications/general/export_import_data/m2m_customers_tags.csv diff --git a/content/applications/general/base_import/files/o2m_customers_contacts.csv b/content/applications/general/export_import_data/o2m_customers_contacts.csv similarity index 100% rename from content/applications/general/base_import/files/o2m_customers_contacts.csv rename to content/applications/general/export_import_data/o2m_customers_contacts.csv diff --git a/content/applications/general/base_import/files/o2m_purchase_order_lines.csv b/content/applications/general/export_import_data/o2m_purchase_order_lines.csv similarity index 100% rename from content/applications/general/base_import/files/o2m_purchase_order_lines.csv rename to content/applications/general/export_import_data/o2m_purchase_order_lines.csv diff --git a/content/applications/general/base_import/files/purchase.order_functional_error_line_cant_adpat.csv b/content/applications/general/export_import_data/purchase.order_functional_error_line_cant_adpat.csv similarity index 100% rename from content/applications/general/base_import/files/purchase.order_functional_error_line_cant_adpat.csv rename to content/applications/general/export_import_data/purchase.order_functional_error_line_cant_adpat.csv diff --git a/content/applications/general/odoo_basics.rst b/content/applications/general/odoo_basics.rst index 43de50b65..873685fc3 100644 --- a/content/applications/general/odoo_basics.rst +++ b/content/applications/general/odoo_basics.rst @@ -6,5 +6,4 @@ Basics :titlesonly: odoo_basics/choose_language - odoo_basics/users - odoo_basics/export-data \ No newline at end of file + odoo_basics/users \ No newline at end of file diff --git a/content/applications/general/odoo_basics/export-data.rst b/content/applications/general/odoo_basics/export-data.rst deleted file mode 100644 index 29f9fd1c0..000000000 --- a/content/applications/general/odoo_basics/export-data.rst +++ /dev/null @@ -1,53 +0,0 @@ -====================== -Export Data From Odoo -====================== - -When working with a database, it sometimes is necessary to export your data in a distinct file. -Doing so can help to do reporting over your activities (even if Odoo offers a precise and easy -reporting tool with each available application). - -With Odoo, you can export the values from any field in any record. To do so, -activate the list view on the items that need to be exported, click on *Action*, and, then, -on *Export*. - -.. image:: media/list-view-export.png - :align: center - :alt: view of the different things to enable/click to export data - -Pretty simple, this action still comes with some specificities. In fact, -when clicking on *Export*, a pop-up window appears with several -options for the data to export: - -.. image:: media/export-data-overview.png - :align: center - :alt: overview of all the options to take into account when exporting data in Odoo - -1. With the *I want to update data* option ticked, the system only - shows the fields which can be imported. This is very helpful in - case you want to update existing records. Basically, this works - like a filter. Leaving the box unticked gives way more field - options because it shows all the fields, not just the ones which - can be imported. -2. When exporting, you can choose between two formats: .csv and .xls. - With .csv, items are separated with a comma, while .xls holds information about all the - worksheets in a file, including both content and formatting. -3. Those are the items you may want to export. Use the arrows to display - more sub-field options. Of course, you can use the search bar to - find specific fields more easily. To use the search option more - efficiently, display all the fields by clicking on all the - arrows! -4. The + button is there to add fields to the “to export” list. -5. The “handles” next to the selected fields allow you to move the fields up and down to - change the order in which they must be displayed in the exported - file. -6. The trashcan is there if you need to remove fields. -7. For recurring reports, it might be interesting to save export presets. - Select all the needed ones and click on the template bar. - There, click on *New template* and give a name to yours. The - next time you need to export the same list, simply select the - related template. - -.. tip:: - It’s good to keep the field’s external identifier in mind. For example, - *Related Company* is equal to *parent_id*. Doing so helps export - only what you would like to import next. \ No newline at end of file diff --git a/redirects.txt b/redirects.txt index 1e0ac4fe6..982878556 100644 --- a/redirects.txt +++ b/redirects.txt @@ -202,5 +202,8 @@ applications/general/multi_companies/manage_multi_companies.rst applications/gen applications/general/payment_acquirers/payment_acquirers.rst applications/general/payment_acquirers.rst # payment_acquirers/payment_acquirers -> payment_acquirers applications/general/unsplash/unsplash_access_key.rst applications/general/unsplash.rst # unsplash/unsplash_access_key -> unsplash applications/general/unsplash/unsplash_application_id.rst applications/general/unsplash.rst # unsplash/unsplash_application_id -> unsplash +applications/general/base_import/import_faq.rst applications/general/export_import_data.rst # base_import/import_faq -> odoo_basics/import_data +applications/general/base_import/adapt_template.rst applications/general/export_import_data.rst # base_import/adapt_template -> odoo_basics/import_data +content/applications/general/odoo_basics/export-data.rst applications/general/export_import_data.rst # odoo_basics/export-data -> export_import_data applications/finance/sign/overview/signature_validity.rst applications/finance/sign.rst #sign/overview/signature_validity -> sign/*