From 6e319db7c51ccdae5b4b9b32e561d6b17696580c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 18 Dec 2012 18:34:23 +0100 Subject: [PATCH] [REF] mrp_repair: track state replaces chatter messages. bzr revid: tde@openerp.com-20121218173423-lxg87rmm04e2co0f --- addons/mrp_repair/mrp_repair.py | 48 +-------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 78af4ab5f58..5b41c559849 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -130,7 +130,7 @@ class mrp_repair(osv.osv): ('2binvoiced','To be Invoiced'), ('invoice_except','Invoice Exception'), ('done','Repaired') - ], 'Status', readonly=True, + ], 'Status', readonly=True, track_visibility=1, help=' * The \'Draft\' status is used when a user is encoding a new and unconfirmed repair order. \ \n* The \'Confirmed\' status is used when a user confirms the repair order. \ \n* The \'Ready to Repair\' status is used to start to repairing, user can start repairing only after repair order is confirmed. \ @@ -563,52 +563,6 @@ class mrp_repair(osv.osv): self.set_done_send_note(cr, uid, [repair.id], context) return res - def create(self, cr, uid, vals, context=None): - repair_id = super(mrp_repair, self).create(cr, uid, vals, context=context) - self.create_send_note(cr, uid, [repair_id], context=context) - return repair_id - - def create_send_note(self, cr, uid, ids, context=None): - for repair in self.browse(cr, uid, ids, context): - message = _("Repair Order for %s has been created." % (repair.product_id.name)) - self.message_post(cr, uid, [repair.id], body=message, context=context) - return True - - def set_start_send_note(self, cr, uid, ids, context=None): - for repair in self.browse(cr, uid, ids, context): - message = _("Repair Order for %s has been started." % (repair.product_id.name)) - self.message_post(cr, uid, [repair.id], body=message, context=context) - return True - - def set_toinvoiced_send_note(self, cr, uid, ids, context=None): - for repair in self.browse(cr, uid, ids, context): - message = _("Draft Invoice of %s %s waiting for validation.") % (repair.invoice_id.amount_total, repair.invoice_id.currency_id.symbol) - self.message_post(cr, uid, [repair.id], body=message, context=context) - return True - - def set_confirm_send_note(self, cr, uid, ids, context=None): - for repair in self.browse(cr, uid, ids, context): - message = _( "Repair Order for %s has been accepted." % (repair.product_id.name)) - self.message_post(cr, uid, [repair.id], body=message, context=context) - return True - - def set_cancel_send_note(self, cr, uid, ids, context=None): - message = _("Repair has been cancelled.") - self.message_post(cr, uid, ids, body=message, context=context) - return True - - def set_ready_send_note(self, cr, uid, ids, context=None): - message = _("Repair Order is now ready to repair.") - self.message_post(cr, uid, ids, body=message, context=context) - return True - - def set_done_send_note(self, cr, uid, ids, context=None): - message = _("Repair Order is closed.") - self.message_post(cr, uid, ids, body=message, context=context) - return True - -mrp_repair() - class ProductChangeMixin(object): def product_id_change(self, cr, uid, ids, pricelist, product, uom=False,