'try renaming a custom field that occurs in a view'

def test_rename_with_view(self):

    field = self.create_field('x_foo')
    self.create_view('x_foo')
    with self.assertRaises(UserError):
        field.name = 'x_bar'
    self.assertIn('x_foo', self.env[self.MODEL]._fields)
