Hi All,
Is there anyone can figureout what we need to be done. Code is working when I entered char value the "raise (_('Invalid phone'),_('Please enter a valid phone'))" popup on my screen then if I hit the ok button and click save button and it will save, I want only numeric value to save. is there additional code can be added?
Thanks again for your reply
xml---
<field name="mobile" string="Phone" placeholder="434343454" on_change="onchange_mobile(mobile)"/>
python---
def onchange_mobile(self, cr, uid, ids, mobile, context=None):
if not mobile:
return {}
if not mobile.isdigit():
raise osv.except_osv(_('Invalid phone'),_('Please enter a valid phone'))
return {}
any help