First install the description module and check weather the description in valid or invalid you can do this on basis of the partner name and company name and user signature and also date in description module in openerp.
using below fucntion in .py file ,
def checkdescription(self, cr, uid, ids, context=None):
for line in self.browse(cr, uid, ids, context=context):
if line.description:
try:
line.description % {'partner_name': '', 'date':'', 'user_signature': '', 'company_name': ''}
except:
return False
return True
_constraints = [
(checkdescription, 'Your description is wrong, use the right legend or %% if you want to use the percent character.', ['description']),
]
0 Comment(s)