summaryrefslogtreecommitdiff
path: root/addons/mail/wizard
diff options
context:
space:
mode:
authorRobot Odoo <xmo+roboto@odoo.com>2019-07-17 14:17:57 +0200
committerGitHub <noreply@github.com>2019-07-17 14:17:57 +0200
commitcc62447a44c2cf4e2edaf8a1f6d94520e799ddd9 (patch)
treea45f0984af5db1723fec83741b285ea92ab63598 /addons/mail/wizard
parentf6fdde96bddfedf8764cd8a73089e44340d476ae (diff)
parenta8767716cfd14abc7f87204d4d180811f663b648 (diff)
[MERGE] api.py: remove calls to @api.multi and deprecate its explicit usage
depends on https://github.com/odoo/odoo/pull/34556 closes odoo/odoo#34775 Signed-off-by: Adrian Torres <Elkasitu@users.noreply.github.com>
Diffstat (limited to 'addons/mail/wizard')
-rw-r--r--addons/mail/wizard/base_partner_merge.py1
-rw-r--r--addons/mail/wizard/email_template_preview.py1
-rw-r--r--addons/mail/wizard/invite.py1
-rw-r--r--addons/mail/wizard/mail_compose_message.py7
-rw-r--r--addons/mail/wizard/mail_resend_cancel.py2
-rw-r--r--addons/mail/wizard/mail_resend_message.py2
6 files changed, 0 insertions, 14 deletions
diff --git a/addons/mail/wizard/base_partner_merge.py b/addons/mail/wizard/base_partner_merge.py
index d31749cacad..aed2cefd723 100644
--- a/addons/mail/wizard/base_partner_merge.py
+++ b/addons/mail/wizard/base_partner_merge.py
@@ -7,7 +7,6 @@ class MergePartnerAutomatic(models.TransientModel):
_inherit = 'base.partner.merge.automatic.wizard'
- @api.multi
def _log_merge_operation(self, src_partners, dst_partner):
super(MergePartnerAutomatic, self)._log_merge_operation(src_partners, dst_partner)
dst_partner.message_post(body='%s %s' % (_("Merged with the following partners:"), ", ".join('%s <%s> (ID %s)' % (p.name, p.email or 'n/a', p.id) for p in src_partners)))
diff --git a/addons/mail/wizard/email_template_preview.py b/addons/mail/wizard/email_template_preview.py
index 95b9f9208c5..244cdb295bc 100644
--- a/addons/mail/wizard/email_template_preview.py
+++ b/addons/mail/wizard/email_template_preview.py
@@ -45,7 +45,6 @@ class TemplatePreview(models.TransientModel):
preview_lang = fields.Selection(_get_languages, string='Template Preview Language')
@api.onchange('res_id', 'preview_lang')
- @api.multi
def on_change_res_id(self):
if not self.res_id:
return {}
diff --git a/addons/mail/wizard/invite.py b/addons/mail/wizard/invite.py
index 5c7889b6a76..34f42159cd4 100644
--- a/addons/mail/wizard/invite.py
+++ b/addons/mail/wizard/invite.py
@@ -46,7 +46,6 @@ class Invite(models.TransientModel):
message = fields.Html('Message')
send_mail = fields.Boolean('Send Email', default=True, help="If checked, the partners will receive an email warning they have been added in the document's followers.")
- @api.multi
def add_followers(self):
email_from = self.env['mail.message']._get_default_from()
for wizard in self:
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 55cd6740b4b..ac05a1cf2a0 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -204,13 +204,11 @@ class MailComposer(models.TransientModel):
#------------------------------------------------------
# action buttons call with positionnal arguments only, so we need an intermediary function
# to ensure the context is passed correctly
- @api.multi
def action_send_mail(self):
self.send_mail()
return {'type': 'ir.actions.act_window_close', 'infos': 'mail_sent'}
- @api.multi
def send_mail(self, auto_commit=False):
""" Process the wizard content and proceed with sending the related
email(s), rendering any template patterns on the fly if needed. """
@@ -289,7 +287,6 @@ class MailComposer(models.TransientModel):
if wizard.composition_mode == 'mass_mail':
batch_mails.send(auto_commit=auto_commit)
- @api.multi
def get_mail_values(self, res_ids):
"""Generate the values that will be used by send_mail to create mail_messages
or mail_mails. """
@@ -380,7 +377,6 @@ class MailComposer(models.TransientModel):
# Template methods
#------------------------------------------------------
- @api.multi
@api.onchange('template_id')
def onchange_template_id_wrapper(self):
self.ensure_one()
@@ -388,7 +384,6 @@ class MailComposer(models.TransientModel):
for fname, value in values.items():
setattr(self, fname, value)
- @api.multi
def onchange_template_id(self, template_id, composition_mode, model, res_id):
""" - mass_mailing: we cannot render, so return the template values
- normal mode: return rendered values
@@ -434,7 +429,6 @@ class MailComposer(models.TransientModel):
return {'value': values}
- @api.multi
def save_as_template(self):
""" hit save as template button: current form value will be a new
template attached to the current document. """
@@ -459,7 +453,6 @@ class MailComposer(models.TransientModel):
# Template rendering
#------------------------------------------------------
- @api.multi
def render_message(self, res_ids):
"""Generate template-based values of wizard, for the document records given
by res_ids. This method is meant to be inherited by email_template that
diff --git a/addons/mail/wizard/mail_resend_cancel.py b/addons/mail/wizard/mail_resend_cancel.py
index f3bb8307754..7f2c5d334fb 100644
--- a/addons/mail/wizard/mail_resend_cancel.py
+++ b/addons/mail/wizard/mail_resend_cancel.py
@@ -11,13 +11,11 @@ class MailResendCancel(models.TransientModel):
model = fields.Char(string='Model')
help_message = fields.Char(string='Help message', compute='_compute_help_message')
- @api.multi
@api.depends('model')
def _compute_help_message(self):
for wizard in self:
wizard.help_message = _("Are you sure you want to discard %s mail delivery failures. You won't be able to re-send these mails later!") % (wizard._context.get('unread_counter'))
- @api.multi
def cancel_resend_action(self):
author_id = self.env.user.partner_id.id
for wizard in self:
diff --git a/addons/mail/wizard/mail_resend_message.py b/addons/mail/wizard/mail_resend_message.py
index 9c72944961b..dc659681dac 100644
--- a/addons/mail/wizard/mail_resend_message.py
+++ b/addons/mail/wizard/mail_resend_message.py
@@ -49,7 +49,6 @@ class MailResendMessage(models.TransientModel):
raise UserError('No message_id found in context')
return rec
- @api.multi
def resend_mail_action(self):
""" Process the wizard content and proceed with sending the related
email(s), rendering any template patterns on the fly if needed. """
@@ -79,7 +78,6 @@ class MailResendMessage(models.TransientModel):
self.mail_message_id._notify_mail_failure_update()
return {'type': 'ir.actions.act_window_close'}
- @api.multi
def cancel_mail_action(self):
for wizard in self:
for notif in wizard.notification_ids: