Skip to content

Commit 7fdeaba

Browse files
committed
[IMP] Export: Updated quotations template for order lines
closes #15533 X-original-commit: c9f3856 Signed-off-by: Megan Valenzuela (meval) <meval@odoo.com>
1 parent d74c915 commit 7fdeaba

File tree

8 files changed

+62
-70
lines changed

8 files changed

+62
-70
lines changed

content/applications/essentials/export_import_data.rst

Lines changed: 56 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
Export and import data
33
======================
44

5-
.. |list| replace:: :icon:`oi-view-list` :guilabel:`(list)` icon
6-
.. |actions| replace:: :icon:`fa-cog` :guilabel:`Actions`
7-
85
In Odoo, it is sometimes necessary to export or import data for running reports, or for data
96
modification. This document covers the export and import of data into and out of Odoo.
107

@@ -19,49 +16,48 @@ Export data from Odoo
1916
=====================
2017

2118
When working with a database, it is sometimes necessary to export data in a distinct file. Doing so
22-
can aid in reporting on activities, although, Odoo provides a precise and easy reporting tool with
23-
each available application.
19+
can aid in reporting on activities, although, Odoo provides a precise reporting tool with each
20+
available application.
2421

2522
With Odoo, the values can be exported from any field in any record. To do so, activate the list view
26-
(|list|), on the items that need to be exported, then select the records that should be exported. To
27-
select a record, tick the checkbox next to the corresponding record. Finally, click on |actions|,
28-
then :guilabel:`Export`.
23+
:icon:`fa-list` :guilabel:`(List)` icon, on the items that need to be exported, and then select the
24+
records that should be exported. To select a record, tick the checkbox next to the corresponding
25+
record. Finally, click the :guilabel:`Action` button, and select :icon:`fa-upload`
26+
:guilabel:`(Export)`.
2927

3028
.. image:: export_import_data/list-view-export.png
31-
:align: center
3229
:alt: View of the different things to enable/click to export data.
3330

34-
When clicking on :guilabel:`Export`, an :guilabel:`Export Data` pop-over window appears, with
35-
several options for the data to export:
31+
When clicking on :icon:`fa-upload` :guilabel:`Export`, a :guilabel:`Export Data` pop-over window
32+
appears, with several options for the data to export:
3633

3734
.. image:: export_import_data/export-data-overview.png
38-
:align: center
3935
:alt: Overview of options to consider when exporting data in Odoo..
4036

