如何在我的数据之外使用谷歌电子表格?

可以在谷歌电子表格 (Google Spreadsheet)中创建常用的仪表盘,并通过电子表格的公式直接从Odoo中检索数据. 您可以用它来创建销售佣金计划,预算,项目预测等等。公式使用Python语言开发,但不必具备编程技巧。

设置

From the General Settings, activate Google Drive and Google Spreadsheet. The options Authorization Code and Get Authorization Code are now available.

Enable the Google Drive and Google Spreadsheet features in Odoo

Now, link your Google account with Odoo by following these steps:

  1. 获取授权代码

  2. Select your Google account

  3. Enter your password

  4. Copy the code

  5. Paste it into the Authorization Code field

创建一个新的电子表格

例如,在 CRM 应用中,转到 收藏夹 ,然后单击 添加到谷歌电子表格

From the CRM application, for example, click on add to Google Spreadsheet in Odoo

新的电子表格将在您的谷歌云端硬盘中自动创建。

注解

当您打开此新文件时,Odoo会自动创建第二张表格,其中包含有关 *如何使用谷歌电子表格 * 的教程/文档。

应用

You have two different formulas available when using Google Spreadsheet in Odoo: retrieve data and retrieve grouped sums.

警告

谷歌云端硬盘会限制手稿的执行时间; 如果您请求的数据花费太长时间而无法传递,则可能会出现错误。 没有具体的大小限制,因为Odoo响应的时间取决于几个因素 - 尽管读取有关数千条记录的数据通常没问题的。

检索数据

理论公式为 = oe_browse (table;columns;filters;orderby:limit)。 如果您要显示信息而不进行分组(例如:数据库中的每个销售订单),请使用它。
在下表中找到一些参数。
Table with examples of arguments to use in Odoo

获取分组求和结果

理论公式为 = oe_read_group (table;columns;group_by;filters;orderby:limit). 当您要显示数据总和时(例如,发票总额),请使用它。
查找下表中的一些参数。
Table with examples of grouped sum arguments to use in Odoo

其他用途

将Odoo数据与电子表格数据混合,添加传统公式,并创建动态表和图形。