[IMP]MRP : Warning Messages are changed

bzr revid: hsa@tinyerp.com-20120712064359-rfoj2ol3stj4j4yc
This commit is contained in:
Hardik 2012-07-12 12:13:59 +05:30
parent 6cbb04758a
commit d953d45de4
3 changed files with 5 additions and 5 deletions

View File

@ -620,7 +620,7 @@ class mrp_production(osv.osv):
self.write(cr, uid, [production.id], {'bom_id': bom_id, 'routing_id': routing_id})
if not bom_id:
raise osv.except_osv(_('Error'), _("Couldn't find a bill of material for this product."))
raise osv.except_osv(_('Error'), _("Cannot find a bill of material for this product."))
factor = uom_obj._compute_qty(cr, uid, production.product_uom.id, production.product_qty, bom_point.product_uom.id)
res = bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, properties, routing_id=production.routing_id.id)
results = res[0]
@ -643,7 +643,7 @@ class mrp_production(osv.osv):
for production in self.browse(cr, uid, ids, context=context):
if production.state == 'confirmed' and production.picking_id.state not in ('draft', 'cancel'):
raise osv.except_osv(
_('Could not cancel manufacturing order !'),
_('Cannot cancel manufacturing order.'),
_('You must first cancel related internal picking attached to this manufacturing order.'))
if production.move_created_ids:
move_obj.action_cancel(cr, uid, [x.id for x in production.move_created_ids])

View File

@ -80,12 +80,12 @@ class change_production_qty(osv.osv_memory):
if not bom_point:
bom_id = bom_obj._bom_find(cr, uid, prod.product_id.id, prod.product_uom.id)
if not bom_id:
raise osv.except_osv(_('Error'), _("Couldn't find bill of material for product"))
raise osv.except_osv(_('Error'), _("Cannot find bill of material for product."))
prod_obj.write(cr, uid, [prod.id], {'bom_id': bom_id})
bom_point = bom_obj.browse(cr, uid, [bom_id])[0]
if not bom_id:
raise osv.except_osv(_('Error'), _("Couldn't find bill of material for product"))
raise osv.except_osv(_('Error'), _("Cannot find bill of material for product."))
factor = prod.product_qty * prod.product_uom.factor / bom_point.product_uom.factor
res = bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, [])

View File

@ -513,7 +513,7 @@ class mrp_operations_operation(osv.osv):
code_lst.append(oper.code_id.start_stop)
if code.start_stop=='start':
if 'start' in code_lst:
raise osv.except_osv(_('Sorry!'),_('Operation has already started !' 'Youcan either Pause/Finish/Cancel the operation'))
raise osv.except_osv(_('Sorry!'),_('Operation has already started !' 'You can either Pause/Finish/Cancel the operation.'))
return False
if code.start_stop=='pause':
if code_lst[len(code_lst)-1]!='resume' and code_lst[len(code_lst)-1]!='start':