I try to add a error box on my function button but I do not know how to do it..
I try this :
def testError(self, cr, uid, ids, context=None):
for line in self.browse(cr, uid, ids, context=context):
if line.invoiced:
raise osv.except_osv(_('Invalid Action!'), _('Test.'))
return self.write(cr, uid, ids, {'state': 'draft'})