插入并链接 Odoo 数据¶
可将 Odoo 数据库中的多个元素插入 Odoo 电子表格,即:
每次插入列表、数据透视表或图表时,都会创建一个数据源,将电子表格直接连接到底层数据。
注解
来自不同应用程序和模型的列表、透视表和图表可以插入到同一个电子表格中。
小技巧
如果您打算使用全局筛选器在电子表格或统计面板中动态筛选 Odoo 数据,请不要使用相同的条件在数据库中建立初始列表、数据透视表或图表。
也有可能:
数据源¶
当您插入列表或图表从 Odoo 列表或图表视图到 Odoo 电子表格中,或者插入引用 Odoo 数据的数据透视表从 Odoo 数据透视视图或直接从电子表格,电子表格会通过唯一的”数据源”自动连接到底层数据。
此连接确保电子表格中的数据在数据库中的相应数据更改时更新,并允许您访问底层数据。
注解
链接到 Odoo 模型的列表、数据透视表或图表中的数据会在每次打开电子表格或重新加载浏览器页面时刷新。还可以通过菜单栏点击 来手动刷新数据。
从数据区域插入数据透视表也会创建一个数据源,将数据透视表连接到底层电子表格区域。
每个数据源都由唯一的 ID 标识,每种源类型(即列表、数据透视表或图表)分别编号,每个新列表、数据透视表或图表按顺序编号,例如 列表 #1、列表 #2、数据透视 #1 等。
The properties of a data source can be accessed via the Data menu, where they are grouped by source type, and then listed in ascending order by source ID. The name of the data source is displayed, e.g., (#1) Sales Analysis by Product.
单击数据源会在电子表格右侧的面板中打开相关属性。
注解
Deleting an inserted list or pivot table, or deleting the sheet into which it was inserted, does not delete the underlying data source; this can be done via the data source’s properties. Unused data sources from inserted lists or pivot tables can also be deleted via the Data cleanup feature. Deleting an inserted chart deletes its underlying data source.
小技巧
也可以通过右键单击已插入列表或数据透视表的任何单元格,然后单击 查看列表属性或 查看数据透视表属性,或者通过单击已插入图表右上角的 (菜单)图标,然后单击 编辑来打开属性面板。
特定数据源的属性打开后,即使在电子表格选项卡之间导航时也会保持打开状态。要关闭属性面板,请单击面板右上角的 (关闭)图标。
要折叠属性面板,请点击面板顶部的 (双箭头)图标。
To pin the properties panel and allow another panel, such as the global filters panel, to open beside it, click from the menu bar. To unpin a panel, click the (pin) icon at the top right of the panel.
Identify and delete unused data sources¶
To identify and delete unused data sources, i.e., data sources that are still connected to the spreadsheet but where the data has been deleted, follow these steps:
Click from the menu bar. The Unused data sources panel opens to the right of the spreadsheet. Unused pivot tables and unused lists are displayed in their respective sections.
Optionally, unselect any data sources that should not be deleted, then click Delete selected items.
Access underlying data¶
可以随时访问已插入列表、数据透视表或图表的基础数据。查看方式:
已插入列表的单个记录,右键单击相关行的任何单元格,然后选择 查看记录
已插入数据透视表的单个单元格引用的记录列表,右键单击该单元格,然后选择 查看记录
已插入图表的数据点表示的记录列表,单击该数据点。
小技巧
使用鼠标中键或 Ctrl + 左键单击(Microsoft/Linux),或 Command + 左键单击(Mac OS)在新的浏览器选项卡中打开结果。
查看基础数据后,要返回电子表格,请单击页面顶部面包屑中的电子表格名称。