[IMP]Improved code as Suggested

bzr revid: pan@tinyerp.com-20130305091035-7uikbzuuziy311ra
This commit is contained in:
Anand Patel (OpenERP) 2013-03-05 14:40:35 +05:30
parent b1a41adb35
commit 1a147be814
3 changed files with 2 additions and 3 deletions

View File

@ -92,7 +92,7 @@ class procurement_order(osv.osv):
body = _("Task created")
self.message_post(cr, uid, [procurement.id], body=body, context=context)
if procurement.sale_line_id and procurement.sale_line_id.order_id:
procurement.sale_line_id.order_id.message_post(body=body)
procurement.sale_line_id.order_id.message_post(body=body)
procurement_order()

View File

@ -1029,6 +1029,6 @@ class stock_picking(osv.osv):
for record in self.browse(cr, uid, ids, context):
if record.type == "out" and record.sale_id:
self.pool.get('sale.order').message_post(cr, uid, [record.sale_id.id],body=_("Products delivered"), context=context)
return super(stock_picking, self).action_done(cr, uid, ids, context=context)
return super(stock_picking, self).action_done(cr, uid, ids, context=None)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -20,7 +20,6 @@
##############################################################################
from openerp.osv import fields, osv
from openerp.tools.translate import _
class stock_move(osv.osv):
_inherit = 'stock.move'