raise except_orm(_('Error'), _("Custom fields must have a name that starts with 'x_' !"))
if vals.get('relation',False) and not self.pool.get('ir.model').search(cr, user, [('model','=',vals['relation'])]):
- raise except_orm(_('Error'), _("Model %s Does not Exist !" % vals['relation']))
+ raise except_orm(_('Error'), _("Model %s does not exist!") % vals['relation'])
if self.pool.get(vals['model']):
self.pool.get(vals['model']).__init__(self.pool, cr)
raise Exception('Unable to find %r in path' % (binary,))
- def state_update(self, cr, uid, ids, newstate, states_to_update, context={}, level=100):
+ def state_update(self, cr, uid, ids, newstate, states_to_update, context=None, level=100):
if level<1:
raise orm.except_orm(_('Error'), _('Recursion error in modules dependencies !'))
demo = False
mdemo = False
for dep in module.dependencies_id:
if dep.state == 'unknown':
- raise orm.except_orm(_('Error'), _("You try to install the module '%s' that depends on the module:'%s'.\nBut this module is not available in your system.") % (module.name, dep.name,))
+ raise orm.except_orm(_('Error'), _("You try to install module '%s' that depends on module '%s'.\nBut the latter module is not available in your system.") % (module.name, dep.name,))
ids2 = self.search(cr, uid, [('name','=',dep.name)])
if dep.state != newstate:
mdemo = self.state_update(cr, uid, ids2, newstate, states_to_update, context, level-1,) or mdemo
try:
self._check_external_dependencies(terp)
except Exception, e:
- raise orm.except_orm(_('Error'), _('Unable %s the module "%s" because an external dependencie is not met: %s' % (newstate, module.name, e.args[0])))
+ if newstate == 'to install':
+ msg = _('Unable to install module "%s" because an external dependency is not met: %s')
+ elif newstate == 'to upgrade':
+ msg = _('Unable to upgrade module "%s" because an external dependency is not met: %s')
+ else:
+ msg = _('Unable to process module "%s" because an external dependency is not met: %s')
+ raise orm.except_orm(_('Error'), msg % (module.name, e.args[0]))
if not module.dependencies_id:
mdemo = module.demo
if module.state in states_to_update: