Skip to content
Snippets Groups Projects
Commit d9318e92 authored by Fabien Pinckaers's avatar Fabien Pinckaers
Browse files

[fix] check followup message

lp bug: https://launchpad.net/bugs/768241 fixed

bzr revid: fp@tinyerp.com-20110924104225-0mvbgeofjm2tnj81
parent 735276e8
Branches
Tags
No related merge requests found
......@@ -63,7 +63,20 @@ class followup_line(osv.osv):
}
_defaults = {
'start': 'days',
}
def _check_description(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 = [
(_check_description, 'Your description is invalid, use the right legend or %% if you want to use the percent character.', ['description']),
]
followup_line()
......@@ -101,4 +114,4 @@ Thanks,
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment