Skip to content

[18.0] [IMP] spreadsheet_oca: writeback with audit log and rollback - #104

Open
dnplkndll wants to merge 3 commits into
OCA:18.0from
ledoent:18.0-feat-writeback
Open

[18.0] [IMP] spreadsheet_oca: writeback with audit log and rollback#104
dnplkndll wants to merge 3 commits into
OCA:18.0from
ledoent:18.0-feat-writeback

Conversation

@dnplkndll

@dnplkndll dnplkndll commented Mar 13, 2026

Copy link
Copy Markdown

Adds writeback: edit a List cell in a spreadsheet and update the underlying Odoo
record, with an audit log and rollback.

Depends on #99 — its two commits are shared and drop out once
that merges.

Non-mechanical points worth flagging

  • Every write runs as the user, checked before it happens. The controller
    verifies writeback is enabled, the spreadsheet is readable, the model is
    registered, the record exists, check_access("write") passes on that record,
    and the field exists and is neither readonly nor computed.
  • Writeback is restricted to simple value fields (WRITEBACK_FIELD_TYPES).
    The previous value is stored as text so it can be rolled back, and a
    relational value does not survive that round-trip — str(recordset) yields
    res.partner(7,), which cannot be written back.
  • Rollback converts before writing. Booleans are the reason: str(False)
    is "False", and a non-empty string is truthy, so writing it straight back
    would set the field to True.
  • The audit log itself is written with sudo() so a permitted write is always
    recorded, regardless of the user's rights on the log model.

AI-assisted (Claude Code); every change reviewed, tested, and owned by the author.

@dnplkndll dnplkndll changed the title [IMP] spreadsheet_oca: writeback with audit log and rollback [18.0] [IMP] spreadsheet_oca: writeback with audit log and rollback Mar 13, 2026
@dnplkndll
dnplkndll force-pushed the 18.0-feat-writeback branch from 7f1bb51 to 5998300 Compare March 13, 2026 02:05
@dnplkndll
dnplkndll force-pushed the 18.0-feat-writeback branch from 5998300 to ebc2959 Compare May 13, 2026 20:39
@dnplkndll
dnplkndll force-pushed the 18.0-feat-writeback branch from ebc2959 to ee95ed4 Compare July 27, 2026 16:25
@dnplkndll
dnplkndll force-pushed the 18.0-feat-writeback branch from ee95ed4 to 25b7c20 Compare July 27, 2026 18:04
@dnplkndll
dnplkndll force-pushed the 18.0-feat-writeback branch from 25b7c20 to ce436e8 Compare July 27, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants