From 648953d22a6dc59171e944a2aac4adea4f5dc05d Mon Sep 17 00:00:00 2001 From: eslamabady Date: Mon, 7 Oct 2024 14:21:20 +0300 Subject: [PATCH] fix --- .../odoo_dynamic_workflow_mobile/controllers/controllers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_mobile/odoo_dynamic_workflow_mobile/controllers/controllers.py b/odex25_mobile/odoo_dynamic_workflow_mobile/controllers/controllers.py index 4a560ced8..5de99ac88 100644 --- a/odex25_mobile/odoo_dynamic_workflow_mobile/controllers/controllers.py +++ b/odex25_mobile/odoo_dynamic_workflow_mobile/controllers/controllers.py @@ -248,7 +248,7 @@ class RestApi(Controller): res = obj.read(["id", "state"])[0] state = res["state"] btn_new = request.env[BTN].sudo().search([("workflow_id", "=", int(btn.workflow_id.id)), (("node_id.node_name", "=", state)), ], [],) - if btn_new.send_manager: + if any(btn.send_manager for btn in btn_new): emp_manager = self.get_emp_manager(obj) obj.firebase_notification(emp_manager.user_id) return http_helper.response(message="Successful", data=res)