diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-06-16 16:43:24 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-06-16 16:43:24 +0700 |
| commit | aab8e1f3e1c6b05e7dc57060efd1f9fe586d092d (patch) | |
| tree | 140cd036070df7ede0f8cb5ba674e38b73df22bd /indoteknik_custom/models/users.py | |
| parent | e2ccd5719de9cf03a422e93fbef9a7f035b854a5 (diff) | |
Add notify_internal_users function on users
Diffstat (limited to 'indoteknik_custom/models/users.py')
| -rw-r--r-- | indoteknik_custom/models/users.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
