[IMP] Improve code.

bzr revid: bth@tinyerp.com-20130207115205-1j46xhbs85i8q6w4
This commit is contained in:
Bhumi Thakkar (Open ERP)
2013-02-07 17:22:05 +05:30
parent c097b3aa2a
commit 7210b2ee42
+1 -1
View File
@@ -1010,7 +1010,7 @@ class stock_picking(osv.Model):
def action_done(self, cr, uid, ids, context=None):
res = super(stock_picking, self).action_done(cr, uid, ids, context=None)
for stockpicking in self.browse(cr, uid, ids, context):
if stockpicking.sale_id.id:
if stockpicking.sale_id:
for sale in self.pool.get('sale.order').browse(cr, uid, [stockpicking.sale_id.id], context):
sale.message_post(body=_("%s <b>Delivered</b>") % (sale._description))
return True