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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
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.
Check that in the on_change method? You can compare datetime to datetime (http://docs.python.org/2/library/datetime.html)