Viindoo Brain - Account Reports Bridge (WI-11)
Bridge module connecting viin_brain to to_account_reports. Extends
viin.brain.snapshot with a new account_report kind that captures and
renders a financial report (Balance Sheet / Profit & Loss / Cash Flow /
Executive Summary / Trial Balance / etc.) as HTML inside a brain page.
Design
- New snapshot kind: account_report
- New fields on viin.brain.snapshot:
- target_report_id (Many2one account.report) - which report to render
- target_report_options (Json) - filter_options returned by
account.report.init_filter_options (date range, comparison, etc.)
- Capture / refresh flow: call
account.report.generate_report_data(report_id, filter_options) and
render the returned columns + lines into a simple HTML table. The caller's
ACL applies to the underlying fetch (same invariant as record/recordset
embeds - see snapshot.md §3).
- Slash command /embed-report - opens a picker modal that lists available
reports and initialises default filter options, then calls the existing
/viin_brain/embed/capture JSON route.
Regulation neutrality
The bridge is deliberately regulation-neutral: it embeds the output of
to_account_reports as-is. IFRS / TT99 / TT133 / tax-report line layouts
are defined by the underlying account.report records themselves; this
module does NOT add accounting logic.
Dependencies
- viin_brain - snapshot model + embed controller
- to_account_reports - account.report + _get_lines / generate_report_data
This software and associated files (the "Software") may only be
used
(executed, modified, executed after modifications) if you have
purchased a
valid license from the authors, typically via Odoo Apps,
or if you
have
received a written agreement from the authors of the
Software (see the
COPYRIGHT file).
You may develop Odoo modules that use the Software as a library
(typically
by depending on it, importing it and using its
resources), but
without
copying any source code or material from the
Software. You may distribute
those modules under the license of your
choice, provided that this
license
is compatible with the terms of
the Odoo Proprietary License (For
example:
LGPL, MIT, or proprietary
licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell
copies of the
Software or modified copies of the Software.
The above copyright notice and this permission notice must be
included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT
SHALL THE
AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING
FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE
SOFTWARE.