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.


18 Years Below date checking

on 11/11/13, 6:39 AM 603 views

In Employee form Date of Birth field is current date is accepted i need below 18 years of Date of Birth i want to raise a Warning or Error Message how to solve this in OpenERP 7

Thanks Regards Sridharan G

Jaakko Komulainen
On 11/11/13, 6:51 AM

Create on_change method for date of birth field and use osv.except_osv to raise an error. See: http://help.openerp.com/question/16015/using-raise-osvexcept_osv/

Hope this helps,

How to validate this date.

on 11/11/13, 7:02 AM

Check that in the on_change method? You can compare datetime to datetime (http://docs.python.org/2/library/datetime.html)

Jaakko Komulainen
on 11/11/13, 7:08 AM

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

0 follower(s)


Asked: 11/11/13, 6:39 AM
Seen: 603 times
Last updated: 3/16/15, 8:10 AM