[IMP]: mrp: Improved log messages
bzr revid: rpa@tinyerp.com-20100723134217-q9hnz0bxg191kjca
This commit is contained in:
+16
-9
@@ -635,13 +635,11 @@ class mrp_production(osv.osv):
|
||||
move_obj.write(cr, uid, [production.move_prod_id.id],
|
||||
{'location_id': production.location_dest_id.id})
|
||||
|
||||
message = ("%s %s %s %s %s %s") % (
|
||||
_('Manufacturing Order '),
|
||||
name,
|
||||
_("scheduled the"),
|
||||
datetime.strptime(production.date_planned,'%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d'),
|
||||
_("for"),
|
||||
production.product_id.name)
|
||||
message = ("Manufacturing Order '%s' for %s %s is Ready to produce.") % (
|
||||
name,
|
||||
production.product_qty,
|
||||
production.product_id.name,
|
||||
)
|
||||
self.log(cr, uid, production_id, message)
|
||||
return True
|
||||
|
||||
@@ -740,7 +738,7 @@ class mrp_production(osv.osv):
|
||||
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'mrp.production', production_id, 'button_produce_done', cr)
|
||||
message = _('Manufacturing order ') + " '" + production.name + "' "+ _("is finished.")
|
||||
message = str(production_qty) + " '[" + production.product_id.code + '] ' + production.product_id.name + _("' have been manufactured for ") + production.name
|
||||
self.log(cr, uid, production_id, message)
|
||||
return True
|
||||
|
||||
@@ -910,7 +908,16 @@ class mrp_production(osv.osv):
|
||||
proc_ids.append(proc_id)
|
||||
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
|
||||
self.write(cr, uid, [production.id], {'picking_id': picking_id, 'move_lines': [(6,0,moves)], 'state':'confirmed'})
|
||||
message = _('Manufacturing order ') + " '" + production.name + "' "+ _("is confirmed.")
|
||||
message = ("%s '%s' %s %s %s %s %s %s.") % (
|
||||
_('Manufacturing Order'),
|
||||
name,
|
||||
_('for'),
|
||||
production.product_qty,
|
||||
production.product_id.name,
|
||||
_('scheduled for date '),
|
||||
datetime.strptime(production.date_planned,'%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d'),
|
||||
_('is waiting')
|
||||
)
|
||||
self.log(cr, uid, production.id, message)
|
||||
return picking_id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user