-
- Downloads
[IMP] mail: notification emails with button
Notification emails have been redesigned. They notably include buttons allowing to perform some action directly from the email. The notification creation and sending has been partially rewritten and improved. The purpose is to lessen the number of rendering to perform when sending emails to recipients. Recipients are first categorized into groups. Basic groups are partners and users. The notification template is then rendered twice, one for followers and one for not-followers. In most cases there will be few rendering to perform. Through inheritance it is possible to further categorize users. For example HR users / officers that have approve / refuse buttons in their email. A custom data structure is used to store data about buttons and actions. URLs, follow / unfollow are added in the structure and used in the template to render the email for a given group. New routes are added in mail. Those allow to perform some action, like going to a form in create mode, following / unfollowing, executing a method, sending a signal for a workflow. Those routes are for users only and rely on classic access rights. A generic route for viewing records is added. It replaces the old redirect action. According to some specific action given by the already-existing get_access_action, the record will be visible for everybody (forum, blog) or restricted (going on the Inbox / login / form view, according to access rights). The next commit will add the various inherits necessary to add the actions in the main addons.
Showing
- addons/hr_holidays/hr_holidays.py 0 additions, 2 deletionsaddons/hr_holidays/hr_holidays.py
- addons/mail/controllers/main.py 138 additions, 0 deletionsaddons/mail/controllers/main.py
- addons/mail/data/mail_data.xml 113 additions, 0 deletionsaddons/mail/data/mail_data.xml
- addons/mail/models/mail_mail.py 1 addition, 42 deletionsaddons/mail/models/mail_mail.py
- addons/mail/models/mail_template.py 2 additions, 1 deletionaddons/mail/models/mail_template.py
- addons/mail/models/mail_thread.py 120 additions, 57 deletionsaddons/mail/models/mail_thread.py
- addons/mail/models/res_partner.py 116 additions, 98 deletionsaddons/mail/models/res_partner.py
- addons/mail/static/src/js/mail.js 0 additions, 27 deletionsaddons/mail/static/src/js/mail.js
- addons/mail/tests/test_mail_features.py 1 addition, 114 deletionsaddons/mail/tests/test_mail_features.py
- addons/mail/views/mail_message_views.xml 1 addition, 0 deletionsaddons/mail/views/mail_message_views.xml
- addons/mail/views/mail_thread_views.xml 0 additions, 9 deletionsaddons/mail/views/mail_thread_views.xml
- addons/mail/wizard/invite.py 3 additions, 3 deletionsaddons/mail/wizard/invite.py
- addons/portal/__init__.py 0 additions, 1 deletionaddons/portal/__init__.py
- addons/portal/mail_mail.py 0 additions, 24 deletionsaddons/portal/mail_mail.py
- addons/portal/tests/test_portal.py 8 additions, 38 deletionsaddons/portal/tests/test_portal.py
- addons/website_forum/models/forum.py 10 additions, 5 deletionsaddons/website_forum/models/forum.py
- addons/website_mail/controllers/main.py 1 addition, 1 deletionaddons/website_mail/controllers/main.py
Loading
Please register or sign in to comment