odoo/o-spreadsheet#4605

Created by fw-bot
Merged at 6ea19c26458337d88cf36acd2e74a1de229880fa

Statuses:

label
odoo:saas-17.2-15.0-wrong-borders-removed-on-delete-rows-mera-4CEP-fw
head
6f51c48de7bb01c37c8a5562fac772dc750c1658
merged
3 months ago by BI, Rémi Rahir (rar)
odoo/o-spreadsheet
15.0 #4325
16.0 #4527
17.0 #4603
saas-17.1 #4604
saas-17.2 #4605
saas-17.3 #4606
master #4607

[FW][FIX] border: bottom sheet borders removed on DELETE_ROWS

FIX border: bottom sheet borders removed on DELETE_ROWS

Problem

Before this commit, when we add borders at the bottom of a sheet (at very the last rows), if we delete some rows in a position before the borders, some/all borders disappear (depending on how many rows we deleted). The reason being that the sheet plugin updates the total rows before we loop through them to shift the borders.

Solution

This commit fixes this behaviour by redefining the way we get the border to shift.

Task: 3911695

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: #4603
Forward-Port-Of: #4325


  1. https://github.com/odoo/odoo/blob/8346b2a7561c178fd7e9f9d1fbd7dac3e3843fd1/addons/account/models/account_move.py#L912 ↩↩↩↩

  2. https://github.com/odoo/odoo/blob/8346b2a7561c178fd7e9f9d1fbd7dac3e3843fd1/addons/account/models/account_move.py#L896-L912 ↩↩↩

  3. https://docs.python.org/3/library/logging.handlers.html#logging.StreamHandler ↩