Skip to content

Commit 416fcaa

Browse files
Feliciouskekissksc-odoosamueljlieber
committed
[ADD] purchase: import vendor pricelist
closes odoo#11141 X-original-commit: 3b69030 Signed-off-by: Felicia Kuan (feku) <feku@odoo.com> Co-authored-by: kekiss <karaekiss@yahoo.com> Co-authored-by: ksc-odoo <73958186+ksc-odoo@users.noreply.github.com> Co-authored-by: Sam Lieber (sali) <36018073+samueljlieber@users.noreply.github.com>
1 parent d8e0ae0 commit 416fcaa

File tree

10 files changed

+267
-0
lines changed

10 files changed

+267
-0
lines changed

content/applications/inventory_and_mrp/purchase/manage_deals/rfq.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,17 @@ name. Then, go to the :guilabel:`Inventory` tab, and enable the :guilabel:`Buy`
3333
:align: center
3434
:alt: Required configuration for purchasable products.
3535

36+
.. _purchase/manage_deals/vendor-pricelist:
37+
3638
Vendor pricelist
3739
----------------
3840

3941
In the :guilabel:`Purchase` tab of the product form, input the vendor and their price, to have this
4042
information auto-populate on an |RFQ| each time the product is listed.
4143

44+
.. seealso::
45+
:doc:`../products/pricelist`
46+
4247
Default columns include :guilabel:`Quantity`, :guilabel:`Price`, and :guilabel:`Delivery Lead Time`,
4348
but other columns like, :guilabel:`Product Variant` or :guilabel:`Discounts`, can also be enabled.
4449

content/applications/inventory_and_mrp/purchase/products.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Products
77
.. toctree::
88
:titlesonly:
99

10+
products/pricelist
1011
products/reordering
1112
products/temporary_reordering
1213
products/uom
Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
=======================
2+
Import vendor pricelist
3+
=======================
4+
5+
Set vendor prices to auto-populate requests for quotations (RFQs) or purchase orders (POs) with the
6+
unit price, once the product is added, which reduces errors and saves time.
7+
8+
In Odoo, vendor pricelists can be :ref:`added individually <purchase/products/pricelist>` on the
9+
product form, or :ref:`imported in bulk <purchase/products/import-pricelist>`, via an XLSX or CSV
10+
file.
11+
12+
.. important::
13+
Please review this :doc:`import guide <../../../essentials/export_import_data>` before uploading
14+
vendor pricelists.
15+
16+
.. _purchase/products/pricelist:
17+
18+
On product form
19+
===============
20+
21+
To manually add the vendor price on the product form, go to the :menuselection:`Purchase app -->
22+
Products --> Products`, and click the desired product.
23+
24+
.. note::
25+
Product forms are accessible from multiple apps, such as **Sales**, **Inventory**, and
26+
**Manufacturing**.
27+
28+
In the :guilabel:`Purchase` tab of the product form, input the vendor and their price, to have this
29+
information auto-populate on a request for quotation each time the product is listed.
30+
31+
.. seealso::
32+
:ref:`Vendor pricelist on product form <purchase/manage_deals/vendor-pricelist>`
33+
34+
.. image:: pricelist/product-form-pricelist.png
35+
:alt: Vendor pricelist on product form.
36+
37+
.. _purchase/products/import-pricelist:
38+
39+
Import vendor pricelist
40+
=======================
41+
42+
To import vendor pricelists, ensure the XLSX or CSV file is accurately completed. The best way to
43+
obtain a correctly formatted template, including product names, references, and vendor details, is
44+
to first :ref:`export a pricelist <purchase/products/export-price>` from the database.
45+
46+
Modify the exported file, as needed, then import it back into the Odoo database.
47+
48+
.. _purchase/products/export-price:
49+
50+
Export pricelist
51+
----------------
52+
53+
To export a pricelist, go to :menuselection:`Purchase app --> Configuration --> Vendor Pricelists`.
54+
55+
On the page, tick the checkbox(es) for the desired vendor pricelists.
56+
57+
Then, click the :icon:`fa-cog` :guilabel:`Actions` button that appears, and choose :icon:`fa-upload`
58+
:guilabel:`Export` from the drop-down menu.
59+
60+
.. image:: pricelist/export.png
61+
:alt: Show selected exported fields, with the Export button visible.
62+
63+
In the resulting pop-up window, fields listed under the :guilabel:`Fields to export` section are
64+
included in the exported file. To add more fields, find the desired field in the
65+
:guilabel:`Available fields` section, and click the :icon:`fa-plus` :guilabel:`(plus)` icon to the
66+
right of the field.
67+
68+
.. note::
69+
To update to existing records, tick the :guilabel:`I want to update data (import-compatible
70+
export)` checkbox, and refer to the section on the :ref:`External ID
71+
<purchase/products/external-id>` field.
72+
73+
For details on commonly-used fields for importing vendor pricelists, see the :ref:`Common fields
74+
<purchase/products/common-fields>` section.
75+
76+
Select the desired :guilabel:`Export Format`: :guilabel:`XLSX` or :guilabel:`CSV`.
77+
78+
To save the selected fields as a template, click the :guilabel:`Template` field, and select
79+
:guilabel:`New template` from the drop-down menu. Type the name of the new template, and click the
80+
:icon:`fa-floppy-o` :guilabel:`(save)` icon. After that, the template is a selectable option when
81+
clicking the :guilabel:`Template` field.
82+
83+
Finally, click :guilabel:`Export`.
84+
85+
.. note::
86+
With :ref:`developer mode <developer-mode>` turned on, the column names of the exported file
87+
display the *field name* with the *technical name* in parenthesis.
88+
89+
.. example::
90+
.. figure:: pricelist/export-data.png
91+
:alt: Exporting vendor pricelist.
92+
93+
Export vendor pricelist in XLSX format. It includes :guilabel:`Product Template` and other
94+
fields in the :guilabel:`Fields to export` section.
95+
96+
.. _purchase/products/external-id:
97+
98+
External ID
99+
~~~~~~~~~~~
100+
101+
*External ID* is a unique identifier used to update existing vendor pricelists. Without it, imported
102+
records create new entries, instead of updating existing ones. Including this field in the XLSX or
103+
CSV, indicates the line replaces an existing vendor pricelist in the Odoo database.
104+
105+
.. example::
106+
.. figure:: pricelist/duplicate-values.png
107+
:alt: Show 'Ready Mat' appear twice.
108+
109+
`Ready Mat` appears twice because the external ID was omitted during the price update from
110+
`$790` to `$780`.
111+
112+
To look-up the :guilabel:`External ID` for a vendor pricelist, tick the :guilabel:`I want to update
113+
data (import-compatible export)` checkbox at the top of the :guilabel:`Export Data` pop-up window.
114+
115+
.. note::
116+
Selecting :guilabel:`External ID` from the :guilabel:`Available fields` section with the
117+
:guilabel:`I want to update data (import-compatible export)` checkbox ticked results in an export
118+
file with two columns containing the external ID.
119+
120+
.. _purchase/products/common-fields:
121+
122+
Common fields
123+
~~~~~~~~~~~~~
124+
125+
Below is a list of commonly-used fields when importing vendor pricelists:
126+
127+
.. list-table:: Field name definitions
128+
:header-rows: 1
129+
130+
* - Field name
131+
- Used for
132+
- Field in Odoo database
133+
- Technical name of field
134+
* - Vendor
135+
- The only required field for creating a vendor pricelist record. This field specifies the
136+
vendor associated with the product.
137+
- :guilabel:`Vendor` field in the :ref:`vendor pricelist of the product form
138+
<purchase/products/pricelist>`.
139+
- `partner_id`
140+
* - Product Template
141+
- The Odoo product the vendor pricelist entry is related to.
142+
- :guilabel:`Product` field in the vendor pricelist.
143+
- `product_tmpl_id`
144+
* - Quantity
145+
- The minimum quantity required to receive the product at the specified price.
146+
- :guilabel:`Quantity` field in the vendor pricelist. (If not visible, enable it by clicking
147+
the :icon:`oi-settings-adjust` :guilabel:`(settings)` icon, and tick the :guilabel:`Quantity`
148+
checkbox)
149+
- `min_qty`
150+
* - Unit Price
151+
- The purchase price for the product from the vendor.
152+
- :guilabel:`Price` field in the vendor pricelist.
153+
- `price`
154+
* - Delivery Lead Time
155+
- :ref:`Number of days <inventory/shipping_receiving/purchase-lt>` before receiving the
156+
product after confirming a purchase order.
157+
- :guilabel:`Delivery Lead Time` field on the vendor pricelist.
158+
- `delay`
159+
* - Sequence
160+
- Defines the order of vendors in the pricelist when multiple vendors are available. For
161+
example, if `Azure Interior` is listed first and Wood Corner second, their sequences would be
162+
`1` and `2`.
163+
- N/A
164+
- `sequence`
165+
* - Company
166+
- Name of company the product belongs to.
167+
- :guilabel:`Company` field in the vendor pricelist.
168+
- `company_id`
169+
* - :ref:`External ID <purchase/products/external-id>`
170+
- Unique ID of a record used to update existing vendor pricelists.
171+
- N/A
172+
- `id`
173+
174+
Import records
175+
--------------
176+
177+
With a template downloaded, fill out the XLSX or CSV file with the necessary information. After
178+
inputting everything, import the file back into the Odoo database, by going to
179+
:menuselection:`Purchase app --> Configuration --> Vendor Pricelists`.
180+
181+
On the page, click the :icon:`fa-cog` :guilabel:`(gear)` icon in the top-left corner. In the
182+
drop-down menu that appears, click :guilabel:`Import records`.
183+
184+
Then, click :guilabel:`Upload File` in the upper-left corner, and after selecting the XLSX or CSV
185+
file, confirm the correct fields, and click :guilabel:`Import`.
186+
187+
.. seealso::
188+
- :doc:`../../../essentials/export_import_data`
189+
- :ref:`Common fields <purchase/products/common-fields>`
190+
191+
.. image:: pricelist/supplier-pricelist-example.png
192+
:alt: Upload file screen.
193+
194+
Formatting import file
195+
~~~~~~~~~~~~~~~~~~~~~~
196+
197+
To understand how to format import files for vendor pricelists, consider the following example.
198+
199+
- `Storage Box` (:guilabel:`Reference`: `E-COM08`) is sold by `Wood Corner` for `$10`.
200+
- `Large Desk` (:guilabel:`Reference`: `E-COM09`) has no records in the vendor pricelist.
201+
202+
An import file is created to do the following:
203+
204+
- Update the price for `Wood Corner` from `$10` to `$13`.
205+
- Add pricelist for `Storage Box`: the vendor, `Ready Mat` intends to sell the product for `$14`.
206+
- Add pricelist for `Large Desk`: vendor is `Wood Corner`, price is `$1299`.
207+
- Add pricelist for `Large Desk`: vendor is `Azure Interior`, price is `$1399`.
208+
209+
.. list-table:: Vendor pricelist data
210+
:header-rows: 1
211+
212+
* - id
213+
- company_id
214+
- delay
215+
- price
216+
- product_tmpl_id
217+
- sequence
218+
- partner_id
219+
* - product.product_supplierinfo_3
220+
- My Company (San Francisco)
221+
- 3
222+
- 13.00
223+
- [E-COM08] Storage Box
224+
- 4
225+
- Wood Corner
226+
* -
227+
- My Company (San Francisco)
228+
- 3
229+
- 14.00
230+
- [E-COM08] Storage Box
231+
- 5
232+
- Ready Mat
233+
* -
234+
- My Company (San Francisco)
235+
- 2
236+
- 1299.00
237+
- [E-COM09] Large Desk
238+
- 6
239+
- Wood Corner
240+
* -
241+
- My Company (San Francisco)
242+
- 4
243+
- 1399.00
244+
- [E-COM09] Large Desk
245+
- 7
246+
- Azure Interior
247+
248+
.. note::
249+
The *technical field name* was used to create this information.
250+
251+
.. note::
252+
Download the sample files for reference:
253+
254+
- :download:`Sample XLSX import file <pricelist/pricelist-example.xlsx>`
255+
- :download:`Sample CSV import file <pricelist/pricelist-example.csv>`
256+
Loading
Loading
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"id","company_id","delay","price","product_tmpl_id","sequence","partner_id"
2+
"product.product_supplierinfo_3","My Company (San Francisco)","3","13.0","[E-COM08] Storage Box","4","Wood Corner"
3+
"","My Company (San Francisco)","3","14.4","[E-COM08] Storage Box","5","Ready Mat"
4+
"","My Company (San Francisco)","2","1299.0","[E-COM09] Large Desk","6","Wood Corner"
5+
"","My Company (San Francisco)","4","1399.0","[E-COM09] Large Desk","7","Azure Interior"
Loading

0 commit comments

Comments
 (0)