add spreadsheet_dashboard_pos_cooperative & pos_dashboard_cooperative
This commit is contained in:
parent
86101218e9
commit
5247938b86
34 changed files with 7974 additions and 0 deletions
82
spreadsheet_dashboard_pos_cooperative/data/dashboards.xml
Normal file
82
spreadsheet_dashboard_pos_cooperative/data/dashboards.xml
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 Criptomart - License AGPL-3 -->
|
||||
<odoo>
|
||||
|
||||
<!--
|
||||
New dashboard group "Cooperative" sitting alongside the standard
|
||||
Odoo groups (Sales, Finance, HR, ...). Sequence 150 places it
|
||||
right after Sales (100) and before Finance (300).
|
||||
-->
|
||||
<record id="spreadsheet_dashboard_group_cooperative"
|
||||
model="spreadsheet.dashboard.group">
|
||||
<field name="name">PDV Supermercado</field>
|
||||
<field name="sequence">150</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Section 1: high-level KPIs and monthly evolution for the whole
|
||||
store. The "headline" dashboard, intentionally compact so it
|
||||
loads first.
|
||||
-->
|
||||
<record id="spreadsheet_dashboard_pos_overview"
|
||||
model="spreadsheet.dashboard">
|
||||
<field name="name">Ventas</field>
|
||||
<field name="data" type="base64"
|
||||
file="spreadsheet_dashboard_pos_cooperative/data/files/overview_dashboard.json"/>
|
||||
<field name="dashboard_group_id"
|
||||
ref="spreadsheet_dashboard_group_cooperative"/>
|
||||
<field name="group_ids"
|
||||
eval="[Command.link(ref('point_of_sale.group_pos_manager'))]"/>
|
||||
<field name="sequence">100</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Section 4 of the BI brief: sales distribution across days of the
|
||||
week and hours of the day. Two line charts.
|
||||
-->
|
||||
<record id="spreadsheet_dashboard_pos_time"
|
||||
model="spreadsheet.dashboard">
|
||||
<field name="name">Ventas horas y días</field>
|
||||
<field name="data" type="base64"
|
||||
file="spreadsheet_dashboard_pos_cooperative/data/files/time_dashboard.json"/>
|
||||
<field name="dashboard_group_id"
|
||||
ref="spreadsheet_dashboard_group_cooperative"/>
|
||||
<field name="group_ids"
|
||||
eval="[Command.link(ref('point_of_sale.group_pos_manager'))]"/>
|
||||
<field name="sequence">400</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Section 3 of the BI brief: TOP families / subfamilies / products,
|
||||
plus members contribution KPIs (purchase share, penetration).
|
||||
-->
|
||||
<record id="spreadsheet_dashboard_pos_categories"
|
||||
model="spreadsheet.dashboard">
|
||||
<field name="name">Categorías</field>
|
||||
<field name="data" type="base64"
|
||||
file="spreadsheet_dashboard_pos_cooperative/data/files/categories_dashboard.json"/>
|
||||
<field name="dashboard_group_id"
|
||||
ref="spreadsheet_dashboard_group_cooperative"/>
|
||||
<field name="group_ids"
|
||||
eval="[Command.link(ref('point_of_sale.group_pos_manager'))]"/>
|
||||
<field name="sequence">300</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Section 2 of the BI brief: detailed comparison between members
|
||||
and non-members. KPIs per group, monthly evolution chart and a
|
||||
TOP 50 of the best buying members.
|
||||
-->
|
||||
<record id="spreadsheet_dashboard_pos_members"
|
||||
model="spreadsheet.dashboard">
|
||||
<field name="name">Socias</field>
|
||||
<field name="data" type="base64"
|
||||
file="spreadsheet_dashboard_pos_cooperative/data/files/members_dashboard.json"/>
|
||||
<field name="dashboard_group_id"
|
||||
ref="spreadsheet_dashboard_group_cooperative"/>
|
||||
<field name="group_ids"
|
||||
eval="[Command.link(ref('point_of_sale.group_pos_manager'))]"/>
|
||||
<field name="sequence">200</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,367 @@
|
|||
{
|
||||
"version": 12,
|
||||
"sheets": [
|
||||
{
|
||||
"id": "dashboard",
|
||||
"name": "Overview",
|
||||
"colNumber": 26,
|
||||
"rowNumber": 50,
|
||||
"rows": {
|
||||
"0": {
|
||||
"size": 40
|
||||
}
|
||||
},
|
||||
"cols": {},
|
||||
"merges": [],
|
||||
"cells": {
|
||||
"A1": {
|
||||
"style": 1,
|
||||
"content": "=_t(\"Cooperative POS — Overview\")"
|
||||
},
|
||||
"A3": {
|
||||
"style": 2,
|
||||
"content": "=_t(\"Monthly evolution\")"
|
||||
}
|
||||
},
|
||||
"conditionalFormats": [],
|
||||
"figures": [
|
||||
{
|
||||
"id": "kpi-sales",
|
||||
"x": 0,
|
||||
"y": 60,
|
||||
"width": 200,
|
||||
"height": 120,
|
||||
"tag": "chart",
|
||||
"data": {
|
||||
"type": "scorecard",
|
||||
"title": "Sales (€)",
|
||||
"keyValue": "Data!D1",
|
||||
"baseline": "Data!E1",
|
||||
"baselineDescr": "since last period",
|
||||
"baselineMode": "percentage",
|
||||
"baselineColorUp": "#00A04A",
|
||||
"baselineColorDown": "#DC6965"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi-orders",
|
||||
"x": 220,
|
||||
"y": 60,
|
||||
"width": 200,
|
||||
"height": 120,
|
||||
"tag": "chart",
|
||||
"data": {
|
||||
"type": "scorecard",
|
||||
"title": "Orders",
|
||||
"keyValue": "Data!D2",
|
||||
"baseline": "Data!E2",
|
||||
"baselineDescr": "since last period",
|
||||
"baselineMode": "percentage",
|
||||
"baselineColorUp": "#00A04A",
|
||||
"baselineColorDown": "#DC6965"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi-ticket",
|
||||
"x": 440,
|
||||
"y": 60,
|
||||
"width": 200,
|
||||
"height": 120,
|
||||
"tag": "chart",
|
||||
"data": {
|
||||
"type": "scorecard",
|
||||
"title": "Average ticket (€)",
|
||||
"keyValue": "Data!D3",
|
||||
"baseline": "Data!E3",
|
||||
"baselineDescr": "since last period",
|
||||
"baselineMode": "percentage",
|
||||
"baselineColorUp": "#00A04A",
|
||||
"baselineColorDown": "#DC6965"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi-margin",
|
||||
"x": 660,
|
||||
"y": 60,
|
||||
"width": 200,
|
||||
"height": 120,
|
||||
"tag": "chart",
|
||||
"data": {
|
||||
"type": "scorecard",
|
||||
"title": "Gross margin (€)",
|
||||
"keyValue": "Data!D4",
|
||||
"baseline": "Data!E4",
|
||||
"baselineDescr": "since last period",
|
||||
"baselineMode": "percentage",
|
||||
"baselineColorUp": "#00A04A",
|
||||
"baselineColorDown": "#DC6965"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "chart-monthly-sales",
|
||||
"x": 0,
|
||||
"y": 220,
|
||||
"width": 1000,
|
||||
"height": 300,
|
||||
"tag": "chart",
|
||||
"data": {
|
||||
"title": "Monthly sales (€)",
|
||||
"background": "#FFFFFF",
|
||||
"legendPosition": "none",
|
||||
"metaData": {
|
||||
"groupBy": [
|
||||
"date:month"
|
||||
],
|
||||
"measure": "price_total",
|
||||
"order": null,
|
||||
"resModel": "report.pos.order"
|
||||
},
|
||||
"searchParams": {
|
||||
"comparison": null,
|
||||
"context": {
|
||||
"group_by": [
|
||||
"date:month"
|
||||
],
|
||||
"group_by_no_leaf": 1
|
||||
},
|
||||
"domain": [
|
||||
[
|
||||
"state",
|
||||
"in",
|
||||
[
|
||||
"paid",
|
||||
"done",
|
||||
"invoiced"
|
||||
]
|
||||
]
|
||||
],
|
||||
"groupBy": [
|
||||
"date:month"
|
||||
],
|
||||
"orderBy": []
|
||||
},
|
||||
"type": "odoo_line",
|
||||
"verticalAxisPosition": "left"
|
||||
}
|
||||
}
|
||||
],
|
||||
"areGridLinesVisible": false,
|
||||
"isVisible": true
|
||||
},
|
||||
{
|
||||
"id": "data",
|
||||
"name": "Data",
|
||||
"colNumber": 5,
|
||||
"rowNumber": 10,
|
||||
"rows": {},
|
||||
"cols": {
|
||||
"0": {
|
||||
"size": 200
|
||||
},
|
||||
"1": {
|
||||
"size": 140
|
||||
},
|
||||
"2": {
|
||||
"size": 140
|
||||
},
|
||||
"3": {
|
||||
"size": 140
|
||||
},
|
||||
"4": {
|
||||
"size": 140
|
||||
}
|
||||
},
|
||||
"merges": [],
|
||||
"cells": {
|
||||
"A1": {
|
||||
"content": "=_t(\"KPI - Sales\")"
|
||||
},
|
||||
"A2": {
|
||||
"content": "=_t(\"KPI - Orders\")"
|
||||
},
|
||||
"A3": {
|
||||
"content": "=_t(\"KPI - Average ticket\")"
|
||||
},
|
||||
"A4": {
|
||||
"content": "=_t(\"KPI - Margin\")"
|
||||
},
|
||||
"B1": {
|
||||
"content": "=ODOO.PIVOT(1,\"price_total\")"
|
||||
},
|
||||
"B2": {
|
||||
"content": "=ODOO.PIVOT(1,\"order_id\")"
|
||||
},
|
||||
"B3": {
|
||||
"content": "=IFERROR(B1/B2,0)"
|
||||
},
|
||||
"B4": {
|
||||
"content": "=ODOO.PIVOT(1,\"margin\")"
|
||||
},
|
||||
"C1": {
|
||||
"content": "=ODOO.PIVOT(2,\"price_total\")"
|
||||
},
|
||||
"C2": {
|
||||
"content": "=ODOO.PIVOT(2,\"order_id\")"
|
||||
},
|
||||
"C3": {
|
||||
"content": "=IFERROR(C1/C2,0)"
|
||||
},
|
||||
"C4": {
|
||||
"content": "=ODOO.PIVOT(2,\"margin\")"
|
||||
},
|
||||
"D1": {
|
||||
"content": "=FORMAT.LARGE.NUMBER(B1)"
|
||||
},
|
||||
"D2": {
|
||||
"content": "=FORMAT.LARGE.NUMBER(B2)"
|
||||
},
|
||||
"D3": {
|
||||
"content": "=FORMAT.LARGE.NUMBER(B3)"
|
||||
},
|
||||
"D4": {
|
||||
"content": "=FORMAT.LARGE.NUMBER(B4)"
|
||||
},
|
||||
"E1": {
|
||||
"content": "=FORMAT.LARGE.NUMBER(C1)"
|
||||
},
|
||||
"E2": {
|
||||
"content": "=FORMAT.LARGE.NUMBER(C2)"
|
||||
},
|
||||
"E3": {
|
||||
"content": "=FORMAT.LARGE.NUMBER(C3)"
|
||||
},
|
||||
"E4": {
|
||||
"content": "=FORMAT.LARGE.NUMBER(C4)"
|
||||
}
|
||||
},
|
||||
"conditionalFormats": [],
|
||||
"figures": [],
|
||||
"areGridLinesVisible": true,
|
||||
"isVisible": false
|
||||
}
|
||||
],
|
||||
"entities": {},
|
||||
"styles": {
|
||||
"1": {
|
||||
"bold": true,
|
||||
"fontSize": 22,
|
||||
"textColor": "#2E7D32"
|
||||
},
|
||||
"2": {
|
||||
"bold": true,
|
||||
"fontSize": 14,
|
||||
"textColor": "#333333"
|
||||
}
|
||||
},
|
||||
"formats": {
|
||||
"1": "#,##0.00 [$€]",
|
||||
"2": "#,##0"
|
||||
},
|
||||
"borders": {},
|
||||
"revisionId": "START_REVISION",
|
||||
"chartOdooMenusReferences": {},
|
||||
"odooVersion": 1,
|
||||
"lists": {},
|
||||
"listNextId": 1,
|
||||
"pivots": {
|
||||
"1": {
|
||||
"colGroupBys": [],
|
||||
"context": {
|
||||
"group_by_no_leaf": 1,
|
||||
"group_by": []
|
||||
},
|
||||
"domain": [
|
||||
[
|
||||
"state",
|
||||
"in",
|
||||
[
|
||||
"paid",
|
||||
"done",
|
||||
"invoiced"
|
||||
]
|
||||
]
|
||||
],
|
||||
"id": "1",
|
||||
"measures": [
|
||||
{
|
||||
"field": "price_total"
|
||||
},
|
||||
{
|
||||
"field": "margin"
|
||||
},
|
||||
{
|
||||
"field": "order_id"
|
||||
}
|
||||
],
|
||||
"model": "report.pos.order",
|
||||
"rowGroupBys": [],
|
||||
"name": "POS KPIs - current",
|
||||
"sortedColumn": null
|
||||
},
|
||||
"2": {
|
||||
"colGroupBys": [],
|
||||
"context": {
|
||||
"group_by_no_leaf": 1,
|
||||
"group_by": []
|
||||
},
|
||||
"domain": [
|
||||
[
|
||||
"state",
|
||||
"in",
|
||||
[
|
||||
"paid",
|
||||
"done",
|
||||
"invoiced"
|
||||
]
|
||||
]
|
||||
],
|
||||
"id": "2",
|
||||
"measures": [
|
||||
{
|
||||
"field": "price_total"
|
||||
},
|
||||
{
|
||||
"field": "margin"
|
||||
},
|
||||
{
|
||||
"field": "order_id"
|
||||
}
|
||||
],
|
||||
"model": "report.pos.order",
|
||||
"rowGroupBys": [],
|
||||
"name": "POS KPIs - previous",
|
||||
"sortedColumn": null
|
||||
}
|
||||
},
|
||||
"pivotNextId": 3,
|
||||
"globalFilters": [
|
||||
{
|
||||
"id": "11111111-1111-1111-1111-111111111111",
|
||||
"type": "date",
|
||||
"label": "Period",
|
||||
"defaultValue": {},
|
||||
"rangeType": "month",
|
||||
"defaultsToCurrentPeriod": true,
|
||||
"pivotFields": {
|
||||
"1": {
|
||||
"field": "date",
|
||||
"type": "datetime",
|
||||
"offset": 0
|
||||
},
|
||||
"2": {
|
||||
"field": "date",
|
||||
"type": "datetime",
|
||||
"offset": -1
|
||||
}
|
||||
},
|
||||
"listFields": {},
|
||||
"graphFields": {
|
||||
"chart-monthly-sales": {
|
||||
"field": "date",
|
||||
"type": "datetime",
|
||||
"offset": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,221 @@
|
|||
{
|
||||
"version": 12,
|
||||
"sheets": [
|
||||
{
|
||||
"id": "dashboard",
|
||||
"name": "Sales by time",
|
||||
"colNumber": 26,
|
||||
"rowNumber": 50,
|
||||
"rows": {
|
||||
"0": {
|
||||
"size": 40
|
||||
}
|
||||
},
|
||||
"cols": {},
|
||||
"merges": [],
|
||||
"cells": {
|
||||
"A1": {
|
||||
"style": 1,
|
||||
"content": "=_t(\"Cooperative POS — Sales by hours and days\")"
|
||||
},
|
||||
"A3": {
|
||||
"style": 2,
|
||||
"content": "=_t(\"Sales by day of the week\")"
|
||||
},
|
||||
"A20": {
|
||||
"style": 2,
|
||||
"content": "=_t(\"Sales by hour of the day\")"
|
||||
}
|
||||
},
|
||||
"conditionalFormats": [],
|
||||
"figures": [
|
||||
{
|
||||
"id": "chart-by-day",
|
||||
"x": 0,
|
||||
"y": 60,
|
||||
"width": 1000,
|
||||
"height": 280,
|
||||
"tag": "chart",
|
||||
"data": {
|
||||
"title": "Sales by day of week",
|
||||
"background": "#FFFFFF",
|
||||
"legendPosition": "none",
|
||||
"metaData": {
|
||||
"groupBy": [
|
||||
"day_of_week"
|
||||
],
|
||||
"measure": "price_total",
|
||||
"order": null,
|
||||
"resModel": "report.pos.order"
|
||||
},
|
||||
"searchParams": {
|
||||
"comparison": null,
|
||||
"context": {
|
||||
"group_by": [
|
||||
"day_of_week"
|
||||
],
|
||||
"group_by_no_leaf": 1
|
||||
},
|
||||
"domain": [
|
||||
[
|
||||
"state",
|
||||
"in",
|
||||
[
|
||||
"paid",
|
||||
"done",
|
||||
"invoiced"
|
||||
]
|
||||
]
|
||||
],
|
||||
"groupBy": [
|
||||
"day_of_week"
|
||||
],
|
||||
"orderBy": []
|
||||
},
|
||||
"type": "odoo_line",
|
||||
"verticalAxisPosition": "left"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "chart-by-hour",
|
||||
"x": 0,
|
||||
"y": 380,
|
||||
"width": 1000,
|
||||
"height": 280,
|
||||
"tag": "chart",
|
||||
"data": {
|
||||
"title": "Sales by hour of day",
|
||||
"background": "#FFFFFF",
|
||||
"legendPosition": "none",
|
||||
"metaData": {
|
||||
"groupBy": [
|
||||
"hour_of_day"
|
||||
],
|
||||
"measure": "price_total",
|
||||
"order": null,
|
||||
"resModel": "report.pos.order"
|
||||
},
|
||||
"searchParams": {
|
||||
"comparison": null,
|
||||
"context": {
|
||||
"group_by": [
|
||||
"hour_of_day"
|
||||
],
|
||||
"group_by_no_leaf": 1
|
||||
},
|
||||
"domain": [
|
||||
[
|
||||
"state",
|
||||
"in",
|
||||
[
|
||||
"paid",
|
||||
"done",
|
||||
"invoiced"
|
||||
]
|
||||
]
|
||||
],
|
||||
"groupBy": [
|
||||
"hour_of_day"
|
||||
],
|
||||
"orderBy": []
|
||||
},
|
||||
"type": "odoo_line",
|
||||
"verticalAxisPosition": "left"
|
||||
}
|
||||
}
|
||||
],
|
||||
"areGridLinesVisible": false,
|
||||
"isVisible": true
|
||||
}
|
||||
],
|
||||
"entities": {},
|
||||
"styles": {
|
||||
"1": {
|
||||
"bold": true,
|
||||
"fontSize": 22,
|
||||
"textColor": "#2E7D32"
|
||||
},
|
||||
"2": {
|
||||
"bold": true,
|
||||
"fontSize": 14,
|
||||
"textColor": "#333333"
|
||||
}
|
||||
},
|
||||
"formats": {},
|
||||
"borders": {},
|
||||
"revisionId": "START_REVISION",
|
||||
"chartOdooMenusReferences": {},
|
||||
"odooVersion": 1,
|
||||
"lists": {},
|
||||
"listNextId": 1,
|
||||
"pivots": {},
|
||||
"pivotNextId": 1,
|
||||
"globalFilters": [
|
||||
{
|
||||
"id": "11111111-1111-1111-1111-111111111111",
|
||||
"type": "date",
|
||||
"label": "Period",
|
||||
"defaultValue": {},
|
||||
"rangeType": "month",
|
||||
"defaultsToCurrentPeriod": true,
|
||||
"pivotFields": {},
|
||||
"listFields": {},
|
||||
"graphFields": {
|
||||
"chart-by-day": {
|
||||
"field": "date",
|
||||
"type": "datetime",
|
||||
"offset": 0
|
||||
},
|
||||
"chart-by-hour": {
|
||||
"field": "date",
|
||||
"type": "datetime",
|
||||
"offset": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "22222222-2222-2222-2222-222222222222",
|
||||
"type": "relation",
|
||||
"label": "Product Category",
|
||||
"modelName": "product.category",
|
||||
"defaultValue": [],
|
||||
"defaultValueDisplayNames": [],
|
||||
"rangeType": "year",
|
||||
"defaultsToCurrentPeriod": false,
|
||||
"pivotFields": {},
|
||||
"listFields": {},
|
||||
"graphFields": {
|
||||
"chart-by-day": {
|
||||
"field": "product_categ_id",
|
||||
"type": "many2one"
|
||||
},
|
||||
"chart-by-hour": {
|
||||
"field": "product_categ_id",
|
||||
"type": "many2one"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "33333333-3333-3333-3333-333333333333",
|
||||
"type": "relation",
|
||||
"label": "Product",
|
||||
"modelName": "product.product",
|
||||
"defaultValue": [],
|
||||
"defaultValueDisplayNames": [],
|
||||
"rangeType": "year",
|
||||
"defaultsToCurrentPeriod": false,
|
||||
"pivotFields": {},
|
||||
"listFields": {},
|
||||
"graphFields": {
|
||||
"chart-by-day": {
|
||||
"field": "product_id",
|
||||
"type": "many2one"
|
||||
},
|
||||
"chart-by-hour": {
|
||||
"field": "product_id",
|
||||
"type": "many2one"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue