odoo/o-spreadsheet#7496

Created by BI, Adrien Minne (adrm)
Merged at 05e6ca50269cfa89c51312b98c270115f8c7cba6

Statuses:

label
odoo:17.0-fix-date-data-validation-adrm
head
bc50a62e14b3facb7a057e2754bce6b7fe1bef21
merged
3 weeks ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet
17.0 #7496
18.0 #7677
saas-18.2 #7694
saas-18.3 #7695
saas-18.4 #7696
19.0 #7697
saas-19.1 #7698
master #7713

[FIx] data validation: fix date criterion

Description

The relative date criterion 'pastWeek/pastMonth/pastYear' were not correct. For example the 'pastWeek' criterion would span a period of 8 days instead of 7. The dates numbers were also not always rounded down, which could lead to some issues.

Task: 5343580

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