Odoo Help

Welcome!

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.

1

No Handler found error while validating the email field ?

By
Manjunath
on 2/15/14, 3:03 AM 710 views

Hi, I have a scenario where I need to validate a email address whether it is valid or not. For validating I have used the following code.

hr_view.xml:

<field name="work_email" widget="email" on_change="onchange_work_email(work_email)"/>

hr.py

def onchange_work_email(self, cr, uid, ids, work_email):
    if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$", work_email) != None:
        return True
    else:
        raise osv.except_osv(_('Invalid Email'), _('Please enter a valid email address'))

But I got No handler found error. I made changes in only above two files, Did i need to import regular expressions ? what is the error ? Any appreciate suggestions

Look in you openerp-server.log. (the error is probably described in it)

Med Said BARA
on 2/15/14, 1:52 PM

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)

Stats

Asked: 2/15/14, 3:03 AM
Seen: 710 times
Last updated: 3/16/15, 8:10 AM