Odoo Help


18 Years Below date checking

on 11/11/13, 6:39 AM 968 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

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

0 follower(s)


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