account
This commit is contained in:
13
account_reports/models/mail_activity.py
Normal file
13
account_reports/models/mail_activity.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class MailActivity(models.Model):
|
||||
_inherit = 'mail.activity'
|
||||
|
||||
def action_open_document(self):
|
||||
# OVERRIDE
|
||||
# when opening the "View all activities", and opening a return, we actually want the kanban view of return checks
|
||||
if self.res_model != 'account.return':
|
||||
return super().action_open_document()
|
||||
|
||||
return self.env['account.return'].browse(self.res_id).action_open_account_return()
|
||||
Reference in New Issue
Block a user