插入并链接 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),可在新浏览器标签页中打开结果。
查看底层数据后,要返回电子表格,请点击页面顶部面包屑导航中的电子表格名称。