Our reporting dashboards are too tedious to use for the average user, and doesn't allow for edition or advanced computations. Using spreadsheet formulas allows almost endless possibilities. Task-id 2799682 Part-of: odoo/odoo#97606 Co-authored-by: Lucas Lefèvre <lul@odoo.com> Co-authored-by: Pierre Rousseau <pro@odoo.com>
20 lines
658 B
Python
20 lines
658 B
Python
from odoo.tests.common import TransactionCase
|
|
|
|
|
|
class TestSpreadsheetDashboard(TransactionCase):
|
|
def test_create_with_default_values(self):
|
|
group = self.env["spreadsheet.dashboard.group"].create(
|
|
{"name": "a group"}
|
|
)
|
|
dashboard = self.env["spreadsheet.dashboard"].create(
|
|
{
|
|
"name": "a dashboard",
|
|
"dashboard_group_id": group.id,
|
|
}
|
|
)
|
|
self.assertEqual(dashboard.group_ids, self.env.ref("base.group_user"))
|
|
self.assertEqual(
|
|
dashboard.raw,
|
|
b'{"version": 1, "sheets": [{"id": "sheet1", "name": "Sheet1"}]}',
|
|
)
|