diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-08-04 08:39:32 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-08-04 08:39:32 +0700 |
| commit | c4e1c36e28e4e9585f58e28326d1b0889eb1fa1f (patch) | |
| tree | e4c1c0671437c6ea109ef15d2e15b225db0f619c /indoteknik_custom/models | |
| parent | b52e037b7331a783056d9776f17253d83b1a52ad (diff) | |
| parent | c8ef030b4c1cb6b8daa14c081f569c71fbbda639 (diff) | |
<hafid> merging odoo-backup
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/refund_sale_order.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py index 80d66d8d..65e93ba4 100644 --- a/indoteknik_custom/models/refund_sale_order.py +++ b/indoteknik_custom/models/refund_sale_order.py @@ -649,6 +649,13 @@ class RefundSaleOrder(models.Model): def action_open_journal_refund(self): self.ensure_one() + + is_fat = self.env.user.has_group('indoteknik_custom.group_role_fat') + allowed_user_ids = [19, 688, 7] + + if not is_fat and self.env.user.id not in allowed_user_ids: + raise UserError(_('Anda tidak memiliki akses untuk membuka Journal Refund.')) + if self.journal_refund_move_id: return { 'name': _('Journal Refund'), |
