Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Iam trying to send an email to a potential customer when a lead converted to an opportunity. Here is my code.
def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None):
res = super(crm_lead, self).convert_opportunity(cr, uid, ids, partner_id, user_ids, section_id, context=context)
template_id = self.pool.get('ir.model.data').get_object(cr, uid, 'buildafrique_erp', 'opportunity_created')
message_id = self.pool.get('email.template').send_mail(cr, uid, template_id.id, context['active_id'], force_send=True, context=context)
However, the email that is sent is in duplicate, sometimes, four times when I convert one lead to an opportunity. Any Ideas what is causing this?
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/6/16, 10:58 AM|
|Seen: 524 times|
|Last updated: 5/6/16, 10:58 AM|