odoo/o-spreadsheet#5228

Created by BI, Lucas Lefèvre (lul)
Merged at dba1f936baab3ff83e1f7f14dc74fdc2addca21f

Statuses:

label
odoo:17.0-snapshot-leave-readonly-lul
head
0c487d6c7839abe659fd74160f279a7ff0f7d8cb
merged
2 days ago by BI, Vincent Schippefilt (vsc)
odoo/o-spreadsheet
17.0 #5228
saas-17.2 #5242
saas-17.4 #5243
18.0 #5244
master #5245

[FIX] collaborative: don't snapshot in read-only mode

Description:

Steps to reproduce:

  • open two browser windows with 2 different users: Alice and Bob. Alice has write access and Bob have only read-only access
  • open the same spreadsheet with both users
  • Alice updates a few cells
  • Alice leaves the spreadsheet
  • Bob leaves the spreadsheet

=> Bob is faced with an access error because he is trying to snapshot
the spreadsheet.

Task: 4344187

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