o-spreadsheet icon indicating copy to clipboard operation
o-spreadsheet copied to clipboard

[FIX] functions: fix lookup for dates

Open yelizariev opened this issue 2 years ago • 4 comments

Datetime values are parsed to an object with value, format, jsDate attributes. Such objects are considered different even if the dates are the same.

Fix it by comparing jsDate value (those are Date objects and hence getDate method must be used)

Example:

| (A) Date      | (B) Amout | (C) Date      | VLOOKUP                  |
|---------------+-----------+---------------+--------------------------|
| 9/10/2022     |   999     | 9/10/2022     | =VLOOKUP(C2, A1:B2,2,0)  |

opw-2992901

Description:

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

Odoo task ID : 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 (_lt("qmsdf %s", abc))
  • [ ] unit tested
  • [ ] clean commented code
  • [ ] track breaking changes
  • [ ] doc is rebuild (npm run doc)
  • [ ] status is correct in Odoo

yelizariev avatar Sep 29 '22 14:09 yelizariev

It's reproduced in v14 only. v15 passes numeric value. Apparently the same in v16+

yelizariev avatar Sep 29 '22 15:09 yelizariev

Actually, don't bother. the issue is affecting more than just the vlookup so i'll make an internal task and cherrypick your fix in it

rrahir avatar Sep 30 '22 07:09 rrahir

@rrahir ping me please somewhere, so I could track it and report to customer when it's fixed

yelizariev avatar Sep 30 '22 07:09 yelizariev