导入产品

Odoo 销售 应用程序提供了一个模板,用于导入带有类别和变体的产品,该模板可使用任何电子表格软件(Microsoft Excel、OpenOffice、Google Sheets等)打开和编辑。

电子表格填写正确后,可快速上传到 Odoo 数据库。上传后,这些产品就会立即添加到产品目录中,并可在产品目录中访问和编辑。

导入模板

为了导入带有类别和变体的产品,必须下载**产品导入模板*。下载后,可对模板进行调整和定制,然后上载回 Odoo 数据库。

要下载必要的导入模板,请导航至 销售应用程序 ‣ 产品 ‣ 产品。在 产品 页面上,点击左上角的 ⚙️(齿轮) 图标。这样就会显示一个下拉菜单。

从下拉菜单中选择 导入记录 选项。

可从 Odoo 销售“产品”页面的齿轮图标中选择“导入记录”选项。

选择 导入记录 会显示一个单独的页面,其中有下载 产品导入模板 的链接。点击该链接下载模板。

可从 Odoo 销售“产品”页面的齿轮图标中选择“导入记录”选项。

模板下载完成后,打开电子表格文件进行定制。

自定义产品导入模板

下载并打开导入模板后,就可以修改其内容了。不过,在进行任何修改之前,在此过程中需要注意几个要素:

  • 请随意删除任何认为不必要的列。但强烈建议保留 内部参考 列。

    虽然这不是强制性的,但在 内部参考 列中为每个产品设置一个唯一的标识符(如 FURN_001)在很多情况下是有帮助的。这甚至可以来自以前的软件电子表格,以方便向 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 on the import screen manually.

  • 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 process of the completed template, Odoo reveals a page showcasing all the elements of the newly-configured product template spreadsheet, separated by File Column, Odoo Field, and Comments.

    要将列名与 Odoo 中的字段手动匹配,请点击需要手动调整的 文件栏 旁边的 Odoo 字段 下拉菜单,然后从该下拉菜单中选择适当的字段。

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

导入产品模板电子表格

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

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

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

之后,Odoo 会显示一个页面,展示新配置的产品模板电子表格的所有元素,这些元素由 文件栏Odoo 字段评论 分隔。

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

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

要确保一切妥当,所有列和字段都准确排列,请点击左上角的 测试 按钮。

如果一切正常,Odoo 会在页面顶部显示一个蓝色横幅,通知用户 一切正常

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

If there are any errors, Odoo reveals a red banner at the top of the page, with instructions of 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 File button, select the desired product template spreadsheet, and 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 via 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 things of this nature. These links/connections are known as relations.

注解

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

Relation fields

在 Odoo 的产品表单中,有许多字段可以随时修改和自定义。这些字段位于产品表单的每个选项卡下。这些字段可以直接在产品表单上轻松编辑,也可以通过产品导入进行修改。

如前所述,这种性质的关系字段**只能**导入数据库中已存在的产品。例如,如果用户试图导入一个*产品类型*的产品,它只能是数据库中现有的预配置产品类型之一(如*可储存产品*、*可消费产品*等)。

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

输入所有所需的关系字段信息后,保存电子表格,并按照上述流程将其导入数据库(销售应用程序 ‣ 产品 ‣ 产品 ‣ ⚙️(齿轮)图标 ‣ 导入记录 ‣ 上传文件)。

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

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

Attributes and values

Odoo also allows users to import product attributes and values that can be used for products that already exist in the database, and/or with imported products.

To import attributes and values, a separate spreadsheet or CSV file dedicated to attributes and values must be imported and uploaded before they can be used for other products.

The column names/titles of the attributes and values spreadsheet should be as follows: 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

      注解

      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, the values need to be in individual lines on the spreadsheet.

Once the desired attributes and values have been entered and saved in the spreadsheet, it’s time to import and upload it into Odoo. To do that, navigate to Sales app ‣ Configuration ‣ Attributes ‣ ⚙️ (gear) icon ‣ 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 those 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 on product import spreadsheets to add more information and detail to products being imported.

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 can be other columns, as well, but these columns are required in order to properly import products with specific variants.

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

小技巧

To import multiple values, separate them by just a 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’s time to import and upload them into Odoo. To do that, navigate to Sales app ‣ Products ‣ Products ‣ ⚙️ (gear) icon ‣ 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.

参见

产品变体