导入产品

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

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

导入模板

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

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

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

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

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

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

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

自定义产品导入模板

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

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

    虽然这不是强制性的,但在 内部参考 列中为每个产品设置一个唯一的标识符(如 FURN_001)在很多情况下是有帮助的。这甚至可以来自以前的软件电子表格,以方便向 Odoo 过渡。

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

  • 不要 更改想要导入直栏的标签。否则,Odoo 将无法识别它们,要靠使用者在导入画面将它们手动配对。

  • 如有需要,请随意在模板电子表格中添加新列。但需要留意,这些字段 必须 在 Odoo 中存在。如果 Odoo 无法将字段名配对至字段,可在汇入过程中手动配对。

    在导入已完成模板的过程中,Odoo 会显示一个页面,显示新配置的产品模板电子表格的所有元素,由 文件列Odoo 字段备注 分隔。

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

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

导入产品模板电子表格

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

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

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

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

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

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

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

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

如果文件列输入正确,会出现“似乎一切有效”讯息。

如果出现任何错误,Odoo 会在页面顶部显示一个红色横幅,当中提供有关问题在何处找到,以及如何修复这些问题的说明。

如果文件列与 Odoo 字段不匹配,会显示导入错误讯息。

修复这些错误后,再次点击 测试,以确保所有要处理的问题均已作出适当修正。

若需要上载其他产品模板电子表格,请点击 上传文件 按钮,选择所需的产品模板电子表格,然后重复以上步骤。

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.

关系字段

在 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.

参见

产品变体