title: how to display openerp error message
body: <p>In my student module I inherited res.partner. And I want to restrict to modify name in partner view if partner is a student. here is my cord.</p>
  
  <pre><code>from openerp.osv import osv, fields
  
  
  class res_partner(osv.Model):
      _inherit = 'res.partner'
      _columns = {
          'name': fields.char('Name', size=250, required=True, select=True),
          'is_student': fields.boolean('Student', readonly=True),
  }
  
  def write(self, cr, uid, ids, vals, context=None):
  
      stud = self.browse(cr, uid, ids, context=context)[0]
  
      if ('name' in vals) &amp; (stud.is_student is True):
          raise "Cannot Edit"
      else:
          return super(res_partner, self).write(cr, uid, ids, vals, context=context)
  </code></pre>
  
  <p>it is working but I want to display error message in a message box. not a exception. How could I do this?</p>