Skip to content

[18.0][IMP] spreadsheet_oca: server-side pivot engine + scheduled data refresh#99

Open
dnplkndll wants to merge 2 commits intoOCA:18.0from
ledoent:18.0-features-atomic
Open

[18.0][IMP] spreadsheet_oca: server-side pivot engine + scheduled data refresh#99
dnplkndll wants to merge 2 commits intoOCA:18.0from
ledoent:18.0-features-atomic

Conversation

@dnplkndll
Copy link

Summary

  • Commit 1 — Shared infrastructure: cell_ref.py (cell-reference parsing), pivot_data.py (server-side pivot read_group engine replicating the JS PivotModel strategy), _compute_related_count() DRY helper, get_pivot_data() JSON-RPC entry point, demo partners + pivot dashboard.

  • Commit 2spreadsheet.refresh.schedule model with cron lifecycle, Chatter HTML summaries, QWeb email templates, domain-template substitution, smart button, record rules, and full test coverage.

Split from #98 as requested — each feature will be its own PR with an independently cherry-pickable commit on top of the shared infra base (commit 1).

Upcoming PRs (each rebasing on commit 1)

  • KPI threshold alerts
  • Headless XLSX export
  • What-if scenarios
  • Email digest subscriptions
  • Named input parameters
  • Two-way cell writeback

Test plan

  • test_pivot_data.py — unit tests for pivot engine helpers and read_group strategy
  • test_refresh_schedule.py — schedule creation, cron lifecycle, refresh execution, HTML rendering, smart button count, graceful handling of unknown models

🤖 Generated with Claude Code

@dnplkndll dnplkndll changed the title [IMP] spreadsheet_oca: server-side pivot engine + scheduled data refresh [18.0] [IMP] spreadsheet_oca: server-side pivot engine + scheduled data refresh Mar 13, 2026
@dnplkndll dnplkndll changed the title [18.0] [IMP] spreadsheet_oca: server-side pivot engine + scheduled data refresh [18.0][IMP] spreadsheet_oca: server-side pivot engine + scheduled data refresh Mar 13, 2026
dnplkndll and others added 2 commits March 12, 2026 19:56
… helpers

Add shared infrastructure for upcoming server-side features:

- cell_ref.py: parse cell references (A1 notation), read/write cell
  values in spreadsheet_raw JSON.  Used by alerts, scenarios, input
  parameters, and XLSX export.

- pivot_data.py: replicates the JS PivotModel's read_group strategy
  in Python — computes pivot table data server-side without executing
  JavaScript.  Exposes get_pivot_data() as a JSON-RPC entry point,
  collect_pivot_summaries() for batch iteration, and
  render_pivot_table_html() for email/Chatter rendering.

- _compute_related_count(): DRY helper on spreadsheet.spreadsheet for
  child-model count fields (used by all upcoming features).

- Demo partners with geographic diversity for pivot tests.
- Demo pivot dashboard spreadsheet with =PIVOT() formulas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…summaries

New model spreadsheet.refresh.schedule allows users to configure
cron-based schedules that periodically:
  - Read ODOO-type pivot definitions from a spreadsheet's JSON.
  - Fetch fresh aggregate data via the server-side pivot engine.
  - Post an HTML summary on the spreadsheet's Chatter thread.
  - Optionally email subscribed partners.

Includes:
  - Cron lifecycle management (activate / deactivate / run now).
  - Domain-template substitution via _apply_param_substitution()
    (extensible by the input_params feature).
  - QWeb email templates for refresh notification and warnings,
    customisable via Settings > Technical > Views.
  - Smart button on the spreadsheet form.
  - Record rules following parent spreadsheet access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dnplkndll dnplkndll force-pushed the 18.0-features-atomic branch from 93690d7 to f2a7d1e Compare March 13, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant