Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master pivot spreadsheet pro rar #4025

Closed
wants to merge 5 commits into from

Commits on May 15, 2024

  1. [REF] functions: create helper for COUNTUNIQUE

    This commit is a step to introduce the spreadsheet pivot. The function
    COUNTUNIQUE is used in the pivot table to count the unique values in a
    range. The helper function is created to avoid code duplication.
    
    Task: 3748717
    
    Co-authored-by: rrahir <rar@odoo.com>
    Co-authored-by: Pierre Rousseau <pro@odoo.com>
    pro-odoo and rrahir committed May 15, 2024
    Configuration menu
    Copy the full SHA
    e30d1cf View commit details
    Browse the repository at this point in the history
  2. [REF] functions: create helper for AND and OR

    This commit is a step to introduce the spreadsheet pivot. The functions
    AND and OR are used in the pivot to compute the values when the measure
    is a boolean.
    
    Task: 3748717
    
    Co-authored-by: rrahir <rar@odoo.com>
    Co-authored-by: Pierre Rousseau <pro@odoo.com>
    pro-odoo and rrahir committed May 15, 2024
    Configuration menu
    Copy the full SHA
    d997c16 View commit details
    Browse the repository at this point in the history
  3. [IMP] side_panel: can compute title based on props

    With this commit, the function to compute the title of the side panel
    can now takes props as argument. This is useful to compute the title
    based on the props of the component.
    
    Task: 3748717
    
    Co-authored-by: rrahir <rar@odoo.com>
    Co-authored-by: Pierre Rousseau <pro@odoo.com>
    pro-odoo and rrahir committed May 15, 2024
    Configuration menu
    Copy the full SHA
    01d352e View commit details
    Browse the repository at this point in the history
  4. [ADD] pivot: introduce spreadsheet pivot table

    This commit introduces the spreadsheet pivot table. It is a new type of
    pivot table that is based on values from the spreadsheet itself.
    
    The pivot table is created by selecting a range of cells in the spreadsheet.
    The first row of the range is used as the available fields, and the rest
    of the range is used as the data.
    
    The type of the data is automatically detected based on the content of
    the cells in the column. It could be `date` if all the cells in the column
    are dates, `boolean` if all the cells are boolean, `number` if all the
    cells are numbers, or `char` otherwise.
    
    Each field can be used as a dimension (row or column) or as a measure
    (value), based on its type. The user can drag and drop the fields to
    the corresponding area in the pivot table side panel, select the order,
    select the granularity if the field is a date. Each measure can be
    aggregated using different functions (sum, average, count, etc.).
    
    For now, the pivot table is updated in real-time when the user changes
    the range of cells in the spreadsheet. This could be heavy for large
    spreadsheets, but a flag will be implemented to delay the update in a
    future task (3897841).
    
    This commit is a first version of the pivot table. Features are missing
    compared to the pivot table implemented in Odoo, for example the
    possibility to use `PIVOT.HEADER` and `PIVOT.VALUE` functions (and all
    the features that come with it, autocompletion of formulas, positional
    arguments, etc.). This will be implemented in a future task (3897857).
    
    Task: 3748717
    
    Co-authored-by: rrahir <rar@odoo.com>
    Co-authored-by: Pierre Rousseau <pro@odoo.com>
    pro-odoo and rrahir committed May 15, 2024
    Configuration menu
    Copy the full SHA
    1ffcbf8 View commit details
    Browse the repository at this point in the history
  5. [FIX] pivot: deactivate support for exploded pivot

    For now, the spreadsheet pivot does not fully support PIVOT.VALUE and
    PIVOT.HEADER functions, so we prefer to disable it. It will be reactivate
    later.
    
    List of features that are not supported:
    - Normalization of arguments, especially with the dates
    - Positional arguments (with #)
    
    Task: 3748717
    pro-odoo committed May 15, 2024
    Configuration menu
    Copy the full SHA
    4e7eff0 View commit details
    Browse the repository at this point in the history