Odoo Help


This community 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.


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

on 5/26/14, 2:10 AM 729 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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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