diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 1c62343d36e..1523cfd2115 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -473,6 +473,7 @@ class mrp_production(osv.osv):
[('draft', 'New'), ('cancel', 'Cancelled'), ('picking_except', 'Picking Exception'), ('confirmed', 'Awaiting Raw Materials'),
('ready', 'Ready to Produce'), ('in_production', 'Production Started'), ('done', 'Done')],
string='Status', readonly=True,
+ track_visibility=1,
help="When the production order is created the status is set to 'Draft'.\n\
If the order is confirmed the status is set to 'Waiting Goods'.\n\
If any exceptions are there, the status is set to 'Picking Exception'.\n\
@@ -510,11 +511,6 @@ class mrp_production(osv.osv):
(_check_qty, 'Order quantity cannot be negative or zero!', ['product_qty']),
]
- def create(self, cr, uid, vals, context=None):
- obj_id = super(mrp_production, self).create(cr, uid, vals, context=context)
- self.create_send_note(cr, uid, [obj_id], context=context)
- return obj_id
-
def unlink(self, cr, uid, ids, context=None):
for production in self.browse(cr, uid, ids, context=context):
if production.state not in ('draft', 'cancel'):
@@ -651,7 +647,6 @@ class mrp_production(osv.osv):
move_obj.action_cancel(cr, uid, [x.id for x in production.move_created_ids])
move_obj.action_cancel(cr, uid, [x.id for x in production.move_lines])
self.write(cr, uid, ids, {'state': 'cancel'})
- self.action_cancel_send_note(cr, uid, ids, context)
return True
def action_ready(self, cr, uid, ids, context=None):
@@ -666,7 +661,6 @@ class mrp_production(osv.osv):
if production.move_prod_id and production.move_prod_id.location_id.id != production.location_dest_id.id:
move_obj.write(cr, uid, [production.move_prod_id.id],
{'location_id': production.location_dest_id.id})
- self.action_ready_send_note(cr, uid, [production_id], context)
return True
def action_production_end(self, cr, uid, ids, context=None):
@@ -676,7 +670,6 @@ class mrp_production(osv.osv):
for production in self.browse(cr, uid, ids):
self._costs_generate(cr, uid, production)
write_res = self.write(cr, uid, ids, {'state': 'done', 'date_finished': time.strftime('%Y-%m-%d %H:%M:%S')})
- self.action_done_send_note(cr, uid, ids, context)
return write_res
def test_production_done(self, cr, uid, ids):
@@ -1019,7 +1012,6 @@ class mrp_production(osv.osv):
wf_service.trg_validate(uid, 'stock.picking', shipment_id, 'button_confirm', cr)
production.write({'state':'confirmed'}, context=context)
- self.action_confirm_send_note(cr, uid, [production.id], context);
return shipment_id
def force_production(self, cr, uid, ids, *args):
@@ -1035,30 +1027,6 @@ class mrp_production(osv.osv):
# OpenChatter methods and notifications
# ---------------------------------------------------
- def create_send_note(self, cr, uid, ids, context=None):
- self.message_post(cr, uid, ids, body=_("Manufacturing order has been created."), context=context)
- return True
-
- def action_cancel_send_note(self, cr, uid, ids, context=None):
- message = _("Manufacturing order has been canceled.")
- self.message_post(cr, uid, ids, body=message, context=context)
- return True
-
- def action_ready_send_note(self, cr, uid, ids, context=None):
- message = _("Manufacturing order is ready to produce.")
- self.message_post(cr, uid, ids, body=message, context=context)
- return True
-
- def action_in_production_send_note(self, cr, uid, ids, context=None):
- message = _("Manufacturing order is in production.")
- self.message_post(cr, uid, ids, body=message, context=context)
- return True
-
- def action_done_send_note(self, cr, uid, ids, context=None):
- message = _("Manufacturing order has been done.")
- self.message_post(cr, uid, ids, body=message, context=context)
- return True
-
def action_confirm_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
# convert datetime field to a datetime, using server format, then