From 482cbcd087f0c9ff15a0c28ccde3dfdcc777bfbd Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 18 Nov 2014 10:40:25 +0100 Subject: [PATCH] Add an explanation why the old api is used --- account_credit_control/wizard/credit_control_communication.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/account_credit_control/wizard/credit_control_communication.py b/account_credit_control/wizard/credit_control_communication.py index 4ebbf31db..83315e947 100644 --- a/account_credit_control/wizard/credit_control_communication.py +++ b/account_credit_control/wizard/credit_control_communication.py @@ -145,6 +145,9 @@ class CreditCommunication(models.TransientModel): def _generate_emails(self): """ Generate email message using template related to level """ email_message_obj = self.env['mail.mail'] + # Warning: still using the old-api on 'email.template' because + # the method generate_email() does not follow the cr, uid, ids + # convention and the new api wrapper can't translate the call email_template_obj = self.pool['email.template'] att_obj = self.env['ir.attachment'] emails = email_message_obj.browse()