[IMP] Improved warning messages for mrp module
bzr revid: pso@tinyerp.com-20120725092548-x6oebojzhcdf1vce
This commit is contained in:
parent
238bbc539a
commit
8d606c994d
|
@ -668,7 +668,7 @@ msgstr ""
|
|||
#: code:addons/mrp/wizard/change_production_qty.py:78
|
||||
#: code:addons/mrp/wizard/change_production_qty.py:83
|
||||
#, python-format
|
||||
msgid "Cannot find bill of material for product."
|
||||
msgid "Cannot find bill of material for this product."
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp
|
||||
|
@ -791,7 +791,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: code:addons/mrp/mrp.py:626
|
||||
#, python-format
|
||||
msgid "Cannot cancel manufacturing order."
|
||||
msgid "Cannot cancel manufacturing order!"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp
|
||||
|
@ -819,7 +819,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: code:addons/mrp/mrp.py:503
|
||||
#, python-format
|
||||
msgid "Cannot delete a manufacturing order in state '%s'"
|
||||
msgid "Cannot delete a manufacturing order in state '%s'."
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp
|
||||
|
@ -1881,7 +1881,7 @@ msgstr ""
|
|||
#: code:addons/mrp/wizard/change_production_qty.py:78
|
||||
#: code:addons/mrp/wizard/change_production_qty.py:83
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp
|
||||
|
|
|
@ -520,7 +520,7 @@ class mrp_production(osv.osv):
|
|||
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'):
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete a manufacturing order in state \'%s\'') % production.state)
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete a manufacturing order in state \'%s\'.') % production.state)
|
||||
return super(mrp_production, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
|
@ -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'), _("Cannot 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(
|
||||
_('Cannot 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])
|
||||
|
|
|
@ -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'), _("Cannot find bill of material for product."))
|
||||
raise osv.except_osv(_('Error!'), _("Cannot find bill of material for this 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'), _("Cannot find bill of material for product."))
|
||||
raise osv.except_osv(_('Error!'), _("Cannot find bill of material for this 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, [])
|
||||
|
|
|
@ -61,7 +61,7 @@ class mrp_product_produce(osv.osv_memory):
|
|||
|
||||
def do_produce(self, cr, uid, ids, context=None):
|
||||
production_id = context.get('active_id', False)
|
||||
assert production_id, "Production Id should be specified in context as a Active ID"
|
||||
assert production_id, "Production Id should be specified in context as a Active ID."
|
||||
data = self.browse(cr, uid, ids[0], context=context)
|
||||
self.pool.get('mrp.production').action_produce(cr, uid, production_id,
|
||||
data.product_qty, data.mode, context=context)
|
||||
|
|
Loading…
Reference in New Issue