[FIX] python call action rights

This commit is contained in:
Chill
2024-03-12 17:12:12 +08:00
parent f50ca7b3de
commit 355958e8f3
9 changed files with 11 additions and 11 deletions

View File

@@ -329,7 +329,7 @@ class DbBackup(models.Model):
def action_view_cron(self):
self.ensure_one()
action = self.env.ref('base.ir_cron_act', False).read()[0]
action = self.env.ref('base.ir_cron_act', False).sudo().read()[0]
cron = self.env.ref('app_auto_backup.backup_scheduler', False)
if action and cron:
action['views'] = [(self.env.ref('base.ir_cron_view_form').id, 'form')]