Hi everyone
I am trying to override the function async onClickCancel()
which is located in addons/mail/static/src/models/activity_view.js
My goal is to check is the connecter user is the one who created the activity, and if not, display error message, then do nothing
If he is, I call the super() to let the standard behavior
In my custom module I am facing an issue with the 'require' line code, I have js error in my console, saying
TypeError: Cannot read properties of undefined (reading 'recordMethods')
I tried manythings ... require('mail/ActivityView') and many other things
Thank you for your help
(my custom code is loaded so I can face this issue, I think the problem is in this require line, not in the manifest or anywhere else)
var activityView = require('@mail/models/activity_view'); activityView.ActivityView.recordMethods.include(mycustomcode)