[FIX] Improved Language of notifications(present perfect simple with passive form) and unnecessary code is removed.
bzr revid: bth@tinyerp.com-20120312102612-rrk1b7xpd132cs87
This commit is contained in:
+5
-9
@@ -369,7 +369,7 @@ class mrp_bom(osv.osv):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
for prod in prod_obj.browse(cr, uid, [obj.product_id], context=context):
|
||||
self.message_append_note(cr, uid, ids, _('System notification'),
|
||||
_("Bill of Material is <b>Created</b> for <em>%s</em> product.") % (prod.id.name_template), type='notification', context=context)
|
||||
_("Bill of Material has been <b>Created</b> for <em>%s</em> product.") % (prod.id.name_template), type='notification', context=context)
|
||||
return True
|
||||
|
||||
mrp_bom()
|
||||
@@ -535,15 +535,11 @@ class mrp_production(osv.osv):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.user_id.id :
|
||||
self.message_subscribe(cr, uid, ids, [obj.user_id.id], context=context)
|
||||
self.message_append_note(cr, uid, ids, _('System notification'),
|
||||
_("Manufacturing Order is <b>Created</b>."), type='notification', context=context)
|
||||
else :
|
||||
self.message_append_note(cr, uid, ids, _('System notification'),
|
||||
_("Manufacturing Order is <b>Created</b>."), type='notification', context=context)
|
||||
obj.message_append_note('',_("Manufacturing Order has been <b>Created</b>."))
|
||||
return True
|
||||
|
||||
def cancel_notification(self, cr, uid, ids, context=None):
|
||||
message = _("Manufacturing order is <b>cancelled</b>.")
|
||||
message = _("Manufacturing order has been <b>cancelled</b>.")
|
||||
self.message_append_note(cr, uid, ids, '', message, context=context)
|
||||
return True
|
||||
|
||||
@@ -558,12 +554,12 @@ class mrp_production(osv.osv):
|
||||
return True
|
||||
|
||||
def done_notification(self, cr, uid, ids, context=None):
|
||||
message = _("Manufacturing order is <b>done</b>.")
|
||||
message = _("Manufacturing order has been <b>done</b>.")
|
||||
self.message_append_note(cr, uid, ids, '', message, context=context)
|
||||
return True
|
||||
|
||||
def waiting_notification(self, cr, uid, ids, context=None):
|
||||
message = _("Manufacturing order is <b>confirmed and waiting for goods</b>.")
|
||||
message = _("Manufacturing order has been <b>confirmed and waiting for goods</b>.")
|
||||
self.message_append_note(cr, uid, ids, '', message, context=context)
|
||||
return True
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
prod_obj = self.pool.get('mrp.production')
|
||||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work Order is <b>created</b> for <em>%s</em> production order.") % (prod.id.name)
|
||||
message = _("Work Order has been <b>created</b> for <em>%s</em> production order.") % (prod.id.name)
|
||||
self.message_append_note(cr, uid, ids, '', message)
|
||||
return True
|
||||
|
||||
@@ -168,7 +168,7 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
prod_obj = self.pool.get('mrp.production')
|
||||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work Order is <b>started</b> for <em>%s</em> production order.") % (prod.id.name)
|
||||
message = _("Work Order has been <b>started</b> for <em>%s</em> production order.") % (prod.id.name)
|
||||
self.message_append_note(cr, uid, ids, '', message)
|
||||
return True
|
||||
|
||||
@@ -176,7 +176,7 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
prod_obj = self.pool.get('mrp.production')
|
||||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work Order is <b>done</b> for <em>%s</em> production order.") % (prod.id.name)
|
||||
message = _("Work Order has been <b>done</b> for <em>%s</em> production order.") % (prod.id.name)
|
||||
self.message_append_note(cr, uid, ids, '', message)
|
||||
return True
|
||||
|
||||
@@ -192,8 +192,8 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
prod_obj = self.pool.get('mrp.production')
|
||||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work Order is <b>cancelled</b> for <em>%s</em> production order.") % (prod.id.name)
|
||||
self.message_append_note(cr, uid, ids, '', message)
|
||||
message = _("Work Order has been <b>cancelled</b> for <em>%s</em> production order.") % (prod.id.name)
|
||||
self.message_append_note(cr, uid, ids, '', message)
|
||||
return True
|
||||
|
||||
def action_draft(self, cr, uid, ids):
|
||||
|
||||
@@ -536,7 +536,7 @@ class product_product(osv.osv):
|
||||
def create_notification(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_append_note(cr, uid, ids, _('System notification'),
|
||||
_("Product is <b>Created</b>."), type='notification', context=context)
|
||||
_("Product has been <b>Created</b>."), type='notification', context=context)
|
||||
return True
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -114,7 +114,7 @@ class stock_change_product_qty(osv.osv_memory):
|
||||
for prod in prod_obj.browse(cr, uid, [data.product_id.id], context=context):
|
||||
for prod_temp in prod_temp_obj.browse(cr, uid, [prod.product_tmpl_id.id], context=context):
|
||||
for uom in uom_obj.browse(cr, uid, [prod_temp.uom_id.id], context=context):
|
||||
message = _("<b>Quantity is changed</b> to <em>%s %s </em> for <em>%s</em> location.") % (data.new_quantity,uom.name,location_name)
|
||||
message = _("<b>Quantity has been changed</b> to <em>%s %s </em> for <em>%s</em> location.") % (data.new_quantity,uom.name,location_name)
|
||||
prod_obj.message_append_note(cr, uid, [prod.id], '', message)
|
||||
|
||||
stock_change_product_qty()
|
||||
|
||||
Reference in New Issue
Block a user