From 3f6550a82bbd734f5c467a4c9aed2c44d3afdfa4 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Mon, 12 Mar 2012 15:56:12 +0530 Subject: [PATCH] [FIX] Improved Language of notifications(present perfect simple with passive form) and unnecessary code is removed. bzr revid: bth@tinyerp.com-20120312102612-rrk1b7xpd132cs87 --- addons/mrp/mrp.py | 14 +++++--------- addons/mrp_operations/mrp_operations.py | 10 +++++----- addons/product/product.py | 2 +- addons/stock/wizard/stock_change_product_qty.py | 2 +- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index bc104fabf86..7ea1229b808 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -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 Created for %s product.") % (prod.id.name_template), type='notification', context=context) + _("Bill of Material has been Created for %s 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 Created."), type='notification', context=context) - else : - self.message_append_note(cr, uid, ids, _('System notification'), - _("Manufacturing Order is Created."), type='notification', context=context) + obj.message_append_note('',_("Manufacturing Order has been Created.")) return True def cancel_notification(self, cr, uid, ids, context=None): - message = _("Manufacturing order is cancelled.") + message = _("Manufacturing order has been cancelled.") 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 done.") + message = _("Manufacturing order has been done.") 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 confirmed and waiting for goods.") + message = _("Manufacturing order has been confirmed and waiting for goods.") self.message_append_note(cr, uid, ids, '', message, context=context) return True diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 1c1841f8897..55f6b1a4e64 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -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 created for %s production order.") % (prod.id.name) + message = _("Work Order has been created for %s 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 started for %s production order.") % (prod.id.name) + message = _("Work Order has been started for %s 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 done for %s production order.") % (prod.id.name) + message = _("Work Order has been done for %s 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 cancelled for %s production order.") % (prod.id.name) - self.message_append_note(cr, uid, ids, '', message) + message = _("Work Order has been cancelled for %s production order.") % (prod.id.name) + self.message_append_note(cr, uid, ids, '', message) return True def action_draft(self, cr, uid, ids): diff --git a/addons/product/product.py b/addons/product/product.py index 00c3ce3b619..0266e5b0ee2 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -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 Created."), type='notification', context=context) + _("Product has been Created."), type='notification', context=context) return True def unlink(self, cr, uid, ids, context=None): diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py index 426a235e64e..c66d663a859 100644 --- a/addons/stock/wizard/stock_change_product_qty.py +++ b/addons/stock/wizard/stock_change_product_qty.py @@ -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 = _("Quantity is changed to %s %s for %s location.") % (data.new_quantity,uom.name,location_name) + message = _("Quantity has been changed to %s %s for %s location.") % (data.new_quantity,uom.name,location_name) prod_obj.message_append_note(cr, uid, [prod.id], '', message) stock_change_product_qty()