odoo/o-spreadsheet#4499
Created by BI, Pierre Rousseau (pro)
Statuses:
- label
- odoo:saas-17.3-default-granularity-pro
- head
- dfe84626ac0177541035fedb96bbd10e10bc8f4c
- merged
- 4 months ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet | |
---|---|
saas-17.3 | #4499 |
master | #4500 |
[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
- [ ] feature is organized in plugin, or UI components
- [ ] support of duplicate sheet (deep copy)
- [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
- [ ] in model/UI: ranges are strings (to show the user)
- [ ] undo-able commands (uses this.history.update)
- [ ] multiuser-able commands (has inverse commands and transformations where needed)
- [ ] new/updated/removed commands are documented
- [ ] exportable in excel
- [ ] translations (_t("qmsdf %s", abc))
- [ ] unit tested
- [ ] clean commented code
- [ ] track breaking changes
- [ ] doc is rebuild (npm run doc)
- [ ] status is correct in Odoo
-
https://github.com/odoo/odoo/blob/b3b9b2b49ef90d30bcce1e27a4ba0b24f888170c/odoo/netsvc.py#L198 ↩
-
https://docs.python.org/3/library/logging.handlers.html#logging.StreamHandler ↩