diff --git a/fieldservice_portal/README.rst b/fieldservice_portal/README.rst index c91e2a3992..62b7b3f5f5 100644 --- a/fieldservice_portal/README.rst +++ b/fieldservice_portal/README.rst @@ -1,6 +1,6 @@ -============================ -Field Service - Order Portal -============================ +====================== +Field Service - Portal +====================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/fieldservice_portal/__manifest__.py b/fieldservice_portal/__manifest__.py index 6a983e3a9c..b159c19e6a 100644 --- a/fieldservice_portal/__manifest__.py +++ b/fieldservice_portal/__manifest__.py @@ -1,5 +1,5 @@ { - "name": "Field Service - Order Portal", + "name": "Field Service - Portal", "version": "16.0.1.0.0", "summary": """ Bridge module between fieldservice and portal. @@ -23,6 +23,11 @@ "demo/fsm_location_demo.xml", "demo/fsm_order_demo.xml", ], + "assets": { + "web.assets_frontend": [ + "fieldservice_portal/static/src/js/fsm_order_portal.js", + ], + }, "installable": True, "application": False, } diff --git a/fieldservice_portal/controllers/fsm_order_portal.py b/fieldservice_portal/controllers/fsm_order_portal.py index 37ace8ab8d..faa6df0709 100644 --- a/fieldservice_portal/controllers/fsm_order_portal.py +++ b/fieldservice_portal/controllers/fsm_order_portal.py @@ -11,16 +11,17 @@ class CustomerPortal(CustomerPortal): - def _prepare_portal_layout_values(self): - values = super()._prepare_portal_layout_values() - fsm_order_count = ( - request.env["fsm.order"].search_count([]) - if request.env["fsm.order"].check_access_rights( - "read", raise_exception=False + def _prepare_home_portal_values(self, counters): + values = super()._prepare_home_portal_values(counters) + if "fsm_order_count" in counters: + fsm_order_count = ( + request.env["fsm.order"].search_count([]) + if request.env["fsm.order"].check_access_rights( + "read", raise_exception=False + ) + else 0 ) - else 0 - ) - values["fsm_order_count"] = fsm_order_count + values["fsm_order_count"] = fsm_order_count return values def _fsm_order_check_access(self, order_id): diff --git a/fieldservice_portal/static/description/index.html b/fieldservice_portal/static/description/index.html index 50f093cf77..509e880adb 100644 --- a/fieldservice_portal/static/description/index.html +++ b/fieldservice_portal/static/description/index.html @@ -3,7 +3,7 @@ -Field Service - Order Portal +Field Service - Portal -
-

Field Service - Order Portal

+
+

Field Service - Portal