[FIX] stock: fixed client notification messages

bzr revid: odo@openerp.com-20100601135707-vzfxahtlum6kv1r8
This commit is contained in:
Olivier Dony 2010-06-01 15:57:07 +02:00
parent 8e8cd43846
commit 0447907356
1 changed files with 2 additions and 2 deletions

View File

@ -478,7 +478,7 @@ class stock_picking(osv.osv):
'delivery': _('Delivery order')
}
if not vals.get('auto_picking', False):
message = type_list.get(vals.get('type',_('Picking'))) + " '" + vals['name'] + "' "+ _("created.")
message = type_list.get(vals.get('type', False), _('Picking')) + " '" + (vals['name'] or "n/a") + "' "+ _("created.")
self.log(cr, user, id, message)
return super(stock_picking, self).create(cr, user, vals, context)
@ -627,7 +627,7 @@ class stock_picking(osv.osv):
'internal': 'Internal picking',
'delivery': 'Delivery order'
}
message = type_list.get(pick.type, _('Document')) + " '" + pick.name + "' "+ _("is ready to be processed.")
message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or 'n/a') + "' "+ _("is ready to be processed.")
self.log(cr, uid, id, message)
self.write(cr, uid, ids, {'state': 'assigned'})
return True