odoo/o-spreadsheet#4511

Created by fw-bot
Merged at e9c2b96bf455f385bcaa3add3e121b26697469b8

Statuses:

label
odoo:master-saas-17.2-fix-previous-find-and-replace-mera-f02G-fw
head
76febf3f45b72051cbb583caf2c999d096c27b74
merged
1 month ago by BI, Pierre Rousseau (pro)
odoo/o-spreadsheet
saas-17.2 #4250
saas-17.3 #4508
master #4511

[FW][FIX] find_and_replace: fix previous command

[FIX] find_and_replace: fix previous command

Problem

The problem occurs when we perform a search using "Find & Replace". In fact, when going backward to a previous occurrence that is located in the previous sheet, we match the first occurrence of that sheet, when actually we need to match on the last occurrence of that sheet.

Solution

This commit solves the issue by checking whether the sheet switch is automatic (coming from the Previous button).

Task: 3839575

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

Forward-Port-Of: #4250