Skip to content

Commit

Permalink
[FIX] Restrict approval rights to RMA Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiCForgeFlow committed Apr 4, 2023
1 parent c3f76bd commit 95d14e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rma/models/rma_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,11 @@ def action_rma_draft(self):
return True

def action_rma_approve(self):
self.write({"state": "approved"})
if self.env.user.has_group('rma.group_rma_manager'):
self.write({"state": "approved"})
else:
raise UserError(_('You have no access rights to approve this RMA'))

return True

def action_rma_done(self):
Expand Down

0 comments on commit 95d14e1

Please sign in to comment.