Odoo Help


check a lead type is 'lead' or 'opportunity' and display to leads wall

on 5/26/14, 2:10 AM 1,320 views

Hello everyone,

here i want to check a lead type is 'lead' or 'opportunity',

and lead type is "lead" means, show a notificaton like "This lead converted to opportunity not yet" to relevent lead wall....

Here i tried this code in mail_message.py in mail module,

    def check_lead_type(self, cr, uid, ids, context=None):
        for lead_check in self.pool.get('crm.lead').browse(cr, uid, ids, context=context):


            if lead_type=='lead':

                values = {
                    'body': "<div><p>This Lead is not converted to opportunity yet....</p></div>",
                   'record_name': name,
        return {'value' : values}


Please anyone help me to correct code for this,

Thanks in advance

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/26/14, 2:10 AM
Seen: 1320 times
Last updated: 3/16/15, 8:10 AM