diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-09 13:59:43 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-09 13:59:43 +0700 |
| commit | 48159b92cfa466ff7df454aa3c860b79c7e18467 (patch) | |
| tree | 8f50df9b54dadac53d40d2f487de1b89c24ca561 /indoteknik_custom/models/sale_order.py | |
| parent | b6ae7b2c9f1c564f3bf2a471f4871fda745d215d (diff) | |
| parent | 06b661f2fa9e07e4b3d1d2b5c7aa9f16f057a3a3 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 5eb90d83..e71e3830 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -2160,9 +2160,9 @@ class SaleOrder(models.Model): # return self._create_notification_action('Notification', # 'Terdapat invoice yang telah melewati batas waktu, mohon perbarui pada dokumen Due Extension') - if not order._is_request_to_own_team_leader(): + if not order.with_context(ask_approval=True)._is_request_to_own_team_leader(): return self._create_notification_action( - 'Peringatan', + 'Peringatan', 'Hanya bisa konfirmasi SO tim Anda.' ) if order._requires_approval_margin_leader(): @@ -2528,7 +2528,10 @@ class SaleOrder(models.Model): if user.is_leader or user.is_sales_manager: return True - if not self.team_id or not self.team_id.user_id: + if user.id in (3401, 20, 3988): # admin (fida, nabila, ninda) + return True + + if self.env.context.get("ask_approval") and user.id in (3401, 20, 3988): return True salesperson_id = self.user_id.id |
