Fix flake8 and pylint warnings

pull/47/head
astirpe 2016-03-11 17:45:53 +01:00
parent c07827c04d
commit ec8ccbcf50
2 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ import json
from openerp import tools from openerp import tools
from openerp import SUPERUSER_ID from openerp import SUPERUSER_ID
from openerp import models, fields, api from openerp import models, fields, api
from openerp.exceptions import Warning from openerp.exceptions import Warning as UserError
from openerp.tools.translate import _ from openerp.tools.translate import _
@ -66,7 +66,7 @@ class BveView(models.Model):
def unlink(self): def unlink(self):
for view in self: for view in self:
if view.state == 'created': if view.state == 'created':
raise Warning( raise UserError(
_('Error'), _('Error'),
_('You cannot delete a created view! ' _('You cannot delete a created view! '
'Reset the view to draft first.')) 'Reset the view to draft first.'))