Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions spreadsheet_oca/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===============
Spreadsheet Oca
===============
Expand All @@ -17,7 +13,7 @@ Spreadsheet Oca
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fspreadsheet-lightgray.png?logo=github
Expand Down
5 changes: 4 additions & 1 deletion spreadsheet_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Spreadsheet Oca",
"summary": """
Allow to edit spreadsheets""",
"version": "18.0.1.2.3",
"version": "18.0.2.0.0",
"license": "AGPL-3",
"author": "CreuBlanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/spreadsheet",
Expand All @@ -14,7 +14,10 @@
"security/security.xml",
"security/ir.model.access.csv",
"views/spreadsheet_spreadsheet.xml",
"views/spreadsheet_alert_views.xml",
"data/mail_templates.xml",
"data/spreadsheet_spreadsheet_import_mode.xml",
"data/spreadsheet_alert_cron.xml",
"wizards/spreadsheet_select_row_number.xml",
"wizards/spreadsheet_spreadsheet_import.xml",
],
Expand Down
105 changes: 105 additions & 0 deletions spreadsheet_oca/data/mail_templates.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2025 Ledo Enterprises LLC
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<!-- ══ Alert notification (posted to Chatter) ═══════════════════════
Rendered by spreadsheet.alert._fire_notification().
Variables: alert, value_str, op_label, threshold_str, base_url

Customise via Settings > Technical > Views, search for
"spreadsheet.alert.notification". -->
<record model="ir.ui.view" id="spreadsheet_alert_notification_template">
<field name="name">spreadsheet.alert.notification</field>
<field name="type">qweb</field>
<field name="arch" type="xml">
<t t-name="spreadsheet_oca.spreadsheet_alert_notification_template">
<div
style="font-family:Arial,Helvetica,sans-serif;font-size:14px;color:#333;max-width:600px"
>
<!-- Header bar -->
<div
style="background:#c0392b;color:#fff;padding:10px 16px;border-radius:4px 4px 0 0;font-size:13px"
>
&#9888; KPI Alert Triggered
</div>
<!-- Body -->
<div
style="border:1px solid #e0e0e0;border-top:none;padding:16px;border-radius:0 0 4px 4px"
>
<p
style="margin:0 0 10px 0;font-size:15px;font-weight:bold;color:#222"
>
<t t-out="alert.name" />
</p>
<table
style="font-size:13px;color:#555;line-height:1.6;border-collapse:collapse"
cellpadding="0"
cellspacing="0"
>
<tr>
<td
style="padding:2px 12px 2px 0;color:#888;white-space:nowrap"
>Cell</td>
<td style="padding:2px 0">
<b>
<t t-out="alert.cell_ref" />
</b>
<t t-if="alert.sheet_name">
on sheet <i>
<t t-out="alert.sheet_name" />
</i>
</t>
</td>
</tr>
<tr>
<td
style="padding:2px 12px 2px 0;color:#888;white-space:nowrap"
>Value</td>
<td style="padding:2px 0">
<b>
<t t-out="value_str" />
</b>
</td>
</tr>
<tr>
<td
style="padding:2px 12px 2px 0;color:#888;white-space:nowrap"
>Condition</td>
<td style="padding:2px 0">
<t t-out="op_label" />
&#160;
<t t-out="threshold_str" />
</td>
</tr>
</table>
<!-- Action links -->
<div
style="margin-top:14px;padding-top:12px;border-top:1px solid #eee;font-size:12px"
>
<t
t-set="spreadsheet_url"
t-value="'%s/web#id=%d&amp;model=spreadsheet.spreadsheet&amp;view_type=form' % (base_url, alert.spreadsheet_id.id)"
/>
<t
t-set="alert_url"
t-value="'%s/web#id=%d&amp;model=spreadsheet.alert&amp;view_type=form' % (base_url, alert.id)"
/>
<a
t-att-href="spreadsheet_url"
style="color:#2980b9;text-decoration:none;margin-right:16px"
>
&#128196; Open Spreadsheet
</a>
<a
t-att-href="alert_url"
style="color:#2980b9;text-decoration:none"
>
&#9881; Alert Settings
</a>
</div>
</div>
</div>
</t>
</field>
</record>
</odoo>
14 changes: 14 additions & 0 deletions spreadsheet_oca/data/spreadsheet_alert_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2025 Ledo Enterprises LLC
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record model="ir.cron" id="spreadsheet_alert_cron">
<field name="name">Spreadsheet KPI Alert Evaluation</field>
<field name="model_id" ref="model_spreadsheet_alert" />
<field name="state">code</field>
<field name="code">model._cron_evaluate_all()</field>
<field name="interval_number">1</field>
<field name="interval_type">hours</field>
<field name="active">True</field>
</record>
</odoo>
85 changes: 85 additions & 0 deletions spreadsheet_oca/demo/demo_kpi_dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"version": 21,
"sheets": [
{
"id": "dashboard",
"name": "Dashboard",
"colNumber": 26,
"rowNumber": 100,
"rows": {},
"cols": {},
"merges": [],
"cells": {
"A1": {"content": "KPI", "style": 1, "border": 1},
"B1": {"content": "Target", "style": 1, "border": 1},
"C1": {"content": "Actual", "style": 1, "border": 1},
"D1": {"content": "Variance", "style": 1, "border": 1},
"E1": {"content": "Status", "style": 1, "border": 1},
"A2": {"content": "Cost Per Lead"},
"B2": {"content": "50", "format": 1},
"C2": {"content": "42", "format": 1},
"D2": {"content": "=C2-B2", "format": 1},
"E2": {"content": "=IF(C2<=B2,\"On Track\",\"Over\")"},
"A3": {"content": "Revenue Growth"},
"B3": {"content": "0.15", "format": 2},
"C3": {"content": "0.12", "format": 2},
"D3": {"content": "=C3-B3", "format": 2},
"E3": {"content": "=IF(C3>=B3,\"On Track\",\"Below\")"},
"A4": {"content": "Customer Churn"},
"B4": {"content": "0.05", "format": 2},
"C4": {"content": "0.032", "format": 2},
"D4": {"content": "=C4-B4", "format": 2},
"E4": {"content": "=IF(C4<=B4,\"On Track\",\"High\")"},
"A5": {"content": "Avg Deal Size"},
"B5": {"content": "25000", "format": 1},
"C5": {"content": "28500", "format": 1},
"D5": {"content": "=C5-B5", "format": 1},
"E5": {"content": "=IF(C5>=B5,\"On Track\",\"Low\")"},
"A6": {"content": "NPS Score"},
"B6": {"content": "70"},
"C6": {"content": "78"},
"D6": {"content": "=C6-B6"},
"E6": {"content": "=IF(C6>=B6,\"On Track\",\"Low\")"},
"A8": {"content": "Last Updated"},
"B8": {"content": "2026-03-01"},
"A9": {"content": "Updated By"},
"B9": {"content": "Admin"}
},
"conditionalFormats": [],
"figures": [],
"filterTables": [],
"tables": [],
"dataValidationRules": [],
"comments": {},
"headerGroups": {"ROW": [], "COL": []},
"areGridLinesVisible": true,
"isVisible": true
}
],
"settings": {},
"customTableStyles": {},
"styles": {
"1": {"bold": true, "align": "center"}
},
"formats": {
"1": "$#,##0",
"2": "0.00%"
},
"borders": {
"1": {
"top": ["thin", "#000"],
"bottom": ["thin", "#000"],
"left": ["thin", "#000"],
"right": ["thin", "#000"]
}
},
"revisionId": "START_REVISION",
"uniqueFigureIds": true,
"odooVersion": 12,
"globalFilters": [],
"pivots": {},
"pivotNextId": 1,
"lists": {},
"listNextId": 1,
"chartOdooMenusReferences": {}
}
98 changes: 98 additions & 0 deletions spreadsheet_oca/demo/demo_pivot_dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"version": 21,
"sheets": [
{
"id": "sheet_partners",
"name": "Partners by Country",
"colNumber": 26,
"rowNumber": 100,
"rows": {},
"cols": {
"0": {"size": 220},
"1": {"size": 140},
"2": {"size": 140},
"3": {"size": 140}
},
"merges": [],
"cells": {
"A1": {"content": "=PIVOT(1)"}
},
"conditionalFormats": [],
"figures": [],
"filterTables": [],
"tables": [],
"dataValidationRules": [],
"comments": {},
"headerGroups": {"ROW": [], "COL": []},
"areGridLinesVisible": true,
"isVisible": true
},
{
"id": "sheet_regions",
"name": "Regions per Country",
"colNumber": 26,
"rowNumber": 100,
"rows": {},
"cols": {
"0": {"size": 220},
"1": {"size": 140}
},
"merges": [],
"cells": {
"A1": {"content": "=PIVOT(2)"}
},
"conditionalFormats": [],
"figures": [],
"filterTables": [],
"tables": [],
"dataValidationRules": [],
"comments": {},
"headerGroups": {"ROW": [], "COL": []},
"areGridLinesVisible": true,
"isVisible": true
}
],
"settings": {},
"customTableStyles": {},
"styles": {},
"formats": {},
"borders": {},
"revisionId": "START_REVISION",
"uniqueFigureIds": true,
"odooVersion": 12,
"globalFilters": [],
"pivots": {
"1": {
"type": "ODOO",
"id": "1",
"formulaId": "1",
"name": "Partners by Country & Type",
"model": "res.partner",
"domain": [["active", "=", true]],
"context": {},
"measures": [{"id": "__count", "fieldName": "__count"}],
"rows": [{"fieldName": "country_id", "order": "desc"}],
"columns": [{"fieldName": "is_company"}],
"sortedColumn": null,
"fieldMatching": {}
},
"2": {
"type": "ODOO",
"id": "2",
"formulaId": "2",
"name": "Regions per Country",
"model": "res.country.state",
"domain": [],
"context": {},
"measures": [{"id": "__count", "fieldName": "__count"}],
"rows": [{"fieldName": "country_id", "order": "desc"}],
"columns": [],
"sortedColumn": null,
"fieldMatching": {}
}
},
"pivotNextId": 3,
"lists": {},
"listNextId": 1,
"chartOdooMenusReferences": {}
}
Loading
Loading