导入产品

The Odoo Sales app provides a template for importing products with categories and variants, which can be opened and edited with any spreadsheet software (Microsoft Excel, OpenOffice, Google Sheets, etc.).

When this spreadsheet is filled out correctly, it can be uploaded to the Odoo database within minutes. By the end of the process, all the products and their variants are live within Odoo and accessible in the product catalog.

Download template

To import products with categories and variants, the Import Template for Products must be downloaded. Once downloaded, the template can be adjusted and customized, and then uploaded into the Odoo database.

To download the necessary import template, navigate to Sales app ‣ Products ‣ Products. On the Products page, click the (Action) icon in the upper-left corner.

From the drop-down menu, select the Import records option.

The Import records option selectable from the cog icon on the Products page in Odoo Sales.

Selecting Import records displays a separate page with a Import Template for Products link to download the template.

The Import records option selectable from the cog icon on the Products page in Odoo Sales.

Once downloaded, open the spreadsheet file to customize it.

自定义产品导入模板

When modifying the product import template, keep in mind the following:

  • Feel free to remove any columns that aren’t deemed necessary. But, it is recommended that the Internal Reference column remain.

    While it is not mandatory, having a unique identifier (e.g., FURN_001) in the Internal Reference column for each product can be helpful in many cases. This can even be from previous software spreadsheets to ease the transition into Odoo.

    例如,在更新导入产品时,同一文件可以多次导入而不会产生重复,从而提高了导入产品管理的效率和简便性。

  • Do not change the labels of columns that are meant to be imported. Otherwise, Odoo won’t recognize them, forcing the user to map them manually on the import screen.

  • Feel free to add new columns to the template spreadsheet, if desired. However, to be added, those fields must exist in Odoo. If Odoo can’t match the column name with a field, it can be matched manually during the import process.

    During the import of the completed template, Odoo displays a page that shows all the elements of the newly configured product template spreadsheet, separated by File Column, Odoo Field, and Comments.

    To manually match a column name with a field in Odoo, click the Odoo Field drop-down menu next to the File Column that needs a manual adjustment, and select the appropriate field.

    需要手动调整的字段列旁的 Odoo 字段下拉菜单。

导入产品模板电子表格

自定义产品模板电子表格后,返回到 Odoo 产品导入页面(此处有模板下载链接),然后点击左上角的 上传文件 按钮。

Odoo 销售中导入产品模板下载页面上的上传文件按钮。

然后会弹出一个窗口,在该窗口中应选择完成的产品模板电子表格文件并上传到 Odoo。

After that, Odoo displays a page that shows all the elements of the newly configured product template spreadsheet, organized by File Column, Odoo Field, and Comments.

上传产品模板后,在 Odoo 销售中导入文件页面。

在此,如有必要,可将 文件栏 手动分配给 Odoo 字段

To ensure everything is appropriate and that all the columns and fields are aligned correctly, click the Test button in the upper-left corner.

If everything is lined up and applied correctly, Odoo displays a blue banner at the top of the page, indicating that Everything seems valid.

The everything seems valid message that appears if file columns are entered correctly.

If there are any errors, Odoo displays a red banner at the top of the page with instructions on where to locate the specific issues and how to fix them.

The import error message that appears if file columns don't match an Odoo Field.

Once those errors are fixed, click Test again to ensure all necessary issues have been remedied appropriately.

If additional product template spreadsheets need to be uploaded, click the Load Data File button, select the desired template, then repeat the process.

When everything is ready, click the Import button.

When clicked, Odoo instantly imports those products and reveals the main Products page, with a pop-up message in the upper-right corner. This pop-up message informs the user how many products were successfully imported.

The pop-up window that appears after a successful product import process in Odoo Sales.

At this point, all the newly imported products are accessible and editable on the Products page.

Import relation fields, attributes, and variants

It’s important to note that an Odoo object is always related to many other objects. For example, a product is linked to product categories, attributes, vendors, and related information. These links/connections are known as relations.

Note

To import product relations, the records of the related object must be imported first from their own list menu.

Relation fields

In Odoo, product forms include several fields that can be modified and customized at any time. These fields are available on every tab of a product form. While these fields can be edited directly on the product form, they can also be modified via a product import.

As mentioned, relation fields of this nature can only be imported for products if they already exist in the database. For example, if a user attempts to import a product with a Product Type, it must be one of the preconfigured product types in the database (e.g., Tracked Product, Untracked, etc.).

要在产品导入模板电子表格中导入关系字段的信息,请在电子表格中添加字段名称作为列名/标题。然后,在相应的产品行中添加所需的关系字段选项。

When all desired relation field information has been entered, save the spreadsheet, and import it to the database. Go to the Sales app ‣ Products ‣ Products. On the Product page click the (Action) icon and select Import records ‣ Upload File.

Once the spreadsheet with the newly-configured relation field information has been uploaded, click Import, and Odoo returns to the Products page.

Once the newly changed/modified products, complete with the new relation field information, have been imported and uploaded, that new information can be found on the Products page.

Attributes and values

Odoo supports importing attributes and values for both already existing and newly imported products. Attributes and values must be uploaded through a separate spreadsheet or CSV file before they can be applied to other products.

The column names/titles for the attributes and values spreadsheet should be: Attribute, Display Type, Variant Creation Mode, and Values / Value.

An attributes and values spreadsheet template for imports.
  • Attribute: name of the attribute (e.g., Size).

  • Display Type: display type used in the product configurator. There are three display type options:

    • Radio: values displayed as radio buttons

    • Selection: values displayed in a selection list

    • Color: values denoted as a color selection

  • Variant Creation Mode: how the variants are created when applied to a product. There are three variant creation mode options:

    • Instantly: all possible variants are created as soon as the attribute and its values are added to a product.

    • Dynamically: each variant is created only when its corresponding attributes and values are added to a sales order.

    • Never: variants are never created for the attribute.

      Note

      The Variants Creation Mode cannot be changed once the attribute is used on at least one product.

  • Values/Value: values pertaining to the corresponding attribute. If there are multiple values for the same attribute, they need to be on separate lines in the spreadsheet.

Once the desired attributes and values have been entered and saved in the spreadsheet, it’s time to import and upload the spreadsheet to Odoo. To do that, navigate to Sales app ‣ Configuration ‣ Attributes. On the Attributes page, click the (Action) icon and select Import records ‣ Upload File.

Once the spreadsheet with the newly-configured attributes and values has been uploaded, click Import, and Odoo returns to the Attributes page. That’s where the newly added attributes and values can be found and edited, if necessary.

As mentioned previously, when attributes and values have been added to the Odoo database, they can be used for existing or imported products.

产品变体

When product attributes and values are configured in the database, they can be used in product import spreadsheets to add more information and detail imported products.

To import products with product attributes and values, the product import template spreadsheet must be configured with specific Product Attributes / Attribute, Product Attributes / Values, and Name columns.

There may be other columns as well, but these are required to import products with specific variants properly.

Product variants spreadsheet with product attributes and variants for import purposes.
  • Name: product name

  • Product Attributes / Attribute: name of attribute

  • Product Attributes / Values: values pertaining to the corresponding attribute

Tip

To import multiple values, separate them with a single comma, not a comma followed by a space, in the product import template spreadsheet (e.g., furniture,couch,home).

When the desired products and product variants have been entered and saved in the spreadsheet, it is time to import them into Odoo. To do that, navigate to Sales app ‣ Products ‣ Products. On the Products page, click the (Action) icon and select :Import records ‣ Upload File.

Once the spreadsheet with the newly-configured products and product variants has been uploaded, click Import, and Odoo returns to the Products page. That’s where the newly-added products can be found.

To view and modify the attributes and variants on any products, select the desired product from the Products page and click the Attributes & Variants tab.

更多内容

产品变体