[18.0] [IMP] spreadsheet_oca: named input parameters with domain substitution#105
Open
[18.0] [IMP] spreadsheet_oca: named input parameters with domain substitution#105
Conversation
… 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>
…ution Adds spreadsheet.input_param model for mapping named parameters to specific spreadsheet cells. Values are synced from the spreadsheet JSON and injected into refresh schedule domain templates via %(name)s substitution, enabling parameterized pivot queries. Overrides _get_param_dict() on refresh.schedule to wire up the sync-and-substitute pipeline. Includes JSON-RPC controller for client-side access, security rules, demo data, and tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b243888 to
9cf5c3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spreadsheet.input_parammodel for mapping named parameters to spreadsheet cells%(name)ssubstitution_get_param_dict()onrefresh.scheduleto wire up sync-and-substitute pipelineDepends on
Test plan
test_input_param.pypasses (param CRUD, cell sync, name validation, domain substitution)🤖 Generated with Claude Code