odoo/o-spreadsheet#4500

Created by fw-bot
Merged at 17ba4e52fbf92283b3516e6258cccfe90e190a55

Statuses:

label
odoo:master-saas-17.3-default-granularity-pro-EFtz-fw
head
602fcb13905ee08fa0492d09650ae7c1c6dbfa6a
merged
2 years ago by BI, Pierre Rousseau (pro)
odoo/o-spreadsheet
saas-17.3 #4499
19.0
saas-19.1
saas-19.2
saas-19.3
saas-19.4
20.0
master #4500

[FW][FIX] pivot: do not allow date dimension without granularity

When a date dimension is used in a pivot view, the granularity must be specified. Before this commit, it automatically defaulted to 'month_number'. With the experience of the odoo pivot, it's not a good idea to have a default granularity, as it's not easily migrable. In addition, supported a date dimension without granularity leads to lots of "if-else" in the code to handle this.

So, we prefer to avoid this situation and raise an error when a date dimension is used without a granularity.

Description:

description of this task, what is implemented and why it is implemented that way.

Task: : TASK_ID

review checklist

Forward-Port-Of: #4499