4137
#. With the :guilabel:`I want to update data (import-compatable export)` option ticked, the system
4238
only shows the fields that can be imported. This is helpful in the case where the :ref:`existing
4339
records need to be updated <essentials/update-data>`. This works like a filter. Leaving the box
44-
unticked, gives many more field options because it shows all the fields, not just the ones that
40+
unticked, gives many more field options because it shows all the fields, not only the ones that
4541
can be imported.
4642
#. When exporting, there is the option to export in two formats: `.csv` and `.xls`. With `.csv`,
4743
items are separated by a comma, while `.xls` holds information about all the worksheets in a
4844
file, including both content and formatting.
49-
#. These are the items that can be exported. Use the :guilabel:`> (right arrow)` icon to display
50-
more sub-field options. Use the :guilabel:`Search` bar to find specific fields. To use the
51-
:guilabel:`Search` option more efficiently, click on all the :guilabel:`> (right arrows)` to
52-
display all fields.
53-
#. The :guilabel:`+ (plus sign)` icon button is present to add fields to the :guilabel:`Fields to
54-
export` list.
55-
#. The :guilabel:`↕️ (up-down arrow)` to the left of the selected fields can be used to move the
56-
fields up and down, to change the order in which they are displayed in the exported file.
57-
Drag-and-drop using the :guilabel:`↕️ (up-down arrow)` icon.
58-
#. The :guilabel:`🗑️ (trash can)` icon is used to remove fields. Click on the :guilabel:`🗑️ (trash
59-
can)` icon to remove the field.
45+
#. These are the items that can be exported. Use the :icon:`fa-chevron-right` :guilabel:`(Show
46+
sub-fields)` icon to display more sub-field options. Use the :guilabel:`Search` bar to find
47+
specific fields. To use the :guilabel:`Search` option more efficiently, click on all the
48+
:icon:`fa-chevron-right` :guilabel:`(Show sub-fields)` icon to display all fields.
49+
#. The :icon:`fa-plus` :guilabel:`(Select field)` icon button is present to add fields to the
50+
:guilabel:`Fields to export` list.
51+
#. The :icon:`fa-sort` :guilabel:`(Sort)` icon to the left of the selected fields can be used to
52+
move the fields up and down, to change the order in which they are displayed in the exported
53+
file. Drag-and-drop using the :icon:`fa-sort` :guilabel:`(Sort)` icon.
54+
#. The :icon:`fa-trash` :guilabel:`(Remove field)` icon is used to remove fields. Click the
55+
:icon:`fa-trash` :guilabel:`(Remove field)` icon to remove the field.
6056
#. For recurring reports, it is helpful to save export presets. Select all the needed fields, and
6157
click on the template drop-down menu. Once there, click on :guilabel:`New template`, and give a
62-
unique name to the export just created. Click the :guilabel:`💾 (floppy drive)` icon to save the
63-
configuration. The next time the same list needs to be exported, select the related template that
64-
was previously saved from the drop-down menu.
58+
unique name to the export template. Click the :icon:`fa-floppy-o` :guilabel:`(floppy drive)` icon
59+
to save the configuration. The next time the same list needs to be exported, select the related
60+
template that was previously saved from the drop-down menu.
6561

6662
.. tip::
6763
It is helpful to know the field's external identifier. For example, :guilabel:`Related Company`
@@ -87,7 +83,6 @@ data into an Odoo database.
8783
options: :guilabel:`Track history during import` and :guilabel:`Allow matching with subfields`.
8884

8985
.. image:: export_import_data/advanced-import.png
90-
:align: center
9186
:alt: Advanced import options when developer mode is activated.
9287

9388
If the model uses openchatter, the :guilabel:`Track history during import` option sets up
@@ -103,11 +98,11 @@ Data can be imported on any Odoo business object using either Excel (`.xlsx`) or
10398
(Comma-separated Values)` (`.csv`) formats. This includes: contacts, products, bank statements,
10499
journal entries, and orders.
105100

106-
Open the view of the object to which the data should be imported/populated, and click on
107-
:menuselection:`⚙️ (Action) --> Import records`.
101+
Open the view of the object to which the data should be imported/populated, click on :icon:`fa-cog`
102+
:guilabel:`(Action)` icon, and in the drop-down menu select :icon:`fa-upload` :guilabel:`(Import
103+
records)`.
108104

109105
.. image:: export_import_data/import-button.png
110-
:align: center
111106
:alt: Action menu revealed with the import records option highlighted.
112107

