[MERGE] orm: better exception messsages.
lp bug: https://launchpad.net/bugs/777472 fixed bzr revid: vmt@openerp.com-20110920122411-iykenv7sq7r710vy
This commit is contained in:
commit
e5c95611b3
|
@ -2756,7 +2756,7 @@ class orm(orm_template):
|
|||
pass
|
||||
if not val_id:
|
||||
raise except_orm(_('ValidateError'),
|
||||
_('Invalid value for reference field "%s" (last part must be a non-zero integer): "%s"') % (field, value))
|
||||
_('Invalid value for reference field "%s.%s" (last part must be a non-zero integer): "%s"') % (self._table, field, value))
|
||||
val = val_model
|
||||
else:
|
||||
val = value
|
||||
|
@ -2766,7 +2766,7 @@ class orm(orm_template):
|
|||
elif val in dict(self._columns[field].selection(self, cr, uid, context=context)):
|
||||
return
|
||||
raise except_orm(_('ValidateError'),
|
||||
_('The value "%s" for the field "%s" is not in the selection') % (value, field))
|
||||
_('The value "%s" for the field "%s.%s" is not in the selection') % (value, self._table, field))
|
||||
|
||||
def _check_removed_columns(self, cr, log=False):
|
||||
# iterate on the database columns to drop the NOT NULL constraints
|
||||
|
|
Loading…
Reference in New Issue