[FIX] developer/mixins: mail.thread method names

In d46e358d3e88aea9f9289c4845c6c87ab9491c55 some mail.thread method
names were changed: it should be changed in documentation too.

closes odoo/documentation#1682

X-original-commit: b24560e224
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
nle-odoo 2022-03-09 10:34:41 +00:00 committed by GitHub
parent e532e213f5
commit beda3f95ff

View File

@ -342,9 +342,9 @@ ways:
Expense Manager, etc.) Expense Manager, etc.)
These buttons settings can be applied to different groups that you can define These buttons settings can be applied to different groups that you can define
yourself by overriding the function ``_notification_recipients``. yourself by overriding the function ``_notify_get_groups``.
.. method:: _notification_recipients(message, groups) .. method:: _notify_get_groups(message, groups)
Give the subtype triggered by the changes on the record according Give the subtype triggered by the changes on the record according
to values that have been updated. to values that have been updated.
@ -392,10 +392,10 @@ yourself by overriding the function ``_notification_recipients``.
The urls in the actions list can be generated automatically by calling the The urls in the actions list can be generated automatically by calling the
``_notification_link_helper()`` function: ``_notify_get_action_link()`` function:
.. method:: _notification_link_helper(self, link_type, **kwargs) .. method:: _notify_get_action_link(self, link_type, **kwargs)
Generate a link for the given type on the current record (or on a specific Generate a link for the given type on the current record (or on a specific
record if the kwargs ``model`` and ``res_id`` are set). record if the kwargs ``model`` and ``res_id`` are set).
@ -440,14 +440,14 @@ The urls in the actions list can be generated automatically by calling the
def action_cancel(self): def action_cancel(self):
self.write({'state': 'draft'}) self.write({'state': 'draft'})
def _notification_recipients(self, message, groups): def _notify_get_groups(self, message, groups):
""" Handle Trip Manager recipients that can cancel the trip at the last """ Handle Trip Manager recipients that can cancel the trip at the last
minute and kill all the fun. """ minute and kill all the fun. """
groups = super(BusinessTrip, self)._notification_recipients(message, groups) groups = super(BusinessTrip, self)._notify_get_groups(message, groups)
self.ensure_one() self.ensure_one()
if self.state == 'confirmed': if self.state == 'confirmed':
app_action = self._notification_link_helper('method', app_action = self._notify_get_action_link('method',
method='action_cancel') method='action_cancel')
trip_actions = [{'url': app_action, 'title': _('Cancel')}] trip_actions = [{'url': app_action, 'title': _('Cancel')}]