113108
After clicking :guilabel:`Import records`, Odoo reveals a separate page with templates that can be
@@ -121,7 +116,6 @@ Customers` at the center of the page.
121116
`.xlsx`).
122117

123118
.. image:: export_import_data/formatting.png
124-
:align: center
125119
:alt: Formatting options presented when a CVS file is imported in Odoo.
126120

127121
Make necessary adjustments to the *Formatting* options, and ensure all columns in the
@@ -144,33 +138,31 @@ Once the template is downloaded, proceed to follow these steps:
144138
(ID) column.
145139

146140
.. image:: export_import_data/dragdown.gif
147-
:align: center
148141
:alt: An animation of the mouse dragging down the ID column, so each record has a unique ID.
149142

150143
.. note::
151144
When a new column is added, Odoo may not be able to map it automatically, if its label does not
152145
fit any field within Odoo. However, new columns can be mapped manually when the import is tested.
153146
Search the drop-down menu for the corresponding field.
154147

155-
.. image:: export_import_data/field_list.png
156-
:align: center
148+
.. image:: export_import_data/field-list.png
157149
:alt: Drop-down menu expanded in the initial import screen on Odoo.
158150

159151
Then, use this field's label in the import file to ensure future imports are successful.
160152

161153
.. tip::
162-
Another useful way to find out the proper column names to import is to export a sample file
163-
using the fields that should be imported. This way, if there is not a sample import template,
164-
the names are accurate.
154+
Another useful way to find out the proper column names to import is to export a sample file using
155+
the fields to be imported. This way, if there is not a sample import template, the names are
156+
accurate.
165157

166158

167159
.. _essentials/external-id:
168160

169161
Import from another application
170162
-------------------------------
171163

172-
The :guilabel:`External ID` (ID) is a unique identifier for the line item. Feel free to use one
173-
from previous software to facilitate the transition to Odoo.
164+
The :guilabel:`External ID` (ID) is a unique identifier for a line item. It is possible to use an
165+
:guilabel:`External ID` (ID) from previous software to facilitate the transition to Odoo.
174166

175167
Setting an ID is not mandatory when importing, but it helps in many cases:
176168

@@ -202,8 +194,7 @@ the column may be mapped to a field that is not proposed by default.
202194
If this happens, check the :guilabel:`Show fields of relation fields (advanced) option`, then a
203195
complete list of fields becomes available for each column.
204196

205-
.. image:: export_import_data/field_list.png
206-
:align: center
197+
.. image:: export_import_data/field-list.png
207198
:alt: Searching for the field to match the tax column.
208199

209200
Change data import format
@@ -226,7 +217,7 @@ the preferred format using *ISO 8601* to define the format.
226217
.. important::
227218
*ISO 8601* is an international standard, covering the worldwide exchange, along with the
228219
communication of date and time-related data. For example, the date format should be `YYYY-MM-DD`.
229-
So, in the case of July 24th 1981, it should be written as `1981-07-24`.
220+
In the case of July 24th 1981, it should be written as `1981-07-24`.
230221

231222
.. tip::
232223
When importing Excel files (`.xls`, `.xlsx`), consider using *date cells* to store dates. This
@@ -373,7 +364,7 @@ The tags should be separated by a comma, without any spacing. For example, if a
373364
linked to both tags: `Manufacturer` and `Retailer` then 'Manufacturer,Retailer' needs to be encoded
374365
in the same column of the :abbr:`CSV (Comma-separated Values)` file.
375366

376-
- :download:`CSV file for Manufacturer, Retailer <export_import_data/m2m_customers_tags.csv>`
367+
- :download:`CSV file for Manufacturer, Retailer <export_import_data/m2m-customers-tags.csv>`
377368

378369
Import one2many relationships
379370
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -383,23 +374,24 @@ reserved in the :abbr:`CSV (Comma-separated Values)` file for each order line. T
383374
is imported on the same row as the information relative to order. Any additional lines need an
384375
additional row that does not have any information in the fields relative to the order.
385376

386-
As an example, here is a :abbr:`CSV (Comma-separated Values)` file of some quotations that can be
387-
imported, based on demo data:
377+
.. example::
378+
A company imports quotations using a :abbr:`CSV (Comma-separated Values)` file, based on demo
379+
data:
380+
381+
- :download:`File for some quotations <export_import_data/o2m-quotations-order-lines.csv>`
388382

389-
- :download:`File for some Quotations
390-
<export_import_data/purchase.order_functional_error_line_cant_adpat.csv>`
383+
A company imports purchase orders with their respective purchase order lines using a :abbr:`CSV
384+
(Comma-separated Values)` file:
391385

392-
The following :abbr:`CSV (Comma-separated Values)` file shows how to import purchase orders with
393-
their respective purchase order lines:
386+
- :download:`Purchase orders with their respective purchase order lines
387+
<export_import_data/o2m-purchase-order-lines.csv>`
394388

395-
- :download:`Purchase orders with their respective purchase order lines
396-
<export_import_data/o2m_purchase_order_lines.csv>`
389+
A company imports customers and their respective contacts using a :abbr:`CSV (Comma-separated
390+
Values)` file:
397391

398-
The following :abbr:`CSV (Comma-separated Values)` file shows how to import customers and their
399-
respective contacts:
392+
- :download:`Customers and their respective contacts
393+
<export_import_data/o2m-customers-contacts.csv>`
400394

401-
- :download:`Customers and their respective contacts
402-
<export_import_data/o2m_customers_contacts.csv>`
403395

404396
Import records several times
405397
----------------------------
@@ -418,8 +410,8 @@ Value not provided for a specific field
418410
---------------------------------------
419411

420412
If all fields are not set in the CSV file, Odoo assigns the default value for every non-defined
421-
field. But, if fields are set with empty values in the :abbr:`CSV (Comma-separated Values)` file,
422-
Odoo sets the empty value in the field, instead of assigning the default value.
413+
field. However, if fields are set with empty values in the :abbr:`CSV (Comma-separated Values)`
414+
file, Odoo sets the empty value in the field, instead of assigning the default value.
423415

424416
Export/import different tables from an SQL application to Odoo
425417
--------------------------------------------------------------
@@ -480,8 +472,8 @@ the original database).
480472

481473
The two files produced are ready to be imported in Odoo without any modifications. After having
482474
imported these two :abbr:`CSV (Comma-separated Values)` files, there are four contacts and three
483-
companies (the first two contacts are linked to the first company). Keep in mind to first import
484-
the companies, and then the people.
475+
companies (the first two contacts are linked to the first company). Keep in mind to first import the
476+
companies, and then the people.
485477

486478
.. _essentials/update-data:
487479

@@ -494,10 +486,10 @@ Existing data can be updated in bulk through a data import, as long as the :ref:
494486
Prepare data export
495487
-------------------
496488

497-
To update data through an import, first navigate to the data to be updated, and select the |list| to
498-
activate list view. On the far-left side of the list, tick the checkbox for any record to be
499-
updated. Then, click |actions|, and select :icon:`fa-upload` :guilabel:`Export` from the drop-down
500-
menu.
489+
To update data through an import, first navigate to the data to be updated, and select the
490+
:icon:`oi-view-list` :guilabel:`(List)` icon to activate list view. On the far-left side of the
491+
list, tick the checkbox for any record to be updated. Then, click :guilabel:`Actions` button, and
492+
select :icon:`fa-upload` :guilabel:`(Export)` from the drop-down menu.
501493

502494
On the resulting :guilabel:`Export Data` pop-up window, tick the checkbox labeled, :guilabel:`I want
503495
to update data (import-compatible export)`. This automatically includes the *External ID* in the
8.03 KB
Loading
-19.2 KB
Binary file not shown.

content/applications/essentials/export_import_data/m2m_customers_tags.csv renamed to content/applications/essentials/export_import_data/m2m-customers-tags.csv

File renamed without changes.

content/applications/essentials/export_import_data/o2m_customers_contacts.csv renamed to content/applications/essentials/export_import_data/o2m-customers-contacts.csv

File renamed without changes.

content/applications/essentials/export_import_data/o2m_purchase_order_lines.csv renamed to content/applications/essentials/export_import_data/o2m-purchase-order-lines.csv

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Activities,Company,Customer,Order Date,Order Reference,Pricelist,Order Lines/Product Template,Order Lines/Quantity,Order Lines/Unit Price,Order Lines/Discount (%),Order Lines/Taxes
2+
Answer questions,My Company (San Francisco),Ready Mat,2025-12-01 10:37:22,S00003,Public Pricelist (USD),Virtual Interior Design,10,30.75,0,Tax 10%
3+
,,,,,,[FURN_7777] Office Chair,1,70,0,Tax 10%
4+
,,,,,,Deposit,5,150,0,
5+
,My Company (San Francisco),Ready Mat,2025-11-01 11:37:00,S00002,Public Pricelist (USD),Virtual Interior Design,24,75,0,Tax 10%
6+
,,,,,,Virtual Home Staging,30,38.25,0,Tax 10%

content/applications/essentials/export_import_data/purchase.order_functional_error_line_cant_adpat.csv

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)