From aab8e1f3e1c6b05e7dc57060efd1f9fe586d092d Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 16 Jun 2023 16:43:24 +0700 Subject: Add notify_internal_users function on users --- indoteknik_custom/models/users.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indoteknik_custom/models/users.py b/indoteknik_custom/models/users.py index 4904a33d..a2074c46 100644 --- a/indoteknik_custom/models/users.py +++ b/indoteknik_custom/models/users.py @@ -9,3 +9,7 @@ class Users(models.Model): is_sales_manager = fields.Boolean(String='Sales Manager', help='Berhak melakukan Approval SO dengan margin 15-25') is_leader = fields.Boolean(String='Leader', help='Berhak Approval SO Margin < 15 dan Approval PO') is_accounting = fields.Boolean(String='Accounting', help='Berhak Approval Internal Use') + + def notify_internal_users(self, message, title): + users = self.search([('share', '=', False)]) + users.notify_info(message=message, title=title) \ No newline at end of file -- cgit v1.2.3