[IMP] spreadsheet: expanding functional documentation

Task-3595405

closes odoo/documentation#13612

X-original-commit: b1da6f2075
Signed-off-by: Xavier Platteau (xpl) <xpl@odoo.com>
Signed-off-by: Siobhan McGonigle (mcsi) <mcsi@odoo.com>
This commit is contained in:
mcsi-odoo
2025-03-31 08:50:58 +00:00
parent 499aa849db
commit ddf1689a02
54 changed files with 1554 additions and 321 deletions

View File

@@ -8,37 +8,24 @@ Spreadsheet
.. toctree::
:titlesonly:
spreadsheet/insert
spreadsheet/functions
spreadsheet/templates
spreadsheet/functions
spreadsheet/insert
spreadsheet/dynamic_pivot_tables
spreadsheet/global_filters
Spreadsheet lets you organize, analyze, and visualize your data in tabular form. Among others, you
can:
**Odoo Spreadsheet** allows you to organize, manipulate, analyze, and visualize data. It offers
similar functionality to other spreadsheet solutions with the added benefit of integrating directly
with your Odoo database.
- :doc:`Insert and link your Odoo data (pivots, graphs, lists, and menus) <spreadsheet/insert>`.
- :doc:`Use global filters <spreadsheet/global_filters>`.
- :doc:`Use formulas and functions <spreadsheet/functions>`.
- :doc:`Create and use templates <spreadsheet/templates>`.
- Format data.
- Sort and filter data.
With **Odoo Spreadsheet**, you can:
.. _spreadsheet/glossary:
Glossary
========
Some of Spreadsheet's main :abbr:`UI (user interface)` elements are highlighted and defined below.
.. image:: spreadsheet/ui-elements.png
:align: center
:alt: Spreadsheet main UI elements
#. Menu bar
#. Top bar
#. Formula bar
#. Filters button
#. Row header
#. Column header
#. Cell menu
#. Bottom bar
- create spreadsheets or upload existing `.xlsx` or `.csv` files and edit them
- create :doc:`templates <spreadsheet/templates>`
- :doc:`use functions, including Odoo-specific functions <spreadsheet/functions>`
- :doc:`insert and link to Odoo data <spreadsheet/insert>`
- :doc:`create and use dynamic pivot tables <spreadsheet/dynamic_pivot_tables>`
- filter data across multiple Odoo data sources using :doc:`global filters
<spreadsheet/global_filters>`
- visualize data using charts and formatting
- share files internally and externally

View File

@@ -0,0 +1,221 @@
====================
Dynamic pivot tables
====================
When a pivot view from an Odoo database is inserted in a spreadsheet, it is by default a static
pivot table. Each cell in a static pivot table contains an :ref:`Odoo-specific function
<spreadsheet/insert/pivot-table-functions-static>` that retrieves data from your database.
.. image:: dynamic_pivot_tables/pivot-function-static.png
:alt: Function of static pivot table cell
When the corresponding data in your database changes, e.g., the sales related to a given quarter or
an individual salesperson, the cells of your static pivot table are updated.
However, a static pivot table does not expand automatically to accommodate new data, e.g., sales
data for a new quarter or for a newly hired salesperson. Neither is it possible to add or manipulate
dimensions (i.e., columns or rows) or measures via the pivot table properties.
.. note::
If you attempt to update or manipulate the properties of a pivot table that has just been
inserted into a spreadsheet, an error message appears in the top right corner of the screen:
.. image:: dynamic_pivot_tables/pivot-table-error.png
:alt: Error message when trying to manipulate static pivot table
To have more flexibility in how you can manipulate your pivot table, you can :ref:`create a dynamic
pivot table <spreadsheet/dynamic-pivot-tables/create>` from a static pivot table.
.. _spreadsheet/dynamic-pivot-tables/create:
Create a dynamic pivot table
============================
There are two main ways to create a dynamic pivot table from a static pivot table:
- **Duplicate the static pivot table from the pivot table properties**: :ref:`Open the pivot table
properties <spreadsheet/insert/pivot-table-properties>`, click the :icon:`fa-cog`
(:guilabel:`gear`) icon at the top right of the pane, then click :icon:`fa-clone`
:guilabel:`Duplicate`.
A new data source is created and a dynamic version of the pivot table is inserted into a new
sheet. The dynamic pivot table has the same styling as the original pivot table.
.. note::
When you use this method, your new dynamic pivot table gets the next available pivot ID. This
means you can create multiple pivot views associated with the same model, but with distinct
settings, groupings, or calculations.
- **Re-insert the dynamic pivot table from the Data menu**: On the sheet that contains your static
pivot table, position your cursor in an empty cell. Click :menuselection:`Data -->`
:icon:`os-insert-pivot` :menuselection:`Re-insert dynamic pivot` from the menu bar, then select
the relevant pivot table.
A new, dynamic pivot table appears, with the same styling as the original pivot table.
.. note::
When you use this method, your static and dynamic pivot share the same data source, and,
consequently, the same pivot ID. To avoid confusion, delete the original static pivot table.
.. tip::
It is also possible to directly enter the :ref:`function
<spreadsheet/dynamic-pivot-tables/functions>` of the dynamic pivot table in an empty cell.
However, with this method, the table styling needs to be re-applied manually.
.. _spreadsheet/dynamic-pivot-tables/functions:
Dynamic pivot table functions
-----------------------------
Instead of each cell containing a unique function that retrieves data from your database, as in a
:ref:`static pivot table <spreadsheet/insert/pivot-table-functions-static>`, a dynamic pivot table
has a single function:
.. code-block:: text
=PIVOT(pivot_id, [row_count], [include_total], [include_column_titles], [column_count] )
The arguments of the function are as follows:
- `pivot_id`: the ID assigned when the pivot table is inserted. The first pivot table
inserted in a spreadsheet is assigned pivot ID `1`, the second, pivot ID `2`, etc.
- `row_count` and `column count`: the number of rows and columns respectively.
- `include_total` and `include_column_titles`: values of `0` remove the total and column
titles respectively.
This is an array function, which allows the pivot table to expand automatically to accommodate the
results of the function.
The top-left cell contains the editable function, while clicking on any other cell reveals this
formula greyed out.
.. image:: dynamic_pivot_tables/pivot-function-dynamic.png
:alt: Array function of a dynamic pivot table
.. tip::
If necessary, you can update the function of a dynamic pivot table to remove elements like the
total or column titles.
With the function open in the formula bar or the top-left cell of the pivot table, position your
cursor after the pivot ID then type `,` to advance to the optional field you want to modify. In
the example below, adding the value `0` for `[include_total]` removes both the row total and
column total from the pivot table.
.. image:: dynamic_pivot_tables/modify-function.png
:alt: Modifying the function of a dynamic pivot table
.. _spreadsheet/dynamic-pivot-tables/manipulate:
Manipulate a dynamic pivot table
================================
To manipulate data in a dynamic pivot table, :ref:`open the pivot table properties
<spreadsheet/insert/pivot-table-properties>`.
The following options are available by clicking the :icon:`fa-cog` (:guilabel:`gear`) icon:
- :icon:`fa-exchange` :guilabel:`Flip axes`: to move all the dimensions represented in columns to
rows and vice versa.
.. tip::
Flipping the axes presents the data from a different perspective, possibly bringing new
insights. However, depending on the volume of data, it can result in #SPILL errors. This
happens when a formula tries to output a range of values, but something is blocking those
cells, such as other data, merged cells, or the boundaries of the current sheet.
Hovering over the cell containing :guilabel:`#SPILL` details the error.
- :icon:`fa-clone` :guilabel:`Duplicate`: to duplicate the dynamic pivot table and create a new data
source with distinct properties.
- :icon:`fa-trash` :guilabel:`Delete`: to delete the data source of the dynamic pivot table.
.. note::
Deleting the data source of a pivot table does not delete the visual representation of the
data. Delete the table from the spreadsheet using your preferred means, e.g., via keyboard
commands, spreadsheet menus, or by deleting the sheet.
.. _spreadsheet/dynamic-pivot-tables/manipulate-dimensions:
Dimensions
----------
The dimensions of the pivot table, i.e., how the data is grouped, are placed in :guilabel:`Columns`
and :guilabel:`Rows` according to how they appeared in the pivot view in your database, i.e., before
the pivot table was inserted in the spreadsheet.
You can:
- add new dimensions by clicking :guilabel:`Add`
- delete existing dimensions by clicking the :icon:`fa-trash` :guilabel:`(delete)` icon on the
relevant dimension
- change the order in which dimensions are displayed in :guilabel:`Columns` or :guilabel:`Rows` by
clicking then dragging the dimension to the desired position within its respective section
- change the axis on which a dimension is shown by clicking then dragging the dimension from
:guilabel:`Columns` to :guilabel:`Rows` or vice versa
- change how a dimension's values are ordered by selecting :guilabel:`Ascending`,
:guilabel:`Descending`, or :guilabel:`Unsorted` in the :guilabel:`Order by` field
- for date- or time-based dimensions, select the desired :guilabel:`Granularity` from the options in
the dropdown menu
.. _spreadsheet/dynamic-pivot-tables/manipulate-measures:
Measures
--------
The measures of your pivot table, i.e., what you are measuring, or analyzing, based on the
dimensions you have chosen, are listed in the order they appeared in the pivot view in your
database.
You can:
- add new measures, including :ref:`calculated measures
<spreadsheet/dynamic-pivot-tables/manipulate-measures-calculated-measures>`, by clicking
:guilabel:`Add`
- hide (:icon:`fa-eye`), show (:icon:`fa-eye-slash`), or delete (:icon:`fa-trash`) existing measures
- edit the name of existing measures by clicking on the measure's name
- change the order in which measures are displayed by clicking then dragging the measure to the
desired position
- change how measures are displayed by clicking the :icon:`fa-cog` :guilabel:`(gear)` icon, then
selecting the desired option from the dropdown menu, e.g., :guilabel:`% of grand total` or
:guilabel:`Rank smallest to largest`. The pivot table data updates dynamically as different
options are selected.
- choose how measures are aggregated, e.g., by :guilabel:`Sum`, :guilabel:`Average`,
:guilabel:`Minimum`
.. tip::
To sort the values of a dynamic pivot table by measure for a specific dimension, right-click any
pivot table value, then click :icon:`oi-sort-range` and select :guilabel:`Ascending` or
:guilabel:`Descending` from the dropdown. To return to the default order, follow the same steps
then select :guilabel:`Unsorted` from the dropdown.
.. _spreadsheet/dynamic-pivot-tables/manipulate-measures-calculated-measures:
Calculated measures
~~~~~~~~~~~~~~~~~~~
It is possible to add calculated measures if the desired measure did not exist in the original pivot
view. For example, a calculated measure could be added to show the average revenue per order or the
profit margin per product.
To add a calculated measure:
#. From the :guilabel:`Measures` section of the pivot table properties, click :guilabel:`Add`.
#. Below the scrollable list, click :icon:`os-formula` :guilabel:`Add calculated measure`.
#. Rename the calculated measure by clicking on the name and typing.
#. Click on the line starting with `=` and enter the formula.
.. example::
In the below example, the average revenue per order is added by dividing the sum of the sales
by the number of orders.
.. image:: dynamic_pivot_tables/calculated-measure.png
:alt: Formula for a calculated measure
#. Choose how the measure should be aggregated by selecting a value from the dropdown.
.. tip::
There are advantages to using a static pivot table, for example, being able to see the functions
behind individual cells. To have this possibility, select the relevant portion of your dynamic
pivot table, copy it, then paste it into an empty part of the sheet. Click on any pasted cell to
see the :ref:`Odoo function <spreadsheet/functions/odoo>` used to retrieve the data.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -2,30 +2,32 @@
Functions
=========
Spreadsheet functions are divided in the following categories:
**Odoo Spreadsheet** supports formulas and functions found in most spreadsheet solutions. This page
presents the available functions by category. Odoo-specific functions are included both in the
relevant category and in a dedicated :ref:`Odoo <spreadsheet/functions/odoo>` category:
- :ref:`Array <functions/array>`
- :ref:`Database <functions/database>`
- :ref:`Date <functions/date>`
- :ref:`Engineering <functions/engineering>`
- :ref:`Filter <functions/filter>`
- :ref:`Financial <functions/financial>`
- :ref:`Info <functions/info>`
- :ref:`Logical <functions/logical>`
- :ref:`Lookup <functions/lookup>`
- :ref:`Math <functions/math>`
- :ref:`Misc <functions/misc>`
- :ref:`Odoo <functions/odoo>`
- :ref:`Operators <functions/operators>`
- :ref:`Statistical <functions/statistical>`
- :ref:`Text <functions/text>`
- :ref:`Web <functions/web>`
- :ref:`Array <spreadsheet/functions/array>`
- :ref:`Database <spreadsheet/functions/database>`
- :ref:`Date <spreadsheet/functions/date>`
- :ref:`Engineering <spreadsheet/functions/engineering>`
- :ref:`Filter <spreadsheet/functions/filter>`
- :ref:`Financial <spreadsheet/functions/financial>`
- :ref:`Info <spreadsheet/functions/info>`
- :ref:`Logical <spreadsheet/functions/logical>`
- :ref:`Lookup <spreadsheet/functions/lookup>`
- :ref:`Math <spreadsheet/functions/math>`
- :ref:`Operators <spreadsheet/functions/operators>`
- :ref:`Parser <spreadsheet/functions/parser>`
- :ref:`Statistical <spreadsheet/functions/statistical>`
- :ref:`Text <spreadsheet/functions/text>`
- :ref:`Web <spreadsheet/functions/web>`
- :ref:`Odoo-specific functions <spreadsheet/functions/odoo>`
.. note::
Formulas containing functions that are not compatible with Excel are replaced by their evaluated
result when exporting a spreadsheet.
.. _functions/array:
.. _spreadsheet/functions/array:
Array
=====
@@ -77,7 +79,7 @@ Array
* - WRAPROWS(range, wrap_count, [pad_with])
- `Excel WRAPROWS article <https://support.microsoft.com/office/wraprows-function-796825f3-975a-4cee-9c84-1bbddf60ade0>`_
.. _functions/database:
.. _spreadsheet/functions/database:
Database
========
@@ -113,7 +115,7 @@ Database
* - DVARP(database, field, criteria)
- `Excel DVARP article <https://support.microsoft.com/office/dvarp-function-eb0ba387-9cb7-45c8-81e9-0394912502fc>`_
.. _functions/date:
.. _spreadsheet/functions/date:
Date
====
@@ -148,12 +150,22 @@ Date
- `Excel MINUTE article <https://support.microsoft.com/office/minute-function-af728df0-05c4-4b07-9eed-a84801a60589>`_
* - MONTH(date)
- `Excel MONTH article <https://support.microsoft.com/office/month-function-579a2881-199b-48b2-ab90-ddba0eba86e8>`_
* - MONTH.END(date)
- Last day of the month following a date (not compatible with Excel)
* - MONTH.START(date)
- First day of the month preceding a date (not compatible with Excel)
* - NETWORKDAYS(start_date, end_date, [holidays])
- `Excel NETWORKDAYS article <https://support.microsoft.com/office/networkdays-function-48e717bf-a7a3-495f-969e-5005e3eb18e7>`_
* - NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
- `Excel NETWORKDAYS.INTL article <https://support.microsoft.com/office/networkdays-intl-function-a9b26239-4f20-46a1-9ab8-4e925bfd5e28>`_
* - NOW()
- `Excel NOW article <https://support.microsoft.com/office/now-function-3337fd29-145a-4347-b2e6-20c904739c46>`_
* - QUARTER(date)
- Quarter of the year a specific date falls in (not compatible with Excel)
* - QUARTER.END(date)
- Last day of the quarter of the year a specific date falls in (not compatible with Excel)
* - QUARTER.START(date)
- First day of the quarter of the year a specific date falls in (not compatible with Excel)
* - SECOND(time)
- `Excel SECOND article <https://support.microsoft.com/office/second-function-740d1cfc-553c-4099-b668-80eaa24e8af1>`_
* - TIME(hour, minute, second)
@@ -172,24 +184,14 @@ Date
- `Excel WORKDAY.INTL article <https://support.microsoft.com/office/workday-intl-function-a378391c-9ba7-4678-8a39-39611a9bf81d>`_
* - YEAR(date)
- `Excel YEAR article <https://support.microsoft.com/office/year-function-c64f017a-1354-490d-981f-578e8ec8d3b9>`_
* - YEARFRAC(start_date, end_date, [day_count_convention])
- Exact number of years between two dates (not compatible with Excel)
* - MONTH.START(date)
- First day of the month preceding a date (not compatible with Excel)
* - MONTH.END(date)
- Last day of the month following a date (not compatible with Excel)
* - QUARTER(date)
- Quarter of the year a specific date falls in (not compatible with Excel)
* - QUARTER.START(date)
- First day of the quarter of the year a specific date falls in (not compatible with Excel)
* - QUARTER.END(date)
- Last day of the quarter of the year a specific date falls in (not compatible with Excel)
* - YEAR.START(date)
- First day of the year a specific date falls in (not compatible with Excel)
* - YEAR.END(date)
- Last day of the year a specific date falls in (not compatible with Excel)
* - YEAR.START(date)
- First day of the year a specific date falls in (not compatible with Excel)
* - YEARFRAC(start_date, end_date, [day_count_convention])
- Exact number of years between two dates (not compatible with Excel)
.. _functions/engineering:
.. _spreadsheet/functions/engineering:
Engineering
===========
@@ -203,7 +205,7 @@ Engineering
* - DELTA(number1, [number2])
- `Excel DELTA article <https://support.microsoft.com/office/delta-function-2f763672-c959-4e07-ac33-fe03220ba432>`_
.. _functions/filter:
.. _spreadsheet/functions/filter:
Filter
======
@@ -216,10 +218,14 @@ Filter
- Description or link
* - FILTER(range, condition1, [condition2, ...])
- `Excel FILTER article <https://support.microsoft.com/office/filter-function-f4f7cb66-82eb-4767-8f7c-4877ad80c759>`_
* - ODOO.FILTER.VALUE(filter_name)
- Returns the current value of a spreadsheet filter (not compatible with Excel)
* - SORT(range, [sort_column, ...], [is_ascending, ...])
- `Excel SORT article <https://support.microsoft.com/en-us/office/sort-function-22f63bd0-ccc8-492f-953d-c20e8e44b86c>`_
* - UNIQUE(range, [by_column], [exactly_once])
- `Excel UNIQUE article <https://support.microsoft.com/office/unique-function-c5ab87fd-30a3-4ce9-9d1a-40204fb85e1e>`_
.. _functions/financial:
.. _spreadsheet/functions/financial:
Financial
=========
@@ -234,10 +240,10 @@ Financial
- `Excel ACCRINTM article <https://support.microsoft.com/office/accrintm-function-f62f01f9-5754-4cc4-805b-0e70199328a7>`_
* - AMORLINC(cost, purchase_date, first_period_end, salvage, period, rate, [day_count_convention])
- `Excel AMORLINC article <https://support.microsoft.com/office/amorlinc-function-7d417b45-f7f5-4dba-a0a5-3451a81079a8>`_
* - COUPDAYS(settlement, maturity, frequency, [day_count_convention])
- `Excel COUPDAYS article <https://support.microsoft.com/office/coupdays-function-cc64380b-315b-4e7b-950c-b30b0a76f671>`_
* - COUPDAYBS(settlement, maturity, frequency, [day_count_convention])
- `Excel COUPDAYBS article <https://support.microsoft.com/office/coupdaybs-function-eb9a8dfb-2fb2-4c61-8e5d-690b320cf872>`_
* - COUPDAYS(settlement, maturity, frequency, [day_count_convention])
- `Excel COUPDAYS article <https://support.microsoft.com/office/coupdays-function-cc64380b-315b-4e7b-950c-b30b0a76f671>`_
* - COUPDAYSNC(settlement, maturity, frequency, [day_count_convention])
- `Excel COUPDAYSNC article <https://support.microsoft.com/office/coupdaysnc-function-5ab3f0b2-029f-4a8b-bb65-47d525eea547>`_
* - COUPNCD(settlement, maturity, frequency, [day_count_convention])
@@ -286,20 +292,34 @@ Financial
- `Excel NPER article <https://support.microsoft.com/office/nper-function-240535b5-6653-4d2d-bfcf-b6a38151d815>`_
* - NPV(discount, cashflow1, [cashflow2, ...])
- `Excel NPV article <https://support.microsoft.com/office/npv-function-8672cb67-2576-4d07-b67b-ac28acf2a568>`_
* - ODOO.ACCOUNT.GROUP(type)
- Returns the account ids of a given group (not compatible with Excel)
* - ODOO.CREDIT(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total credit for the specified account(s) and period (not compatible with Excel)
* - ODOO.CURRENCY.RATE(currency_from, currency_to, [date])
- This function takes in two currency codes as arguments, and returns the exchange rate from the first currency to the second as float (not compatible with Excel)
* - ODOO.DEBIT(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total debit for the specified account(s) and period (not compatible with Excel)
* - ODOO.BALANCE(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total balance for the specified account(s) and period (not compatible with Excel)
* - ODOO.FISCALYEAR.END(day, [company_id])
- Returns the ending date of the fiscal year encompassing the provided date (not compatible with Excel)
* - ODOO.FISCALYEAR.START(day, [company_id])
- Returns the starting date of the fiscal year encompassing the provided date (not compatible with Excel)
* - PDURATION(rate, present_value, future_value)
- `Excel PDURATION article <https://support.microsoft.com/office/pduration-function-44f33460-5be5-4c90-b857-22308892adaf>`_
* - PMT(rate, number_of_periods, present_value, [future_value], [end_or_beginning])
- `Excel PMT article <https://support.microsoft.com/office/pmt-function-0214da64-9a63-4996-bc20-214433fa6441>`_
* - PPMT(rate, period, number_of_periods, present_value, [future_value], [end_or_beginning])
- `Excel PPMT article <https://support.microsoft.com/office/ppmt-function-c370d9e3-7749-4ca4-beea-b06c6ac95e1b>`_
* - PV(rate, number_of_periods, payment_amount, [future_value], [end_or_beginning])
- `Excel PV article <https://support.microsoft.com/office/pv-function-23879d31-0e02-4321-be01-da16e8168cbd>`_
* - PRICE(settlement, maturity, rate, yield, redemption, frequency, [day_count_convention])
- `Excel PRICE article <https://support.microsoft.com/office/price-function-3ea9deac-8dfa-436f-a7c8-17ea02c21b0a>`_
* - PRICEDISC(settlement, maturity, discount, redemption, [day_count_convention])
- `Excel PRICEDISC article <https://support.microsoft.com/office/pricedisc-function-d06ad7c1-380e-4be7-9fd9-75e3079acfd3>`_
* - PRICEMAT(settlement, maturity, issue, rate, yield, [day_count_convention])
- `Excel PRICEMAT article <https://support.microsoft.com/office/pricemat-function-52c3b4da-bc7e-476a-989f-a95f675cae77>`_
* - PV(rate, number_of_periods, payment_amount, [future_value], [end_or_beginning])
- `Excel PV article <https://support.microsoft.com/office/pv-function-23879d31-0e02-4321-be01-da16e8168cbd>`_
* - RATE(number_of_periods, payment_per_period, present_value, [future_value], [end_or_beginning], [rate_guess])
- `Excel RATE article <https://support.microsoft.com/office/rate-function-9f665657-4a7e-4bb7-a030-83fc59e748ce>`_
* - RECEIVED(settlement, maturity, investment, discount, [day_count_convention])
@@ -310,10 +330,10 @@ Financial
- `Excel SLN article <https://support.microsoft.com/office/sln-function-cdb666e5-c1c6-40a7-806a-e695edc2f1c8>`_
* - SYD(cost, salvage, life, period)
- `Excel SYD article <https://support.microsoft.com/office/syd-function-069f8106-b60b-4ca2-98e0-2a0f206bdb27>`_
* - TBILLPRICE(settlement, maturity, discount)
- `Excel TBILLPRICE article <https://support.microsoft.com/office/tbillprice-function-eacca992-c29d-425a-9eb8-0513fe6035a2>`_
* - TBILLEQ(settlement, maturity, discount)
- `Excel TBILLEQ article <https://support.microsoft.com/office/tbilleq-function-2ab72d90-9b4d-4efe-9fc2-0f81f2c19c8c>`_
* - TBILLPRICE(settlement, maturity, discount)
- `Excel TBILLPRICE article <https://support.microsoft.com/office/tbillprice-function-eacca992-c29d-425a-9eb8-0513fe6035a2>`_
* - TBILLYIELD(settlement, maturity, price)
- `Excel TBILLYIELD article <https://support.microsoft.com/office/tbillyield-function-6d381232-f4b0-4cd5-8e97-45b9c03468ba>`_
* - VDB(cost, salvage, life, start, end, [factor], [no_switch])
@@ -329,7 +349,7 @@ Financial
* - YIELDMAT(settlement, maturity, issue, rate, price, [day_count_convention])
- `Excel YIELDMAT article <https://support.microsoft.com/office/yieldmat-function-ba7d1809-0d33-4bcb-96c7-6c56ec62ef6f>`_
.. _functions/info:
.. _spreadsheet/functions/info:
Info
====
@@ -342,6 +362,8 @@ Info
- Description or link
* - CELL(info_type, reference)
- `Excel CELL article <https://support.microsoft.com/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf>`_
* - ISBLANK(value)
- `Excel IS article <https://support.microsoft.com/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665>`_
* - ISERR(value)
- `Excel IS article <https://support.microsoft.com/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665>`_
* - ISERROR(value)
@@ -356,12 +378,10 @@ Info
- `Excel IS article <https://support.microsoft.com/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665>`_
* - ISTEXT(value)
- `Excel IS article <https://support.microsoft.com/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665>`_
* - ISBLANK(value)
- `Excel IS article <https://support.microsoft.com/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665>`_
* - NA()
- `Excel NA article <https://support.microsoft.com/office/na-function-5469c2d1-a90c-4fb5-9bbc-64bd9bb6b47c>`_
.. _functions/logical:
.. _spreadsheet/functions/logical:
Logical
=======
@@ -393,7 +413,7 @@ Logical
* - XOR(logical_expression1, [logical_expression2, ...])
- `Excel XOR article <https://support.microsoft.com/office/xor-function-1548d4c2-5e47-4f77-9a92-0533bba14f37>`_
.. _functions/lookup:
.. _spreadsheet/functions/lookup:
Lookup
======
@@ -420,12 +440,14 @@ Lookup
- `Excel LOOKUP article <https://support.microsoft.com/office/lookup-function-446d94af-663b-451d-8251-369d5e3864cb>`_
* - MATCH(search_key, range, [search_type])
- `Excel MATCH article <https://support.microsoft.com/office/match-function-e8dffd45-c762-47d6-bf89-533f4a37673a>`_
* - PIVOT(pivot_id, measure_name, [domain_field_name, ...], [domain_value, ...])
- Get the value from a pivot (not compatible with Excel)
* - PIVOT.HEADER(pivot_id, [domain_field_name, ...], [domain_value, ...])
- Get the header of a pivot (not compatible with Excel)
* - PIVOT.TABLE(pivot_id, [row_count], [include_total], [include_column_titles])
* - OFFSET(reference, rows, cols, [height], [width])
- `Excel OFFSET article <https://support.microsoft.com/en-us/office/offset-function-c8de19ae-dd79-4b9b-a14e-b4d906d11b66>`_
* - PIVOT(pivot_id, [row_count], [include_total], [include_column_titles], [column_count])
- Get a pivot table (not compatible with Excel)
* - PIVOT.HEADER(pivot_id, [domain_field_name, ...], [domain_value, ...])
- Get the header of a pivot table (not compatible with Excel)
* - PIVOT.VALUE(pivot_id, measure_name, [domain_field_name, ...], [domain_value, ...])
- Get the value from a pivot table (not compatible with Excel)
* - ROW([cell_reference])
- `Excel ROW article <https://support.microsoft.com/office/row-function-3a63b74a-c4d0-4093-b49a-e76eb49a6d8d>`_
* - ROWS(range)
@@ -435,7 +457,7 @@ Lookup
* - XLOOKUP(search_key, lookup_range, return_range, [if_not_found], [match_mode], [search_mode])
- `Excel XLOOKUP article <https://support.microsoft.com/office/xlookup-function-b7fd680e-6d10-43e6-84f9-88eae8bf5929>`_
.. _functions/math:
.. _spreadsheet/functions/math:
Math
====
@@ -486,10 +508,6 @@ Math
- `Excel COUNTIF article <https://support.microsoft.com/office/countif-function-e0de10c6-f885-4e71-abb4-1f464816df34>`_
* - COUNTIFS(criteria_range1, criterion1, [criteria_range2, ...], [criterion2, ...])
- `Excel COUNTIFS article <https://support.microsoft.com/office/countifs-function-dda3dc6e-f74e-4aee-88bc-aa8c2a866842>`_
* - COUNTUNIQUE(value1, [value2, ...])
- Counts number of unique values in a range (not compatible with Excel)
* - COUNTUNIQUEIFS(range, criteria_range1, criterion1, [criteria_range2, ...], [criterion2, ...])
- Counts number of unique values in a range, filtered by a set of criteria (not compatible with Excel)
* - CSC(angle)
- `Excel CSC article <https://support.microsoft.com/office/csc-function-07379361-219a-4398-8675-07ddc4f135c1>`_
* - CSCH(value)
@@ -516,6 +534,8 @@ Math
- `Excel ISODD article <https://support.microsoft.com/office/isodd-function-1208a56d-4f10-4f44-a5fc-648cafd6c07a>`_
* - LN(value)
- `Excel LN article <https://support.microsoft.com/office/ln-function-81fe1ed7-dac9-4acd-ba1d-07a142c6118f>`_
* - LOG(value, [base])
- Get the logarithm of a number for a given base (not compatible with Excel)
* - MOD(dividend, divisor)
- `Excel MOD article <https://support.microsoft.com/office/mod-function-9b6cd169-b6ee-406a-a97b-edf2a9dc24f3>`_
* - MUNIT(dimension)
@@ -544,6 +564,8 @@ Math
- `Excel SEC article <https://support.microsoft.com/office/sec-function-ff224717-9c87-4170-9b58-d069ced6d5f7>`_
* - SECH(value)
- `Excel SECH article <https://support.microsoft.com/office/sech-function-e05a789f-5ff7-4d7f-984a-5edb9b09556f>`_
* - SEQUENCE(rows, [columns], [start], ][step])
- `Excel SEQUENCE article <https://support.microsoft.com/en-us/office/sequence-function-57467a98-57e0-4817-9f14-2eb78519ca90>`_
* - SIN(angle)
- `Excel SIN article <https://support.microsoft.com/office/sin-function-cf0e3432-8b9e-483c-bc55-a76651c95602>`_
* - SINH(value)
@@ -563,53 +585,7 @@ Math
* - TRUNC(value, [places])
- `Excel TRUNC article <https://support.microsoft.com/office/trunc-function-8b86a64c-3127-43db-ba14-aa5ceb292721>`_
.. _functions/misc:
Misc
====
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - FORMAT.LARGE.NUMBER(value, [unit])
- Apply a large number format (not compatible with Excel)
.. _functions/odoo:
Odoo
====
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - ODOO.CREDIT(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total credit for the specified account(s) and period (not compatible with Excel)
* - ODOO.DEBIT(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total debit for the specified account(s) and period (not compatible with Excel)
* - ODOO.BALANCE(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total balance for the specified account(s) and period (not compatible with Excel)
* - ODOO.FISCALYEAR.START(day, [company_id])
- Returns the starting date of the fiscal year encompassing the provided date (not compatible with Excel)
* - ODOO.FISCALYEAR.END(day, [company_id])
- Returns the ending date of the fiscal year encompassing the provided date (not compatible with Excel)
* - ODOO.ACCOUNT.GROUP(type)
- Returns the account ids of a given group (not compatible with Excel)
* - ODOO.CURRENCY.RATE(currency_from, currency_to, [date])
- This function takes in two currency codes as arguments, and returns the exchange rate from the first currency to the second as float (not compatible with Excel)
* - ODOO.LIST(list_id, index, field_name)
- Get the value from a list (not compatible with Excel)
* - ODOO.LIST.HEADER(list_id, field_name)
- Get the header of a list (not compatible with Excel)
* - ODOO.FILTER.VALUE(filter_name)
- Return the current value of a spreadsheet filter (not compatible with Excel)
.. _functions/operators:
.. _spreadsheet/functions/operators:
Operators
=========
@@ -651,7 +627,21 @@ Operators
* - UPLUS(value)
- A specified number, unchanged (not compatible with Excel)
.. _functions/statistical:
.. _spreadsheet/functions/parser:
Parser
======
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - CONVERT(number, from_unit, to_unit)
- `Excel CONVERT article <https://support.microsoft.com/en-us/office/convert-function-d785bef1-808e-4aac-bdcd-666c810f9af2>`_
.. _spreadsheet/functions/statistical:
Statistical
===========
@@ -666,14 +656,14 @@ Statistical
- `Excel AVEDEV article <https://support.microsoft.com/office/avedev-function-58fe8d65-2a84-4dc7-8052-f3f87b5c6639>`_
* - AVERAGE(value1, [value2, ...])
- `Excel AVERAGE article <https://support.microsoft.com/office/average-function-047bac88-d466-426c-a32b-8f33eb960cf6>`_
* - AVERAGE.WEIGHTED(values, weights, [additional_values, ...], [additional_weights, ...])
- Weighted average (not compatible with Excel)
* - AVERAGEA(value1, [value2, ...])
- `Excel AVERAGEA article <https://support.microsoft.com/office/averagea-function-f5f84098-d453-4f4c-bbba-3d2c66356091>`_
* - AVERAGEIF(criteria_range, criterion, [average_range])
- `Excel AVERAGEIF article <https://support.microsoft.com/office/averageif-function-faec8e2e-0dec-4308-af69-f5576d8ac642>`_
* - AVERAGEIFS(average_range, criteria_range1, criterion1, [criteria_range2, ...], [criterion2, ...])
- `Excel AVERAGEIFS article <https://support.microsoft.com/office/averageifs-function-48910c45-1fc0-4389-a028-f7c5c3001690>`_
* - AVERAGE.WEIGHTED(values, weights, [additional_values, ...], [additional_weights, ...])
- Weighted average (not compatible with Excel)
* - CORREL(data_y, data_x)
- `Excel CORREL article <https://support.microsoft.com/office/correl-function-995dcef7-0c0a-4bed-a3fb-239d7b68ca92>`_
* - COUNT(value1, [value2, ...])
@@ -736,10 +726,10 @@ Statistical
- `Excel RANK article <https://support.microsoft.com/office/rank-function-6a2fc49d-1831-4a03-9d8c-c279cf99f723>`_
* - RSQ(data_y, data_x)
- `Excel RSQ article <https://support.microsoft.com/office/rsq-function-d7161715-250d-4a01-b80d-a8364f2be08f>`_
* - SMALL(data, n)
- `Excel SMALL article <https://support.microsoft.com/office/small-function-17da8222-7c82-42b2-961b-14c45384df07>`_
* - SLOPE(data_y, data_x)
- `Excel SLOPE article <https://support.microsoft.com/office/slope-function-11fb8f97-3117-4813-98aa-61d7e01276b9>`_
* - SMALL(data, n)
- `Excel SMALL article <https://support.microsoft.com/office/small-function-17da8222-7c82-42b2-961b-14c45384df07>`_
* - SPEARMAN(data_y, data_x)
- Compute the Spearman rank correlation coefficient of a dataset (not compatible with Excel)
* - STDEV(value1, [value2, ...])
@@ -771,7 +761,7 @@ Statistical
* - VARPA(value1, [value2, ...])
- `Excel VARPA article <https://support.microsoft.com/office/varpa-function-59a62635-4e89-4fad-88ac-ce4dc0513b96>`_
.. _functions/text:
.. _spreadsheet/functions/text:
Text
====
@@ -822,8 +812,10 @@ Text
- `Excel TRIM article <https://support.microsoft.com/office/trim-function-410388fa-c5df-49c6-b16c-9e5630b479f9>`_
* - UPPER(text)
- `Excel UPPER article <https://support.microsoft.com/office/upper-function-c11f29b3-d1a3-4537-8df6-04d0049963d6>`_
* - VALUE(text)
- `Excel VALUE article <https://support.microsoft.com/en-us/office/value-function-257d0108-07dc-437d-ae1c-bc2d3953d8c2>`_
.. _functions/web:
.. _spreadsheet/functions/web:
Web
===
@@ -836,3 +828,198 @@ Web
- Description or link
* - HYPERLINK(url, [link_label])
- `Excel HYPERLINK article <https://support.microsoft.com/office/hyperlink-function-333c7ce6-c5ae-4164-9c47-7de9b76f577f>`_
.. _spreadsheet/functions/odoo:
Odoo-specific functions
=======================
This section contains functions that interact directly with your Odoo database.
Array
-----
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - ARRAY.CONSTRAIN(input_range, rows, columns)
- Returns a result array constrained to a specific width and height (not compatible with Excel)
* - FLATTEN(range, [range2, ...])
- Flattens all the values from one or more ranges into a single column (not compatible with Excel)
Date
----
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - MONTH.END(date)
- Last day of the month following a date (not compatible with Excel)
* - MONTH.START(date)
- First day of the month preceding a date (not compatible with Excel)
* - QUARTER(date)
- Quarter of the year a specific date falls in (not compatible with Excel)
* - QUARTER.END(date)
- Last day of the quarter of the year a specific date falls in (not compatible with Excel)
* - QUARTER.START(date)
- First day of the quarter of the year a specific date falls in (not compatible with Excel)
* - YEAR.END(date)
- Last day of the year a specific date falls in (not compatible with Excel)
* - YEAR.START(date)
- First day of the year a specific date falls in (not compatible with Excel)
* - YEARFRAC(start_date, end_date, [day_count_convention])
- Exact number of years between two dates (not compatible with Excel)
Financial
---------
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - ODOO.ACCOUNT.GROUP(type)
- Returns the account ids of a given group (not compatible with Excel)
* - ODOO.CREDIT(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total credit for the specified account(s) and period (not compatible with Excel)
* - ODOO.CURRENCY.RATE(currency_from, currency_to, [date])
- This function takes in two currency codes as arguments, and returns the exchange rate from -the first currency to the second as float (not compatible with Excel)
* - ODOO.DEBIT(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total debit for the specified account(s) and period (not compatible with Excel)
* - ODOO.BALANCE(account_codes, date_range, [offset], [company_id], [include_unposted])
- Get the total balance for the specified account(s) and period (not compatible with Excel)
* - ODOO.FISCALYEAR.START(day, [company_id])
- Returns the starting date of the fiscal year encompassing the provided date (not compatible with Excel)
* - ODOO.FISCALYEAR.END(day, [company_id])
- Returns the ending date of the fiscal year encompassing the provided date (not compatible with Excel)
* - ODOO.PARTNER.BALANCE(partner_ids, [account_codes], [date_range], [offset], [company_id], [include_unposted])
- Get the partner balance for the specified account(s) and period (not compatible with Excel)
* - ODOO.RESIDUAL([account_codes], [date_range], [offset], [company_id], [include_unposted])
- Get the residual amount for the specified account(s) and period (not compatible with Excel)
Lookup
------
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - PIVOT(pivot_id, [row_count], [include_total], [include_column_titles], [column_count])
- Get a pivot table (not compatible with Excel)
* - PIVOT.HEADER(pivot_id, [domain_field_name, ...], [domain_value, ...])
- Get the header of a pivot table (not compatible with Excel)
* - PIVOT.VALUE(pivot_id, measure_name, [domain_field_name, ...], [domain_value, ...])
- Get the value from a pivot table (not compatible with Excel)
Math
----
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - COUNTUNIQUE(value1, [value2, ...])
- Counts number of unique values in a range (not compatible with Excel)
* - COUNTUNIQUEIFS(range, criteria_range1, criterion1, [criteria_range2, ...], [criterion2, ...])
- Counts number of unique values in a range, filtered by a set of criteria (not compatible with Excel)
Misc
----
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - FORMAT.LARGE.NUMBER(value, [unit])
- Apply a large number format (not compatible with Excel)
* - ODOO.LIST(list_id, index, field_name)
- Get the value from a list (not compatible with Excel)
* - ODOO.LIST.HEADER(list_id, field_name)
- Get the header of a list (not compatible with Excel)
Operators
---------
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - ADD(value1, value2)
- Sum of two numbers (not compatible with Excel)
* - DIVIDE(dividend, divisor)
- One number divided by another (not compatible with Excel)
* - EQ(value1, value2)
- Equal (not compatible with Excel)
* - GT(value1, value2)
- Strictly greater than (not compatible with Excel)
* - GTE(value1, value2)
- Greater than or equal to (not compatible with Excel)
* - LT(value1, value2)
- Less than (not compatible with Excel)
* - LTE(value1, value2)
- Less than or equal to (not compatible with Excel)
* - MINUS(value1, value2)
- Difference of two numbers (not compatible with Excel)
* - MULTIPLY(factor1, factor2)
- Product of two numbers (not compatible with Excel)
* - NE(value1, value2)
- Not equal (not compatible with Excel)
* - POW(base, exponent)
- A number raised to a power (not compatible with Excel)
* - UMINUS(value)
- A number with the sign reversed (not compatible with Excel)
* - UNARY.PERCENT(percentage)
- Value interpreted as a percentage (not compatible with Excel)
* - UPLUS(value)
- A specified number, unchanged (not compatible with Excel)
Statistical
-----------
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - AVERAGE.WEIGHTED(values, weights, [additional_values, ...], [additional_weights, ...])
- Weighted average (not compatible with Excel)
* - GROWTH(known_data_y, [known_data_x], [new_data_x], [b])
- Fits points to exponential growth trend (not compatible with Excel)
* - MATTHEWS(data_x, data_y)
- Compute the Matthews correlation coefficient of a dataset (not compatible with Excel)
* - POLYFIT.COEFFS(data_y, data_x, order, [intercept])
- Compute the coefficients of polynomial regression of the dataset (not compatible with Excel)
* - POLYFIT.FORECAST(x, data_y, data_x, order, [intercept])
- Predict value by computing a polynomial regression of the dataset (not compatible with Excel)
* - SPEARMAN(data_y, data_x)
- Compute the Spearman rank correlation coefficient of a dataset (not compatible with Excel)
* - TREND(known_data_y, [known_data_x], [new_data_x], [b])
- Fits points to linear trend derived via least-squares (not compatible with Excel)
Text
----
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Name and arguments
- Description or link
* - JOIN(delimiter, value_or_array1, [value_or_array2, ...])
- Concatenates elements of arrays with delimiter (not compatible with Excel)

View File

@@ -2,202 +2,277 @@
Global filters
==============
.. role:: raw-html(raw)
:format: html
Global filters, represented by the :icon:`os-global-filters` :guilabel:`Filters` icon at the top
right of an Odoo spreadsheet, allow you to apply one or more filters to all the Odoo data that has
been :doc:`inserted in that spreadsheet <insert>`.
.. |global-filter| replace:: :raw-html:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path fill="currentColor" d="M1 3h12L7 9M5.5 6h3v11l-3-3M14 4h4v2h-4m-3 3h7v2h-7m0 3h7v2h-7"></path></svg>` :guilabel:`(global filter)`
.. |drag-handle| replace:: :raw-html:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 4 16" fill="currentColor"><circle cx="2" cy="3.5" r="1"></circle><circle cx="2" cy="6.5" r="1"></circle><circle cx="2" cy="9.5" r="1"></circle><circle cx="2" cy="12.5" r="1"></circle></svg>` :guilabel:`(drag handle)`
These filters are particularly useful for reports and dashboards as users can easily and dynamically
customize the view to answer complex business questions spanning multiple data sources.
Create dynamic views of :doc:`inserted data <insert>`, by mapping data source fields to *global
filters* in the Odoo **Spreadsheets** app.
.. tip::
When a spreadsheet with global filters is added to a dashboard, the filters appear as dropdown
menus at the top of the dashboard. In a spreadsheet, they appear in a pane to the right of the
spreadsheet.
.. note::
The global filters are represented by the |global-filter| icon, and enable data that was inserted
via a pivot table, list, or chart to be filtered. Global filters differ from the *sort and
filter* feature for cell ranges represented by the :icon:`fa-filter` :guilabel:`(filter)` icon.
.. image:: global_filters/dashboard-global-filters.png
:alt: Global filters at the top of a dashboard
.. image:: global_filters/global-filters-menu.png
:align: center
:alt: The global filters menu sidebar on a spreadsheet.
Three types of global filters are available:
Add filters
===========
- :ref:`Date <spreadsheet/global-filters/create-date>`: filters data based on a specific time range,
with the options :guilabel:`Month / Quarter`, :guilabel:`Relative Period`, or :guilabel:`From /
To`.
- :ref:`Relation <spreadsheet/global-filters/create-relation>`: filters data based on a relational
field in a related model, e.g., by :guilabel:`Salesperson` with the *User* model set as the
related model.
- :ref:`Text <spreadsheet/global-filters/create-text>`: filters data based on a string of text or a
range of predefined values, e.g., a product reference or barcode.
Navigate to the :menuselection:`Documents app` and click on the desired spreadsheet, then open the
|global-filter| filter menu.
Unlike the standard :icon:`fa-filter` :guilabel:`(Add filters)` spreadsheet function, which lets you
sort and temporarily hide data, global filters act on the underlying :ref:`data sources
<spreadsheet/insert/data-sources>`, filtering data *before* it is loaded into the spreadsheet.
Create a new filter by selecting one of the buttons under the :guilabel:`Add a new filter...`
section:
When a global filter is created, :ref:`field matching <spreadsheet/global-filters/field-matching>`
for each data source ensures the filter acts on the correct database :doc:`fields
</applications/studio/fields>`.
- :ref:`Date <spreadsheet/global-filter-date>`: filter dates by matching data source date fields to
a time range (e.g., *Month / Quarter*, *Relative Period*, or *From / To*).
- :ref:`Relation <spreadsheet/global-filter-relation>`: filter records by matching data source
fields to fields in a related model (e.g., *Lead/Opportunity*, *Sales Order*, or *Event
Registration*).
- :ref:`Text <spreadsheet/global-filter-text>`: filter text by matching data source text fields to a
string of text (e.g., *Restrict values to a range* and/or provide a *Default value*).
.. tip::
- Global filters work by adding extra conditions to the domains of all the data sources in the
spreadsheet. Therefore, if you intend to use global filters, do not use the same conditions
when configuring the initial list, pivot table, or chart in your database.
- Setting default values, where relevant, ensures that the spreadsheet or dashboard loads quickly
and provides a useful initial view that can be further customized if needed. For example, a
:guilabel:`Date` filter could be set to show data from the last 30 days by default.
.. note::
Only filters that are able to be applied to the fields in the data source are shown.
.. _spreadsheet/global-filters/field-matching:
.. _spreadsheet/global-filter-date:
Field matching
==============
.. important::
This process is crucial, as matching the wrong fields, or not setting matching fields at all,
results in global filters that do not show the desired results.
To function as intended, a global filter needs to act on the correct database fields. Consider
a :guilabel:`Date` filter applied to sales data. As the *Sales Order* model contains several date
fields, it is crucial to determine which field is relevant for the filter, e.g., the order date, the
delivery date, the expected date, or the expiration date.
When :ref:`creating a global filter <spreadsheet/global-filters/create>`, the :guilabel:`Field
matching` section of the :guilabel:`Filter properties` allows you to determine, for each
:ref:`data source <spreadsheet/insert/data-sources>` in the spreadsheet, which database field the
filter should act on, or match with.
Field matching is further explained in the relevant sections on creating
:ref:`Date <spreadsheet/global-filters/create-date>`,
:ref:`Relation <spreadsheet/global-filters/create-relation>`, and
:ref:`Text <spreadsheet/global-filters/create-text>` global filters.
.. _spreadsheet/global-filters/create:
Create global filters
=====================
Open the desired spreadsheet from the **Odoo Documents** app or via the **Odoo Dashboards** app if
you are adding filters to a dashboard.
.. tip::
To access the underlying spreadsheet of a dashboard, with the **Dashboards** app open,
:ref:`activate developer mode <developer-mode>`, then click the :icon:`fa-pencil`
:guilabel:`(Edit)` icon that appears when hovering over the dashboard name.
To add a new filter, click :icon:`os-global-filters` :guilabel:`Filters`, then, under :guilabel:`Add
a new filter...` click :guilabel:`Date`, :guilabel:`Relation`, or :guilabel:`Text` as appropriate.
The :guilabel:`Filter properties` pane opens.
When saving a global filter, if any required information is missing or if any information provided
in the :ref:`Field matching <spreadsheet/global-filters/field-matching>` section is not appropriate,
an error is shown stating :guilabel:`Some required fields are not valid`.
.. _spreadsheet/global-filters/create-date:
Date
----
The *Date* global filter enables the filtering of data sources by a specific time range, to
automatically filter on the current period, or to offset the time range relative to the period.
With the |global-filter| menu open, select the :guilabel:`Date` button to create a new date filter.
The :guilabel:`Filter properties` menu displays the following fields for configuration below.
First, enter a name for the new date filter in the :guilabel:`Label` field.
Then, select one of the three period options in the :guilabel:`Time range` field:
- :guilabel:`Month / Quarter`: enables a drop-down menu of specific months and quarters of a year
(i.e., *Q1*, *Q2*, *January*, etc.).
- :guilabel:`Relative Period`: enables a drop-down menu of specific moving time frames (i.e., *Year
to Date*, *Last 7 Days*, *Last 30 Days*, etc.).
- :guilabel:`From / To`: enables *Date from...* and *Date to...* date selection fields to define a
specific time range (e.g., `06/05/2024` to `06/27/2024`).
Optionally, set a :guilabel:`Default value` for the :guilabel:`Time range`.
.. note::
The :guilabel:`Default value` field only appears for :guilabel:`Month / Quarter` or
:guilabel:`Relative Period` ranges.
A :guilabel:`Date` filter can only match with a :ref:`Date <studio/fields/simple-fields-date>`
or :ref:`Date & Time <studio/fields/simple-fields-date-time>` field.
If the :guilabel:`Month / Quarter` range is selected, tick the :guilabel:`Automatically filter on
the current period` checkbox to define the default period of either :guilabel:`Month`,
:guilabel:`Quarter`, or :guilabel:`Year`.
With the :guilabel:`Filter properties` pane open:
Next, configure the :guilabel:`Field matching` for each data source. To do so, expand the section by
clicking on the :guilabel:`Field matching` heading, to reveal a list of the data sources in the
spreadsheet where each data source has two fields for matching:
#. Enter a name for the new date filter in the :guilabel:`Label` field.
#. From the :guilabel:`Time range` dropdown menu, select one of the following:
- :guilabel:`Date field`: select a date field from the data source model to apply the time range to.
- :guilabel:`Period offset`: (optionally) select an offset that shifts the time range by a relative
period.
- :guilabel:`Month / Quarter`: enables a dropdown menu of specific months and/or quarters and a
year selector for the year. The values :guilabel:`Months` and :guilabel:`Quarters` are enabled
by default. Disabling both of these values allows filtering by year only.
The options available are: :guilabel:`Previous`, :guilabel:`Before Previous`, :guilabel:`Next`,
:guilabel:`After Next`.
To set a :guilabel:`Default value`, enable
:guilabel:`Automatically filter on the current period` and choose whether to filter on the
current :guilabel:`Month`, :guilabel:`Quarter` or :guilabel:`Year`.
Lastly, once all the information is entered on the form, click the :guilabel:`Save` button. If any
of the data source fields do not match the data type of *date* (or *datetime*), an error is shown
stating :guilabel:`Some required fields are not valid`.
- :guilabel:`Relative Period`: enables a dropdown menu of specific time ranges relative to the
current date (e.g., :guilabel:`Year to Date`, :guilabel:`Last 7 Days`,
:guilabel:`Last 30 Days`, etc.).
To set a :guilabel:`Default value`, select one of the available values.
- :guilabel:`From / To`: enables :guilabel:`Date from...` and :guilabel:`Date to...` date
selection fields to define a specific time range (e.g., `06/05/2024` to `06/27/2024`).
#. In the :guilabel:`Field matching` section, for each data source, click beside :guilabel:`Date
field` and select the field the filter should match with.
The :guilabel:`Period offset` option, which appears when a date field is chosen, enables
comparisons to be made by shifting the time range by one or more periods in the past or future.
By default, no period offset is defined. To define a period offset, select :guilabel:`Previous`
or `Next`, then select the desired number of periods in the past of future.
.. tip::
To compare data effectively using the :guilabel:`Period offset` feature, :ref:`duplicate the
relevant inserted list <spreadsheet/insert/list-duplicate>` or :ref:`pivot table
<spreadsheet/insert/pivot-table-duplicate>`, then, when setting up field matching, set a
period offset for the second data source but not the first.
When applying the filter, the original list or pivot table shows data for the time range
selected, while the second shows data for a period before or after that time range, as
defined.
#. Click :guilabel:`Save`.
.. example::
Consider a :guilabel:`Period offset` of :guilabel:`Next` when using the :guilabel:`Month /
Quarter` range to apply the filter to the *next* period relative to the set time range.
In the example below, a :guilabel:`Date` global filter has been created to allow the pivot table
and chart to show sales data per quarter. If only a year is selected, data is shown for the
entire year.
With this configuration, selecting `January` `2024` as the date, filters data as `February`
`2024`; where the selected month is offset to the next month.
.. image:: global_filters/example-date.png
:alt: A date filter to filter on quarter and year
.. image:: global_filters/date-period-offset.png
:align: center
:alt: A date filter with a period offset of "Next" configured.
In the :guilabel:`Field matching` section of the :guilabel:`Filter properties`, the field
:guilabel:`Order Date` has been selected as the matching date field. A matching date field is not
needed for *List #1* as we will not use this filter on the data source in question.
.. _spreadsheet/global-filter-relation:
.. image:: global_filters/field-matching-date.png
:alt: A date filter with the Order Date selected as the matching field
:scale: 80%
.. _spreadsheet/global-filters/create-relation:
Relation
--------
The *Relation* global filter enables the filtering of records in data sources by selecting a field
from a related model.
.. note::
A :guilabel:`Relation` filter can only match with a :ref:`Many2One
<studio/fields/relational-fields-many2one>`, :ref:`One2Many
<studio/fields/relational-fields-one2many>`, or :ref:`Many2Many
<studio/fields/relational-fields-many2many>` field.
With the |global-filter| menu open, select the :guilabel:`Relation` button to create a new relation
filter. The :guilabel:`Filter properties` menu displays the following fields for configuration.
With the :guilabel:`Filter properties` pane open:
First, enter a name for the new relation filter in the :guilabel:`Label` field.
#. Enter a name for the new relation filter in the :guilabel:`Label` field.
Then, select or search for a model from the :guilabel:`Related model` field.
#. In the :guilabel:`Related model` field, start typing the model name to reveal a list of all
models, then select the appropriate one. Once a model is selected, the
:guilabel:`Default value` and :guilabel:`Possible values` fields appear, as well as the
:guilabel:`Field matching` section.
Once a model is selected, the :guilabel:`Default value` and :guilabel:`Field matching` fields
appear.
#. To set a :guilabel:`Default value`, select one of the available values; these are records from
the model. If the related model is the *User* model, the option :guilabel:`Automatically filter
on the current user` can be enabled.
Optionally, set a :guilabel:`Default value` for the :guilabel:`Related model`. The available options
are records of the model.
#. To limit the values that can be shown, enable :guilabel:`Restrict values with a domain`, then
click :ref:`Edit domain <search/custom-filters>` to add or edit rules.
Next, configure the :guilabel:`Field matching` for each data source. To do so, expand the section by
clicking on the :guilabel:`Field matching` heading, to reveal a list of the data sources in the
spreadsheet where each data source has a field for matching.
#. In the :guilabel:`Field matching` section, check if the correct matching field has been
assigned for each data source. If this is not the case, click below the data source name to
select the correct field.
Select a field from the data source model from which to apply the relation filter.
Lastly, once all the information is entered on the form, click the :guilabel:`Save` button. If any
of the data source fields do not match the data type of the related model, an error is shown
stating :guilabel:`Some required fields are not valid`.
#. Click :guilabel:`Save`.
.. example::
Consider a *Relation* filter with the :guilabel:`Related model` set as :guilabel:`Contact`. The
:guilabel:`Field matching` *CRM* lead (`crm.lead`) pivot data sources are set to
:guilabel:`Customer`.
In the example below, a :guilabel:`Relation` filter has been created to allow the pivot table
and chart to show sales data related to selected salespeople only. The *User* model was set as
the :guilabel:`Related model`.
With this configuration, selecting a customer record filters the pivot table to only leads that
are related to the selected customer record.
.. image:: global_filters/example-relation.png
:alt: Relation filter set on a pivot table
.. image:: global_filters/relation-contact.png
:align: center
:alt: A relation filter with the Contact model configured.
In the :guilabel:`Field matching` section of the :guilabel:`Filter properties`, the field
:guilabel:`Salesperson` was automatically assigned as the matching field for both the pivot table
and the chart. A matching field is not needed for *List #1* as we will not use this filter on the
data source in question.
.. _spreadsheet/global-filter-text:
.. image:: global_filters/field-matching-relation.png
:alt: A relation filter with the User model configured
:scale: 80%
.. _spreadsheet/global-filters/create-text:
Text
----
The *Text* global filter enables the filtering of text by matching data source text fields to a
string of text or to a range of predefined values.
.. note::
A :guilabel:`Text` filter can only match with a :ref:`Text (char)
<studio/fields/simple-fields-text>`, :ref:`Integer <studio/fields/simple-fields-integer>` or
:ref:`Decimal (float) <studio/fields/simple-fields-decimal>` field.
With the |global-filter| menu open, select the :guilabel:`Text` button to create a new text filter.
The :guilabel:`Filter properties` menu displays the following fields for configuration.
With the :guilabel:`Filter properties` pane open:
First, enter a name for the new text filter in the :guilabel:`Label` field.
#. Enter a name for the new text filter in the :guilabel:`Label` field.
#. Optionally, enable :guilabel:`Restrict values to a range`. Doing so allows you to input a
spreadsheet range either by typing the range or selecting it from within the spreadsheet.
#. Optionally, enter a :guilabel:`Default value`.
#. In the :guilabel:`Field matching` section, for each data source click below the data source name
and select the field the :guilabel:`Text` filter should match with.
Then, choose whether or not to :guilabel:`Restrict values to a range` by ticking the checkbox. Doing
so, reveals a field to input a range within the spreadsheet. Either type in or select the range.
Next, configure the :guilabel:`Field matching` for each data source. To do so, expand the section by
clicking on the :guilabel:`Field matching` heading, to reveal a list of the data sources in the
spreadsheet where each data source has a field for matching.
Select a field from the data source model from which to apply the text filter.
Lastly, once all the information is entered on the form, click the :guilabel:`Save` button. If any
of the data source fields do not match the data type of the related model, an error is shown
stating :guilabel:`Some required fields are not valid`.
#. Click :guilabel:`Save`.
.. example::
Consider a text filter with the range `A2:A6` added to the :guilabel:`Restrict values to a range`
field. The spreadsheet has five different product names listed as values in the cells of column
`A`, rows `2` though `6`.
In the example below, a :guilabel:`Text` global filter was created to allow the user to select a
product from the :guilabel:`Product` filter and have both the pivot table and chart only show
sales data related to that specific product.
With the above configuration, a pivot table of products can be filtered by product name by
selecting one of the 5 predefined values available in the text filter.
.. image:: global_filters/example-text.png
:alt: Global filters set on a pivot table
Furthermore, if the values in the range `A2:A6` are added dynamically the text filter becomes
dynamic as well.
In the :guilabel:`Filter properties`, the :guilabel:`Possible values` of the filter were
restricted to the range :guilabel:`'Products (List #1)'!A2:A34`. This corresponds to the range
containing the :guilabel:`Display name` of the product on a list inserted in the spreadsheet.
.. image:: global_filters/text-values.png
:align: center
:alt: A dynamic text filter with a restricted range.
.. image:: global_filters/field-matching-text.png
:alt: A text filter with a restricted range
:scale: 80%
Manage filters
==============
With this configuration, the pivot table and chart can be filtered by product name by
selecting one of the predefined values available in the text filter. In this case,
:guilabel:`Furniture` has already been selected as the :guilabel:`Product category`, meaning
that only products of this category can be selected as possible values.
Open the |global-filter| filter menu by navigating to the :menuselection:`Documents app` and
clicking on the desired spreadsheet.
Furthermore, if the values in the range have been retrieved dynamically from the database, as in
this case, the text filter is also dynamic, i.e., will reflect changes made to those values.
Existing global filters appear under the :guilabel:`Filters` section. Filters can be used
individually, or at the same time.
Manage and use global filters
=============================
.. tip::
The order of existing filters can be changed by hovering over a filter and using the
|drag-handle| icon to change the position.
Click the :icon:`os-global-filters` :guilabel:`Filters` icon at the top right of an Odoo spreadsheet
to access the global filters that have been created for that spreadsheet.
To reset a filter with set values back to default, click on the :icon:`fa-times` (clear) icon next
to the value in the filter.
It is possible to:
To edit an existing filter, select the :icon:`fa-cog` :guilabel:`(gear)` icon to open the filter's
:guilabel:`Filter properties` menu. From here, edits can be made or the filter can be deleted by
clicking the :guilabel:`Remove` button.
- **Apply one or more global filters** by selecting appropriate values per filter, as relevant.
.. tip::
Reloading the browser will cause any global filters to reset to their initial state or default
value, as relevant. To refresh data in an inserted list, pivot table, or chart without losing
global filters that have been applied, click :menuselection:`Data --> Refresh all data` from
the menu bar.
- **Change the order** of existing filters by hovering over a filter and using the
:icon:`os-thin-drag-handle` :guilabel:`(drag handle)` icon to change the position.
- **Clear filter values** (whether default or selected values) by clicking the :icon:`fa-times`
:guilabel:`(Clear)` icon next to the value in the filter.
- **Edit an existing filter** by selecting the :icon:`fa-cog` :guilabel:`(Edit)` icon to open the
filter's :guilabel:`Filter properties` then editing as needed.
- **Delete an existing filter** by selecting the :icon:`fa-cog` :guilabel:`(Edit)` icon to open the
filter's :guilabel:`Filter properties` then clicking :guilabel:`Remove`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -1,58 +1,821 @@
==============
Link Odoo data
==============
============================
Insert and link to Odoo data
============================
You can insert and link several elements from your database in your spreadsheets, namely:
Several elements from your Odoo database can be inserted into an Odoo spreadsheet, namely:
- pivots,
- graphs,
- lists, and
- links to menus (i.e., a clickable link to a view of a specific model).
- lists, i.e., data from a :ref:`list view <studio/views/multiple-records/list>`
- pivot tables, i.e., data from a :ref:`pivot view <studio/views/reporting/pivot>`
- charts, i.e., data from a :ref:`graph view <studio/views/reporting/graph>`
Before inserting :ref:`pivots <reporting/views/pivot>`, :ref:`graphs <reporting/views/graph>`, or
lists, ensure they are tailored to your needs, as some elements are more quickly - or only -
configurable in their respective view.
Each time a list, pivot table, or chart is inserted, a :ref:`data source
<spreadsheet/insert/data-sources>` is created. This data source connects the spreadsheet to your
Odoo database, retrieving up-to-date information every time the spreadsheet is opened or reloaded.
- To insert pivots and graphs, click :guilabel:`Insert in spreadsheet` from any pivot or graph view.
- To insert lists, click :menuselection:`Favorites --> Insert list in spreadsheet` from any list
view.
- To insert links to menus, click :menuselection:`Favorites --> Link menu in spreadsheet` from any
view.
:ref:`Inserted lists <spreadsheet/insert/list>` and :ref:`inserted pivot tables
<spreadsheet/insert/pivot-table>` use formulas with Odoo-specific :ref:`list functions
<spreadsheet/insert/list-functions>` and :ref:`pivot table functions
<spreadsheet/insert/pivot-table-functions-static>` to retrieve data from your database and can be
further manipulated in the spreadsheet. Certain elements of :ref:`inserted charts
<spreadsheet/insert/chart>` can be modified, but no data manipulation or computation is possible.
In the pop-up box, either create a new spreadsheet by selecting :guilabel:`Blank spreadsheet` or
insert it in an existing one by selecting it and clicking :guilabel:`Confirm`.
.. tip::
If you intend to use :doc:`global filters <global_filters>` to dynamically filter Odoo data in
a spreadsheet or dashboard, do not use the same conditions to establish the initial list, pivot
table, or chart in your database.
.. image:: insert/insert-spreadsheet.png
:align: center
:alt: Inserting a pivot in a spreadsheet
It is also possible to:
- :ref:`add clickable links <spreadsheet/insert/clickable-links>` to Odoo menu items, to other
sheets of the same spreadsheet, or to external URLs
- :ref:`insert financial data <spreadsheet/insert/financial-data>` from your Odoo database using
Odoo-specific spreadsheet :doc:`functions <functions>`
- paste data from another Odoo spreadsheet, Excel spreadsheet, or Google Sheet directly into any
Odoo spreadsheet
.. _spreadsheet/insert/data-sources:
Data sources
============
Data sources, which are created each time a :ref:`list <spreadsheet/insert/list>`, :ref:`pivot table
<spreadsheet/insert/pivot-table>` or :ref:`graph <spreadsheet/insert/chart>` is inserted into an
Odoo spreadsheet, connect the spreadsheet and the relevant :doc:`model
<../../studio/models_modules_apps>` in your database.
Each data source is defined by properties that can be accessed via the :guilabel:`Data` menu. Data
sources are identified by their respective :icon:`oi-view-pivot` :guilabel:`(pivot table)`,
:icon:`oi-view-list` :guilabel:`(list)` or :icon:`fa-bar-chart` :guilabel:`(chart)` icon, followed
by their ID and name, e.g., :icon:`oi-view-pivot` *(#1) Sales Analysis by Product*.
.. image:: insert/data-menu.png
:alt: Data sources listed in Data menu
Clicking on a data source opens its properties in a pane to the right of the spreadsheet.
.. tip::
Once the properties of a specific data source are open, they remain open even when navigating
between spreadsheet tabs. To close the properties pane, click the :icon:`fa-times`
:guilabel:`(close)` icon at the top right of the pane.
.. note::
By default, new spreadsheets are saved under the :guilabel:`Spreadsheet` workspace of the
Documents app.
Deleting an inserted list or pivot table, or deleting the sheet into which it was inserted, does
not delete the underlying data source. The data source of an inserted list or pivot table can
only be deleted via the data source's properties.
.. _insert/update:
A warning in the :guilabel:`Data` menu identifies any data sources for which the corresponding
list or pivot table no longer appears in the spreadsheet.
Updating data
.. image:: insert/list-deleted.png
:alt: Warning message about unused list
Deleting an inserted chart, on the other hand, also deletes the underlying data source.
.. _spreadsheet/insert/list:
Insert a list
=============
Once inserted in a spreadsheet, your data is kept up-to-date, reflecting any changes made to your
database. Reopening the spreadsheet reloads the linked data.
.. important::
Before inserting a list in a spreadsheet, ensure the list is tailored to your needs. Consider
which fields should be visible as well as how the records are filtered and/or sorted. This can
impact both the loading time and the user-friendliness of your spreadsheet.
To insert a list:
#. With the list view selected, click the :icon:`fa-cog` :guilabel:`(Actions)` icon
beside the name of the view, then :menuselection:`Spreadsheet -->` :icon:`oi-view-list`
:menuselection:`Insert list in spreadsheet`.
.. note::
To insert only specific records, select the relevant records, click the :icon:`fa-cog`
:guilabel:`Actions` button that appears at the top center of the screen, then
:icon:`oi-view-list` :guilabel:`Insert in spreadsheet`.
#. In the window that opens, edit the :guilabel:`Name of the list` if needed.
The list name is used in the sheet name and in the :ref:`list properties
<spreadsheet/insert/list-properties>`.
.. image:: insert/insert-list.png
:alt: Inserting a list in a spreadsheet
#. Edit the number of records, i.e., rows, to be inserted if needed.
By default, the number shown is the number of records visible on the first page of the list. For
example, if the list contains 150 records but only 80 are visible, this field will show 80.
.. note::
While the data in your list is kept up to date thanks to the connection to your database, an
inserted list will not automatically expand to accommodate new records, e.g., a new product
category or a new salesperson.
If you anticipate new records being added, consider adding extra rows when inserting the list.
Records/rows can also be :ref:`added manually <spreadsheet/insert/list-add-records>` after the
spreadsheet has been inserted.
.. example::
Your company currently has ten product categories and you insert this list in a
spreadsheet. If an 11th product category is created and your inserted list only had ten
rows, the new category will be inserted in the appropriate position in the spreadsheet,
thereby removing an existing category.
One way to avoid this is to :ref:`add extra rows <spreadsheet/insert/list-add-records>`
when inserting the list.
#. Click :guilabel:`Blank spreadsheet` or select in which existing spreadsheet the list should be
inserted.
.. note::
New spreadsheets are saved in the **Odoo Documents** app in either the :icon:`fa-hdd-o`
:guilabel:`My Drive` personal workspace or, if :ref:`file centralization
<documents/file-centralization>` has been enabled for spreadsheets, in the
:guilabel:`Spreadsheet` workspace.
#. Click :guilabel:`Confirm`.
The list is inserted into a new sheet in the spreadsheet. The sheet tab in the bottom bar shows the
name of the list followed by the list ID, e.g., *Quotations by Total (List #1)*. A pane on the right
side of the screen shows the :ref:`list properties <spreadsheet/insert/list-properties>`.
.. tip::
- To sever the link between an inserted list and your database, select the entire list,
right-click and select :icon:`fa-clipboard` :guilabel:`Copy` then right-click again and select
:menuselection:`Paste special --> Paste as value`.
- Do not modify the list ID in the sheet name, as the inserted list retains this ID for the
lifetime of the spreadsheet. This list ID is used in the :ref:`spreadsheet functions
<spreadsheet/insert/list-functions>` that retrieve data from your database.
.. _spreadsheet/insert/list-functions:
List functions
--------------
When a list is inserted into a spreadsheet, the following :doc:`functions <functions>` are used to
retrieve the header and field values, respectively:
.. code-block:: text
=ODOO.LIST.HEADER(list_id, field_name)
=ODOO.LIST(list_id, index, field_name)
The arguments of the function are as follows:
- `list_id`: the ID assigned when the list is inserted. The first list inserted into a spreadsheet
is assigned list ID `1`, the second, list ID `2`, etc.
- `index`: identifies the line on which the record appeared in the list before insertion. The
first line has an index of `1`, the second an index of `2`, etc.
- `field_name`: the technical name of the field.
.. tip::
Clicking on an individual cell displays the related formula, if relevant, in the formula bar. To
display all the formulas of a spreadsheet at the same time, click :menuselection:`View -->`
:icon:`fa-eye` :menuselection:`Show --> Formulas` on the menu bar. The example below shows the
functions used to retrieve list headers and values.
.. image:: insert/list-formulas.png
:alt: Viewing formulas of spreadsheet cells
.. _spreadsheet/insert/list-properties:
List properties
---------------
The list properties appear on the right side of the screen when a list is inserted. They can be
accessed at any time via the :guilabel:`Data` menu by clicking the relevant list, as prefaced by
the :icon:`oi-view-list` :guilabel:`(list)` icon.
The following list properties are shown, some of which can be edited:
- :guilabel:`List #`: the list ID. List IDs are assigned sequentially as additional lists are
inserted into the spreadsheet.
- :guilabel:`List Name`: the name of the list. Edit this if needed. Note that editing the list name
in the list properties does not modify the list name shown in the sheet name, and vice versa.
- :guilabel:`Model`: the model from which the data has been extracted.
- :guilabel:`Columns`: the fields of the model that were visible when the list was inserted.
- :guilabel:`Domain`: the rules used to determine which records are shown. Click
:ref:`Edit domain <search/custom-filters>` to add or edit rules.
.. note::
When :doc:`global filters <global_filters>` are used, this domain is combined with the selected
values of the global filter before the data is loaded into the spreadsheet.
- :guilabel:`Sorting`: how the data is sorted, if applicable. To add a sorting rule, click
:guilabel:`Add`, select the field, then choose whether sorting should be :guilabel:`Ascending` or
:guilabel:`Descending`. Delete a sorting rule by clicking the :icon:`fa-times`
:guilabel:`(delete)` icon.
To :ref:`duplicate <spreadsheet/insert/list-duplicate>` or :ref:`delete
<spreadsheet/insert/list-delete>` a list's data source, click the :icon:`fa-cog` :guilabel:`(gear)`
icon, then click :icon:`fa-clone` :guilabel:`Duplicate` or :icon:`fa-trash` :guilabel:`Delete` as
relevant.
.. _spreadsheet/insert/list-manage:
Manage an inserted list
-----------------------
Once a list from an Odoo database has been inserted into an Odoo spreadsheet, you can:
- :ref:`add records <spreadsheet/insert/list-add-records>`, i.e., rows
- :ref:`add fields <spreadsheet/insert/list-add-fields>`, i.e., columns
- :ref:`duplicate the list <spreadsheet/insert/list-duplicate>` to create a new, identical data
source
- :ref:`delete the list and its underlying data source <spreadsheet/insert/list-delete>`
.. _spreadsheet/insert/list-add-records:
Add records/rows to a list
~~~~~~~~~~~~~~~~~~~~~~~~~~
To add records to a list, use one of the following methods:
- Select the last row of the table, then hover over the blue square until the plus icon appears.
Click and drag down to add the desired number of rows. The cells of the new rows are populated
with the :ref:`appropriate formula <spreadsheet/insert/list-functions>` to retrieve the list
values. If there is corresponding data in your database, the cells are populated.
.. image:: insert/list-add-records.png
:alt: Add records by dragging the cell down
- Position your cursor in the top left cell of the sheet, click :menuselection:`Data --> Re-insert
list` from the menu bar, then select the appropriate list. In the pop-up window, indicate the
number of records to insert and click :guilabel:`Confirm`. An updated list is inserted,
overwriting the previous list.
.. tip::
The above methods can also be used to add additional blank rows to your spreadsheet table. This
may be useful for lists where you expect additional records to be generated in your database,
e.g., new product categories or new salespersons.
.. _spreadsheet/insert/list-add-fields:
Add fields/columns to a list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To add fields/columns to a list:
#. Select the column to the right or left of where the new column should be inserted.
#. Click :menuselection:`Insert -->` :icon:`os-insert-col` :menuselection:`Insert column` then
:icon:`os-insert-col-before` :menuselection:`Column left` or :icon:`os-insert-col-after`
:menuselection:`Column right` from the menu bar, or right-click then :icon:`os-insert-col-before`
:guilabel:`Insert column left` or :icon:`os-insert-col-after` :guilabel:`Insert column right` as
appropriate.
#. Copy the header cell of any column, paste it into the header cell of the new column, and press
`Enter`.
#. Double-click the new header cell then click on the field name that appears in quotation marks at
the end of the formula; a list of all the technical names of the fields of the related model
appears.
.. image:: insert/list-add-columns.png
:alt: Add fields/columns by editing the formula
#. Select the appropriate field name and press `Enter`. The field's label appears in the header.
.. tip::
To know a field's technical name, navigate to the relevant view, :ref:`activate developer mode
<developer-mode>`, then check the field name by hovering over the question mark beside a
field's label.
#. With the header cell selected, double-click on the blue square in the bottom-right corner. The
cells of the column are populated with the appropriate formula to retrieve the list values. If
there is corresponding data in your database, the cells are populated.
.. _spreadsheet/insert/list-duplicate:
Duplicate a list
~~~~~~~~~~~~~~~~
Duplicating a list via the list's properties creates an additional data source. This allows for
different manipulations to be performed on the same data within one spreadsheet.
With the :ref:`list properties <spreadsheet/insert/list-properties>` open, click the :icon:`fa-cog`
:guilabel:`(gear)` icon then :icon:`fa-clipboard` :guilabel:`Duplicate`.
The new data source is assigned the next available list ID. For example, if no other lists have been
inserted in the meantime, duplicating *List #1* results in the creation of *List #2*.
Unlike when you insert a list, a duplicated list is not automatically inserted into the spreadsheet.
To insert it, perform the following steps:
#. Add a new sheet by clicking the :icon:`os-plus` :guilabel:`(add sheet)` icon at the bottom left
of the spreadsheet.
#. Click :menuselection:`Data --> Re-insert list` from the menu bar, then select the appropriate
list.
#. Define the number of records to insert and click :guilabel:`Confirm`.
#. Edit the :guilabel:`List Name` in the properties pane if needed.
#. Rename the sheet by right-clicking on the sheet tab, selecting :guilabel:`Rename`, and entering
the new sheet name.
.. note::
To update pivots and lists data without reopening a spreadsheet, go to the menu bar and click
:menuselection:`Data --> Refresh all data`.
Duplicating an inserted list by copying and pasting it or by duplicating the sheet into which it
has been inserted does not create a new data source. Any changes made to the list's properties
would therefore impact any copies of the list.
Pivot data
----------
.. _spreadsheet/insert/list-delete:
Using :guilabel:`Refresh all data` only updates existing pivot cells. If new cells need to be added,
go to the menu bar and click :menuselection:`Data --> Re-insert pivot` to fully update the pivot.
Alternatively, click :guilabel:`Insert pivot`, select the pivot, and tick :guilabel:`Display missing
cells only` to preview first the missing data.
Delete a list
~~~~~~~~~~~~~
.. image:: insert/missing-cells.png
:align: center
:alt: Displaying missing cells in a pivot
To fully delete a list and the underlying data source from a spreadsheet, perform the following
steps in any order:
To change which records are :ref:`used by the pivot <search/preconfigured-filters>`, right-click on
a pivot cell, select :guilabel:`See pivot properties`, and click :guilabel:`Edit domain`.
- Delete the spreadsheet table using your preferred means, e.g., via keyboard commands, spreadsheet
menus, or by deleting the sheet. This deletes the visual representation of the data.
- From the :ref:`properties pane <spreadsheet/insert/list-properties>` of the relevant list, click
the :icon:`fa-cog` :guilabel:`(gear)` icon then :icon:`fa-trash` :guilabel:`Delete`. This deletes
the data source of the list from the spreadsheet.
.. _spreadsheet/insert/pivot-table:
Insert a pivot table
====================
.. tip::
When a pivot table is inserted into a spreadsheet, it is by default static. Converting a static
pivot table to a :doc:`dynamic pivot table <dynamic_pivot_tables>` ensures the pivot table can
expand to accommodate new data series, such as sales data for a new quarter, and allows you to
modify the dimensions (i.e., columns and rows) and measures.
It is therefore possible to insert a basic pivot table with minimal configuration and refine it
directly in the spreadsheet after converting it to a dynamic pivot table.
To insert a pivot table:
#. With the pivot view selected, click :guilabel:`Insert in Spreadsheet`.
#. In the window that opens, edit the :guilabel:`Name of the pivot` if needed.
This name is used in the sheet name and in the :ref:`pivot table properties
<spreadsheet/insert/pivot-table-properties>`.
.. image:: insert/insert-pivot-table.png
:alt: Inserting a pivot table in a spreadsheet
#. Click :guilabel:`Blank spreadsheet` or select in which existing spreadsheet the pivot table
should be inserted.
.. note::
New spreadsheets are saved in the **Odoo Documents** app in either the :icon:`fa-hdd-o`
:guilabel:`My Drive` personal workspace or, if :ref:`file centralization
<documents/file-centralization>` has been enabled for spreadsheets, in the
:guilabel:`Spreadsheet` workspace.
#. Click :guilabel:`Confirm`.
The pivot table is inserted into a new sheet in the spreadsheet. The sheet tab in the bottom bar
shows the name of the pivot table followed by the pivot table ID, e.g., *Sales Analysis by Sales
Team (Pivot #1)*. A pane on the right side of the screen shows the :ref:`pivot table properties
<spreadsheet/insert/pivot-table-properties>`.
.. _spreadsheet/insert/pivot-table-functions-static:
Pivot table functions
---------------------
An inserted pivot table that has not been converted to a :doc:`dynamic pivot table
<dynamic_pivot_tables>` uses the following :doc:`functions <functions>` to retrieve the header and
field values, respectively:
.. code-block:: text
=PIVOT.HEADER(pivot_id, [domain_field_name, …], [domain_value, …])
=PIVOT.VALUE(pivot_id, measure_name, [domain_field_name, …], [domain_value, …])
The arguments of the functions are as follows:
- `pivot_id`: the ID assigned when the pivot table is inserted. The first pivot table inserted
in a spreadsheet is assigned pivot ID `1`, the second, pivot ID `2`, etc.
- `measure_name`: the technical name of what is being measured, followed by the type of aggregation,
e.g., `product_uom_qty:sum`.
- `domain_field_name`: the technical name of the field used as a dimension, e.g., `user_id`, or, if
the dimension is a time period, the technical name of the date field, followed by the time period,
e.g., `date_order:month`.
- `domain_value`: the ID of the record, or, if the dimension is a time period, the date or time
period targeted.
.. tip::
To see the formulas of spreadsheet cells, click :menuselection:`View -->` :icon:`fa-eye`
:menuselection:`Show --> Formulas` on the menu bar. The example below shows the functions used to
retrieve headers and values for a static pivot table.
.. image:: insert/pivot-table-formulas.png
:alt: Functions of a static pivot table
.. _spreadsheet/insert/pivot-table-properties:
Pivot table properties
----------------------
The pivot table properties appear on the right side of the screen when a pivot table is inserted.
They can be accessed at any time via the :guilabel:`Data` menu by clicking the relevant pivot table,
as prefaced by the :icon:`oi-view-pivot` :guilabel:`(pivot)` icon, or by right-clicking anywhere on
the pivot table and clicking :icon:`oi-view-pivot` :guilabel:`See pivot properties`.
The following pivot table properties are shown, some of which can be edited:
- :guilabel:`Pivot #`: the pivot table ID. Pivot table IDs are assigned sequentially as additional
pivot tables are inserted in the spreadsheet.
- :guilabel:`Name`: the name of the pivot table. Edit this if needed. Note that editing the name
in the pivot table properties does not modify the name shown in the sheet name, and vice versa.
- :guilabel:`Model`: the model from which the data has been extracted.
- :guilabel:`Columns` and :guilabel:`Rows`: dimensions you are using to categorize or group data
from the model.
- :guilabel:`Measures`: what you are measuring, or analyzing, based on the dimensions you have
chosen.
.. tip::
If you attempt to make changes to the columns, rows, or measures of a pivot table that has just
been inserted into a spreadsheet, an error appears at the top right of the screen.
.. image:: dynamic_pivot_tables/pivot-table-error.png
:alt: Error message when trying to manipulate static pivot table
To be able to manipulate a pivot table's properties, convert a static pivot table to a
:ref:`dynamic pivot table <spreadsheet/dynamic-pivot-tables/create>`.
- :guilabel:`Domain`: the rules used to determine which records are shown. Click
:ref:`Edit domain <search/custom-filters>` to add or edit rules.
.. note::
When :doc:`global filters <global_filters>` are used, this domain is combined with the selected
values of the global filter before the data is loaded into the spreadsheet.
To :ref:`duplicate <spreadsheet/insert/pivot-table-duplicate>` or :ref:`delete
<spreadsheet/insert/pivot-table-delete>` a pivot table's data source, click the :icon:`fa-cog`
:guilabel:`(gear)` icon then :icon:`fa-clone` :guilabel:`Duplicate` or :icon:`fa-trash`
:guilabel:`Delete`.
.. _spreadsheet/insert/pivot-table-manage:
Manage an inserted pivot table
------------------------------
Once a pivot table from an Odoo database has been inserted into an Odoo spreadsheet, you can:
- :ref:`convert it to a dynamic pivot table <spreadsheet/dynamic-pivot-tables/create>` to be able to
manipulate the dimensions and measures
- :ref:`duplicate the pivot table <spreadsheet/insert/pivot-table-duplicate>` to create a new,
identical data source
- :ref:`delete the pivot table and its underlying data source
<spreadsheet/insert/pivot-table-delete>`
.. _spreadsheet/insert/pivot-table-duplicate:
Duplicate a pivot table
~~~~~~~~~~~~~~~~~~~~~~~
Duplicating a pivot table via the pivot table's properties creates an additional data source. This
allows for different manipulations to be performed on the same data within one spreadsheet.
For example, you can see the same data aggregated by different dimensions or use :doc:`global
filters <global_filters>` to offset the date and create pivot tables that compare the current
period's data with a previous period.
To duplicate a pivot table, perform the following steps:
#. With the :ref:`pivot table properties <spreadsheet/insert/pivot-table-properties>` open, click
the :icon:`fa-cog` :guilabel:`(gear)` icon then :icon:`fa-clone` :guilabel:`Duplicate`.
The duplicated pivot table is automatically inserted into a new sheet in the spreadsheet, with
the pivot table properties open in the right pane.
#. Edit the :guilabel:`Name` in the properties pane and the sheet tab if needed.
The new data source is assigned the next available pivot table ID. For example, if no other pivot
tables have been inserted in the meantime, duplicating *Pivot #1* results in the creation of
*Pivot #2*.
.. note::
- Duplicating an inserted pivot table by copying and pasting it or by duplicating the sheet does
not create a new data source. Any changes made to the pivot table's properties would therefore
impact any copies of the pivot table.
- When a pivot table is duplicated, the new pivot table is by default a :doc:`dynamic pivot table
<dynamic_pivot_tables>`.
.. _spreadsheet/insert/pivot-table-delete:
Delete a pivot table
~~~~~~~~~~~~~~~~~~~~
To fully delete a pivot table and the underlying data source from a spreadsheet, perform the
following steps in any order:
- Delete the spreadsheet table using your preferred means, e.g., via keyboard commands, spreadsheet
menus, or by deleting the sheet. This deletes the visual representation of the data.
- From the :ref:`properties pane <spreadsheet/insert/pivot-table-properties>` of the relevant pivot
table, click the :icon:`fa-cog` :guilabel:`(gear)` icon then :icon:`fa-trash` :guilabel:`Delete`.
This deletes the data source of the pivot table.
.. _spreadsheet/insert/chart:
Insert a chart
==============
To insert a chart from an Odoo database into an Odoo spreadsheet:
#. With the graph view selected, click :guilabel:`Insert in Spreadsheet`.
#. In the window that opens, edit the :guilabel:`Name of the graph` if needed.
#. Click :guilabel:`Blank spreadsheet` or select in which existing spreadsheet the chart should be
inserted.
.. note::
New spreadsheets are saved in the **Odoo Documents** app in either the :icon:`fa-hdd-o`
:guilabel:`My Drive` personal workspace or, if :ref:`file centralization
<documents/file-centralization>` has been enabled for spreadsheets, in the
:guilabel:`Spreadsheet` workspace.
#. Click :guilabel:`Confirm`.
Charts are inserted on the first sheet of the spreadsheet.
.. _spreadsheet/insert/chart-properties:
Chart properties
----------------
When you insert a chart into a spreadsheet, the chart properties appear on the right side of the
screen. Access these at any time via the :guilabel:`Data` menu by clicking the relevant chart, as
prefaced by the :icon:`fa-bar-chart` :guilabel:`(chart)` icon. Alternatively, hover over the chart
then click the :icon:`fa-bars` :guilabel:`(menu)` icon and click :icon:`fa-pencil-square-o`
:guilabel:`Edit`.
In the chart properties, the :icon:`fa-sliders` :guilabel:`Configuration` and :icon:`fa-paint-brush`
:guilabel:`Design` tabs let you modify various elements of the chart.
Configuration
~~~~~~~~~~~~~
The :icon:`fa-sliders` :guilabel:`Configuration` tab includes the following sections:
- :guilabel:`Chart type`: the type of chart. By default, this indicates the type of chart you
selected in the graph view in the database before inserting the chart in the spreadsheet.
After a chart has been inserted, more chart types are available. Click the dropdown menu to
select the most appropriate chart type for the data.
.. note::
The chart types in the :guilabel:`Other` tab below are only available when creating a chart
from spreadsheet data; an inserted chart cannot be converted to a chart type shown in that tab.
All other chart types are available for both inserted charts and when creating a chart directly
from spreadsheet data.
.. tabs::
.. tab:: Line
.. image:: insert/chart-type-line.png
:alt: Line chart icon
:guilabel:`Line`: best for showing trends or changes over time, such as sales
growth across months or temperature variations.
.. image:: insert/chart-type-line-stacked.png
:alt: Stacked line chart icon
:guilabel:`Stacked Line`: useful for visualizing cumulative trends where multiple series
contribute to a total, like revenue by department over time.
.. image:: insert/chart-type-line-combo.png
:alt: Combo chart icon
:guilabel:`Combo`: combines multiple chart types (e.g., bars and lines) to compare different
data types or highlight key metrics alongside trends.
.. tab:: Column
.. image:: insert/chart-type-column.png
:alt: Column chart icon
:guilabel:`Column`: ideal for comparing values across discrete categories, such as sales per
product or revenue by region.
.. image:: insert/chart-type-column-stacked.png
:alt: Stacked column chart icon
:guilabel:`Stacked Column`: displays part-to-whole relationships within categories, such as
regional contributions to total sales.
.. image:: insert/chart-type-bar.png
:alt: Bar chart icon
:guilabel:`Bar`: similar to a column chart but horizontal, making it better for comparing
long category names or datasets.
.. image:: insert/chart-type-bar-stacked.png
:alt: Stacked bar chart icon
:guilabel:`Stacked Bar`: highlights cumulative contributions across categories, often used
in demographic or resource allocation analysis.
.. tab:: Area
.. image:: insert/chart-type-area.png
:alt: Area chart icon
:guilabel:`Area`: similar to a line chart but fills the area beneath the lines to emphasize
magnitude, perfect for cumulative metrics over time.
.. image:: insert/chart-type-area-stacked.png
:alt: Stacked area chart icon
:guilabel:`Stacked Area`: visualizes the composition of changes over time, such as market
share by product category.
.. tab:: Pie
.. image:: insert/chart-type-pie.png
:alt: Pie chart icon
:guilabel:`Pie`: best for showing proportions or percentages of a whole, such as market
share or budget allocation.
.. image:: insert/chart-type-doughnut.png
:alt: Doughnut chart icon
:guilabel:`Doughnut`: A variation of the pie chart with a hollow center, offering similar
use cases but with a modern aesthetic.
.. tab:: Miscellaneous
.. image:: insert/chart-type-scatter.png
:alt: Scatter chart icon
:guilabel:`Scatter`: ideal for analyzing relationships or correlations between two numerical
variables, such as price vs. quantity sold.
.. image:: insert/chart-type-waterfall.png
:alt: Waterfall chart icon
:guilabel:`Waterfall`: ideal for visualizing cumulative effects of sequential positive and
negative values, such as profit/loss analysis.
.. image:: insert/chart-type-population-pyramid.png
:alt: Population pyramid chart icon
:guilabel:`Population Pyramid`: a specialized chart for comparing distributions, often used
in demographics, such as age and gender group analysis.
.. image:: insert/chart-type-radar.png
:alt: Radar chart icon
:guilabel:`Radar`: displays multivariate data as a polygon on axes radiating from a center,
allowing for profile comparisons across multiple variables.
.. image:: insert/chart-type-filled-radar.png
:alt: Filled radar chart icon
:guilabel:`Filled radar`: fills the area within the radar chart's polygon, emphasizing the
overall magnitude of values across different attributes for comparison.
.. tab:: Other
When creating a chart from spreadsheet data, rather than inserting one from a graph view,
the following chart types are also available:
.. image:: insert/chart-type-gauge.png
:alt: Gauge chart icon
:guilabel:`Gauge`: displays progress toward a goal or a single key metric, such as
performance against a target.
.. image:: insert/chart-type-scorecard.png
:alt: Scorecard icon
:guilabel:`Scorecard`: used to summarize key performance indicators (KPIs) in a compact
format, such as total sales or conversion rates, and compare to a baseline or a previous
value.
.. image:: insert/chart-type-geo.png
:alt: Geo chart icon
:guilabel:`Geo`: visualizes data on a map using color variations to represent values or
categories across different geographical regions.
- :guilabel:`Domain`: the rules used to determine which records are shown. Click :ref:`Edit domain
<search/custom-filters>` to add or edit rules.
- :guilabel:`Link to Odoo menu`: to add a :ref:`clickable link <spreadsheet/insert/clickable-links>`
from a chart to an Odoo menu item, i.e., a specific view of a model.
Design
~~~~~~
Depending on the chart type, the :icon:`fa-paint-brush` :guilabel:`Design` tab has one or more
sections.
The :guilabel:`General` section allows you to modify the following elements:
- :guilabel:`Background color`: Add or change the background color by clicking on the color dot.
Choose one of the standard colors or click the :icon:`fa-plus` icon to manually select a custom
color.
- :guilabel:`Chart title`: Edit the chart title, if needed. The font formatting, horizontal
alignment, font size, and color of the title can be modified using the editor.
- :guilabel:`Vertical axis position`: Choose whether the vertical axis is placed on the left or
right in line, column, and area charts.
- :guilabel:`Legend position`: Change the position of the legend or opt to have no legend.
- Enable :guilabel:`Show values` to add numeric values to the data points on the
chart.
The :guilabel:`Data Series` section allows you to modify the following elements:
- :guilabel:`Series color`: With the relevant data series selected, change the color of the related
data points on the chart by clicking on the color dot circle. Choose one of the standard colors or
click the :icon:`fa-plus` icon to manually select a custom color.
- :guilabel:`Series name`: Edit the name of a data series, if needed.
- :guilabel:`Serie type`: For each data series of a :guilabel:`Combo` chart, determine whether the
series is shown as a :guilabel:`Bar` or :guilabel:`Line`.
- :guilabel:`Vertical axis`: For the selected data series of a :guilabel:`Line`, :guilabel:`Area`,
or :guilabel:`Column` chart, select whether it should be displayed on the :guilabel:`Left`
(primary) or :guilabel:`Right` (secondary) vertical axis.
- :guilabel:`Trend line`: With the relevant data series selected, enable :guilabel:`Show trend line`
then select the type of trend line from the dropdown; the options are :guilabel:`Linear`,
:guilabel:`Exponential`, :guilabel:`Polynomial`, :guilabel:`Logarithmic`, and :guilabel:`Trailing
moving average`. The color of the trend line can be changed by clicking on the color circle.
The :guilabel:`Axes` section allows you add a title to one or both axes of a chart. The font
formatting, horizontal alignment, font size, and color of the title can be modified using the
editor.
Waterfall charts have a dedicated :guilabel:`Waterfall design` section.
.. _spreadsheet/insert/clickable-links:
Insert clickable links
======================
Adding links to related or supporting information can make your report or dashboard more
user-friendly and effective.
You can :ref:`insert a clickable link from any spreadsheet cell
<spreadsheet/insert/clickable-links-cell>` to:
- an Odoo menu item
- another sheet inside the same spreadsheet
- an external URL
.. note::
- Clicking a link to a menu item provides the same result as navigating via the Odoo menu within
an app, e.g., the menu item :guilabel:`Sales/Orders/Quotations` corresponds to the default view
when navigating to :menuselection:`Sales --> Orders --> Quotations`.
- It is also possible to insert a clickable link to a specific view of a model in a spreadsheet
starting from the view itself. However, as this method inserts each new link in a new sheet, it
is more efficient to create links to specific views starting from the spreadsheet.
You can :ref:`insert a clickable link from any chart <spreadsheet/insert/clickable-links-chart>` to
an Odoo menu item.
.. _spreadsheet/insert/clickable-links-cell:
Insert a clickable link from a cell
-----------------------------------
To insert a clickable link from a cell:
#. Click :menuselection:`Insert -->` :icon:`fa-link` :menuselection:`Link` from the menu bar or
right-click on the cell, then click :icon:`fa-link` :guilabel:`Insert link`. Next, depending on
the desired outcome, perform one of the following actions:
- Click the :icon:`fa-bars` :guilabel:`(menu)` icon, then :guilabel:`Link an Odoo menu`. Select the relevant
menu item from the list or click :guilabel:`Search more` to choose from a list of all menu
items. Click :guilabel:`Confirm`.
- Click the :icon:`fa-bars` :guilabel:`(menu)` icon, then :guilabel:`Link sheet`, then choose the
relevant sheet from the current spreadsheet.
- Under :guilabel:`Link`, type a URL.
#. Enter or edit the label for the link in the :guilabel:`Text` field.
#. Click :guilabel:`Confirm`.
.. _spreadsheet/insert/clickable-links-chart:
Insert a clickable link from a chart
------------------------------------
To insert a clickable link from a chart to an Odoo menu item:
#. Hover over the top right of the chart's box, then click the :icon:`fa-bars` :guilabel:`(menu)`
icon, then :icon:`fa-pencil-square-o` :guilabel:`Edit`. The chart properties appear at the right
of the screen.
#. At the bottom of the :icon:`fa-sliders` :guilabel:`Configuration` tab of the chart properties
pane, click under :guilabel:`Link to Odoo menu`, then select a menu.
Hover over the top right of the chart's box to see that a new :icon:`fa-external-link`
:guilabel:`(external link)` icon has been added.
.. tip::
Clicking on a data point in a chart opens the relevant list view in the database. In the example
clicking on :guilabel:`Jessica Childs` opens the list view of all sales by this salesperson that
match the domain of the chart.
.. image:: insert/clickable-link-chart.png
:alt: A clickable link to an Odoo menu plus clickable data point
.. _spreadsheet/insert/financial-data:
Insert financial data
=====================
When building reports and dashboards, it may be useful to include certain accounting-related data,
such as account IDs, credits and debits for specific accounts, and dates of the start and end of the
tax year.
:ref:`Odoo-specific spreadsheet functions <spreadsheet/functions/odoo>` allow you to retrieve such
accounting data from your database and insert it into a spreadsheet.

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB