[IMP]:improved chatter
bzr revid: apa@tinyerp.com-20120627063544-3jvcbng896lk0kix
This commit is contained in:
parent
555b3da94f
commit
59eca3ad10
|
@ -331,13 +331,13 @@ class mrp_repair(osv.osv):
|
|||
self.write(cr, uid, [o.id], {'state': '2binvoiced'})
|
||||
else:
|
||||
self.write(cr, uid, [o.id], {'state': 'confirmed'})
|
||||
self.set_confirm_send_note(cr, uid, ids)
|
||||
if not o.operations:
|
||||
raise osv.except_osv(_('Error !'),_('You cannot confirm a repair order which has no line.'))
|
||||
for line in o.operations:
|
||||
if line.product_id.track_production and not line.prodlot_id:
|
||||
raise osv.except_osv(_('Warning'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name))
|
||||
mrp_line_obj.write(cr, uid, [l.id for l in o.operations], {'state': 'confirmed'})
|
||||
self.set_confirm_send_note(cr, uid, [o.id])
|
||||
return True
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
|
@ -502,7 +502,6 @@ class mrp_repair(osv.osv):
|
|||
else:
|
||||
pass
|
||||
self.write(cr, uid, [order.id], val)
|
||||
self.set_end_repair_send_note(cr, uid, [order.id], context)
|
||||
return True
|
||||
|
||||
def wkf_repair_done(self, cr, uid, ids, *args):
|
||||
|
@ -588,10 +587,6 @@ class mrp_repair(osv.osv):
|
|||
message = _("Repair order has been <b>Confirmed</b>.")
|
||||
return self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
|
||||
def set_end_repair_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Repair is now <b>Ended</b>.")
|
||||
return self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
|
||||
def set_cancel_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Repair has been <b>cancelled</b>.")
|
||||
return self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
|
|
Loading…
Reference in New Issue