[IMP] Improved warning messages for stock module
bzr revid: pso@tinyerp.com-20120725101428-musq8jyoxpon55pm
This commit is contained in:
committed by
pso (OpenERP)
parent
78c6d6e5c6
commit
c7b3b8665d
+26
-26
@@ -213,7 +213,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/stock.py:2516
|
||||
#, python-format
|
||||
msgid "Missing partial picking data for move #%s"
|
||||
msgid "Missing partial picking data for move #%s."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -313,7 +313,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/stock.py:1149
|
||||
#, python-format
|
||||
msgid "You cannot cancel picking because stock move is in done state !"
|
||||
msgid "You cannot cancel picking because stock move is in done state!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -533,8 +533,8 @@ msgstr ""
|
||||
#: code:addons/stock/stock.py:2125
|
||||
#, python-format
|
||||
msgid ""
|
||||
"No stock output account defined for this product or its category: "
|
||||
"\"%s\" (id: %d)"
|
||||
"Please define stock output account for this product or its category: "
|
||||
"\"%s\" (id: %d)."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -675,8 +675,8 @@ msgstr ""
|
||||
#: code:addons/stock/stock.py:2131
|
||||
#, python-format
|
||||
msgid ""
|
||||
"No inventory Valuation account defined on the product category: \"%s"
|
||||
"\" (id: %d)"
|
||||
"Please define inventory Valuation account on the product category: \"%s"
|
||||
"\" (id: %d)."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -699,7 +699,7 @@ msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: constraint:stock.move:0
|
||||
msgid "You try to assign a lot which is not from the same product"
|
||||
msgid "You try to assign a lot which is not from the same product."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -1471,7 +1471,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/wizard/stock_invoice_onshipping.py:112
|
||||
#, python-format
|
||||
msgid "No Invoices were created."
|
||||
msgid "Please create Invoices."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -1755,7 +1755,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/stock.py:513
|
||||
#, python-format
|
||||
msgid "You cannot remove a lot line !"
|
||||
msgid "You cannot remove a lot line!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -1767,7 +1767,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/stock.py:1157
|
||||
#, python-format
|
||||
msgid "You cannot remove the picking which is in %s state !"
|
||||
msgid "You cannot remove the picking which is in %s state!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -1906,8 +1906,8 @@ msgstr ""
|
||||
#: code:addons/stock/stock.py:2122
|
||||
#, python-format
|
||||
msgid ""
|
||||
"No stock input account defined for this product or its category: "
|
||||
"\"%s\" (id: %d)"
|
||||
"Please define stock input account for this product or its category: "
|
||||
"\"%s\" (id: %d)."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -2253,7 +2253,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/stock.py:1697
|
||||
#, python-format
|
||||
msgid "Operation forbidden"
|
||||
msgid "Operation forbidden !"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -2451,7 +2451,7 @@ msgstr ""
|
||||
#: code:addons/stock/wizard/stock_change_product_qty.py:78
|
||||
#: code:addons/stock/wizard/stock_change_standard_price.py:107
|
||||
#, python-format
|
||||
msgid "Active ID is not set in Context"
|
||||
msgid "Active ID is not set in Context."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -2504,7 +2504,7 @@ msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: constraint:stock.move:0
|
||||
msgid "You can not move products from or to a location of the type view."
|
||||
msgid "You cannot move products from or to a location of the type view."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -2842,7 +2842,7 @@ msgstr ""
|
||||
#: code:addons/stock/stock.py:2379 code:addons/stock/stock.py:2440
|
||||
#: code:addons/stock/wizard/stock_partial_picking.py:141
|
||||
#, python-format
|
||||
msgid "Please provide Proper Quantity."
|
||||
msgid "Please provide proper quantity."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3033,8 +3033,8 @@ msgstr ""
|
||||
#: code:addons/stock/stock.py:1698
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Quantities, UoMs, Products and Locations cannot be modified on stock moves "
|
||||
"that have already been processed (except by the Administrator)"
|
||||
"Quantities, Unit of Measures, Products and Locations cannot be modified on stock moves "
|
||||
"that have already been processed (except by the Administrator)."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3118,7 +3118,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/stock.py:2311 code:addons/stock/stock.py:2726
|
||||
#, python-format
|
||||
msgid "UserError"
|
||||
msgid "UserError!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3227,7 +3227,7 @@ msgstr ""
|
||||
#: code:addons/stock/wizard/stock_partial_picking.py:148
|
||||
#: code:addons/stock/wizard/stock_partial_picking.py:159
|
||||
#, python-format
|
||||
msgid "Warning"
|
||||
msgid "Warning!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3623,7 +3623,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/product.py:100 code:addons/stock/stock.py:2128
|
||||
#, python-format
|
||||
msgid "No journal defined on the product category: \"%s\" (id: %d)"
|
||||
msgid "Please define journal on the product category: \"%s\" (id: %d)."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3676,7 +3676,7 @@ msgstr ""
|
||||
#: code:addons/stock/stock.py:1157
|
||||
#: code:addons/stock/wizard/stock_invoice_onshipping.py:112
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3739,7 +3739,7 @@ msgstr ""
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Total quantity after split exceeds the quantity to split for this product: "
|
||||
"\"%s\" (id: %d)"
|
||||
"\"%s\" (id: %d)."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3819,7 +3819,7 @@ msgstr ""
|
||||
#. module: stock
|
||||
#: code:addons/stock/wizard/stock_move.py:213
|
||||
#, python-format
|
||||
msgid "Processing Error"
|
||||
msgid "Processing Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3930,7 +3930,7 @@ msgstr ""
|
||||
#: code:addons/stock/wizard/stock_return_picking.py:106
|
||||
#: code:addons/stock/wizard/stock_return_picking.py:189
|
||||
#, python-format
|
||||
msgid "Warning !"
|
||||
msgid "Warning!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
@@ -3963,7 +3963,7 @@ msgstr ""
|
||||
#: code:addons/stock/wizard/stock_move.py:213
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Production lot quantity %d of %s is larger than available quantity (%d) !"
|
||||
"Production lot quantity %d of %s is larger than available quantity (%d)!"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
|
||||
+10
-10
@@ -1154,7 +1154,7 @@ class stock_picking(osv.osv):
|
||||
return True
|
||||
for move in pick.move_lines:
|
||||
if move.state == 'done':
|
||||
raise osv.except_osv(_('Error'), _('You cannot cancel picking because stock move is in done state !'))
|
||||
raise osv.except_osv(_('Error'), _('You cannot cancel picking because stock move is in done state!'))
|
||||
return True
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
move_obj = self.pool.get('stock.move')
|
||||
@@ -1162,7 +1162,7 @@ class stock_picking(osv.osv):
|
||||
context = {}
|
||||
for pick in self.browse(cr, uid, ids, context=context):
|
||||
if pick.state in ['done','cancel']:
|
||||
raise osv.except_osv(_('Error'), _('You cannot remove the picking which is in %s state !')%(pick.state,))
|
||||
raise osv.except_osv(_('Error'), _('You cannot remove the picking which is in %s state!')%(pick.state,))
|
||||
else:
|
||||
ids2 = [move.id for move in pick.move_lines]
|
||||
ctx = context.copy()
|
||||
@@ -1661,12 +1661,12 @@ class stock_move(osv.osv):
|
||||
|
||||
_constraints = [
|
||||
(_check_tracking,
|
||||
'You must assign a serial number for this product',
|
||||
'You must assign a serial number for this product.',
|
||||
['prodlot_id']),
|
||||
(_check_location, 'You can not move products from or to a location of the type view.',
|
||||
(_check_location, 'You cannot move products from or to a location of the type view.',
|
||||
['location_id','location_dest_id']),
|
||||
(_check_product_lot,
|
||||
'You try to assign a lot which is not from the same product',
|
||||
'You try to assign a lot which is not from the same product.',
|
||||
['prodlot_id'])]
|
||||
|
||||
def _default_location_destination(self, cr, uid, context=None):
|
||||
@@ -1747,8 +1747,8 @@ class stock_move(osv.osv):
|
||||
for move in self.browse(cr, uid, ids, context=context):
|
||||
if move.state == 'done':
|
||||
if frozen_fields.intersection(vals):
|
||||
raise osv.except_osv(_('Operation forbidden'),
|
||||
_('Quantities, Unit of Measures, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator)'))
|
||||
raise osv.except_osv(_('Operation forbidden !'),
|
||||
_('Quantities, Unit of Measures, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).'))
|
||||
return super(stock_move, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
@@ -2361,7 +2361,7 @@ class stock_move(osv.osv):
|
||||
ctx = context.copy()
|
||||
for move in self.browse(cr, uid, ids, context=context):
|
||||
if move.state != 'draft' and not ctx.get('call_unlink',False):
|
||||
raise osv.except_osv(_('UserError'),
|
||||
raise osv.except_osv(_('UserError!'),
|
||||
_('You can only delete draft moves.'))
|
||||
return super(stock_move, self).unlink(
|
||||
cr, uid, ids, context=ctx)
|
||||
@@ -2565,7 +2565,7 @@ class stock_move(osv.osv):
|
||||
if move.state in ('done', 'cancel'):
|
||||
continue
|
||||
partial_data = partial_datas.get('move%s'%(move.id), False)
|
||||
assert partial_data, _('Missing partial picking data for move #%s') % (move.id)
|
||||
assert partial_data, _('Missing partial picking data for move #%s.') % (move.id)
|
||||
product_qty = partial_data.get('product_qty',0.0)
|
||||
move_product_qty[move.id] = product_qty
|
||||
product_uom = partial_data.get('product_uom',False)
|
||||
@@ -2773,7 +2773,7 @@ class stock_inventory(osv.osv):
|
||||
account_move_data_l = account_move_obj.read(cr, uid, account_move_ids, ['state'], context=context)
|
||||
for account_move in account_move_data_l:
|
||||
if account_move['state'] == 'posted':
|
||||
raise osv.except_osv(_('UserError'),
|
||||
raise osv.except_osv(_('UserError!'),
|
||||
_('In order to cancel this inventory, you must first unpost related journal entries.'))
|
||||
account_move_obj.unlink(cr, uid, [account_move['id']], context=context)
|
||||
self.write(cr, uid, [inv.id], {'state': 'cancel'}, context=context)
|
||||
|
||||
@@ -104,7 +104,7 @@ class change_standard_price(osv.osv_memory):
|
||||
if context is None:
|
||||
context = {}
|
||||
rec_id = context and context.get('active_id', False)
|
||||
assert rec_id, _('Active ID is not set in Context')
|
||||
assert rec_id, _('Active ID is not set in Context.')
|
||||
prod_obj = self.pool.get('product.product')
|
||||
res = self.browse(cr, uid, ids, context=context)
|
||||
datas = {
|
||||
|
||||
@@ -53,7 +53,7 @@ class stock_inventory_line_split(osv.osv_memory):
|
||||
if context is None:
|
||||
context = {}
|
||||
assert context.get('active_model') == 'stock.inventory.line',\
|
||||
'Incorrect use of the inventory line split wizard'
|
||||
'Incorrect use of the inventory line split wizard.'
|
||||
prodlot_obj = self.pool.get('stock.production.lot')
|
||||
ir_sequence_obj = self.pool.get('ir.sequence')
|
||||
line_obj = self.pool.get('stock.inventory.line')
|
||||
|
||||
@@ -40,7 +40,7 @@ class stock_inventory_merge(osv.osv_memory):
|
||||
context={}
|
||||
res = super(stock_inventory_merge, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
|
||||
if context.get('active_model','') == 'stock.inventory' and len(context['active_ids']) < 2:
|
||||
raise osv.except_osv(_('Warning'),
|
||||
raise osv.except_osv(_('Warning!'),
|
||||
_('Please select multiple physical inventories to merge in the list view.'))
|
||||
return res
|
||||
|
||||
@@ -60,7 +60,7 @@ class stock_inventory_merge(osv.osv_memory):
|
||||
context = {}
|
||||
for inventory in invent_obj.browse(cr, uid, context['active_ids'], context=context):
|
||||
if inventory.state == "done":
|
||||
raise osv.except_osv(_('Warning'),
|
||||
raise osv.except_osv(_('Warning!'),
|
||||
_('Merging is only allowed on draft inventories.'))
|
||||
|
||||
for line in inventory.inventory_line_id:
|
||||
|
||||
@@ -93,9 +93,9 @@ class stock_invoice_onshipping(osv.osv_memory):
|
||||
if pick.invoice_state != '2binvoiced':
|
||||
count += 1
|
||||
if len(active_ids) == 1 and count:
|
||||
raise osv.except_osv(_('Warning !'), _('This picking list does not require invoicing.'))
|
||||
raise osv.except_osv(_('Warning!'), _('This picking list does not require invoicing.'))
|
||||
if len(active_ids) == count:
|
||||
raise osv.except_osv(_('Warning !'), _('None of these picking lists require invoicing.'))
|
||||
raise osv.except_osv(_('Warning!'), _('None of these picking lists require invoicing.'))
|
||||
return res
|
||||
|
||||
def open_invoice(self, cr, uid, ids, context=None):
|
||||
@@ -109,7 +109,7 @@ class stock_invoice_onshipping(osv.osv_memory):
|
||||
action_model = False
|
||||
action = {}
|
||||
if not invoice_ids:
|
||||
raise osv.except_osv(_('Error'), _('No Invoices were created.'))
|
||||
raise osv.except_osv(_('Error!'), _('Please create Invoices.'))
|
||||
if inv_type == "out_invoice":
|
||||
action_model,action_id = data_pool.get_object_reference(cr, uid, 'account', "action_invoice_tree1")
|
||||
elif inv_type == "in_invoice":
|
||||
|
||||
@@ -210,7 +210,7 @@ class split_in_production_lot(osv.osv_memory):
|
||||
quantity = line.quantity
|
||||
total_move_qty += quantity
|
||||
if total_move_qty > move_qty:
|
||||
raise osv.except_osv(_('Processing Error'), _('Serial number quantity %d of %s is larger than available quantity (%d) !') \
|
||||
raise osv.except_osv(_('Processing Error!'), _('Serial number quantity %d of %s is larger than available quantity (%d)!') \
|
||||
% (total_move_qty, move.product_id.name, move_qty))
|
||||
if quantity <= 0 or move_qty == 0:
|
||||
continue
|
||||
|
||||
@@ -60,7 +60,7 @@ class stock_partial_move(osv.osv_memory):
|
||||
|
||||
def do_partial(self, cr, uid, ids, context=None):
|
||||
# no call to super!
|
||||
assert len(ids) == 1, 'Partial move processing may only be done one form at a time'
|
||||
assert len(ids) == 1, 'Partial move processing may only be done one form at a time.'
|
||||
partial = self.browse(cr, uid, ids[0], context=context)
|
||||
partial_data = {
|
||||
'delivery_date' : partial.date
|
||||
|
||||
@@ -149,7 +149,7 @@ class stock_partial_picking(osv.osv_memory):
|
||||
return partial_move
|
||||
|
||||
def do_partial(self, cr, uid, ids, context=None):
|
||||
assert len(ids) == 1, 'Partial picking processing may only be done one at a time'
|
||||
assert len(ids) == 1, 'Partial picking processing may only be done one at a time.'
|
||||
stock_picking = self.pool.get('stock.picking')
|
||||
stock_move = self.pool.get('stock.move')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
@@ -164,14 +164,14 @@ class stock_partial_picking(osv.osv_memory):
|
||||
|
||||
#Quantiny must be Positive
|
||||
if wizard_line.quantity < 0:
|
||||
raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity.'))
|
||||
raise osv.except_osv(_('Warning!'), _('Please provide proper quantity.'))
|
||||
|
||||
#Compute the quantity for respective wizard_line in the line uom (this jsut do the rounding if necessary)
|
||||
qty_in_line_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, line_uom.id)
|
||||
|
||||
if line_uom.factor and line_uom.factor <> 0:
|
||||
if qty_in_line_uom <> wizard_line.quantity:
|
||||
raise osv.except_osv(_('Warning'), _('The unit of measure rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
|
||||
raise osv.except_osv(_('Warning!'), _('The unit of measure rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
|
||||
if move_id:
|
||||
#Check rounding Quantity.ex.
|
||||
#picking: 1kg, uom kg rounding = 0.01 (rounding to 10g),
|
||||
@@ -182,7 +182,7 @@ class stock_partial_picking(osv.osv_memory):
|
||||
qty_in_initial_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, initial_uom.id)
|
||||
without_rounding_qty = (wizard_line.quantity / line_uom.factor) * initial_uom.factor
|
||||
if qty_in_initial_uom <> without_rounding_qty:
|
||||
raise osv.except_osv(_('Warning'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name))
|
||||
raise osv.except_osv(_('Warning!'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name))
|
||||
else:
|
||||
seq_obj_name = 'stock.picking.' + picking_type
|
||||
move_id = stock_move.create(cr,uid,{'name' : self.pool.get('ir.sequence').get(cr, uid, seq_obj_name),
|
||||
|
||||
@@ -96,7 +96,7 @@ class stock_return_picking(osv.osv_memory):
|
||||
pick_obj = self.pool.get('stock.picking')
|
||||
pick = pick_obj.browse(cr, uid, record_id, context=context)
|
||||
if pick.state not in ['done','confirmed','assigned']:
|
||||
raise osv.except_osv(_('Warning !'), _("You may only return pickings that are Confirmed, Available or Done!"))
|
||||
raise osv.except_osv(_('Warning!'), _("You may only return pickings that are Confirmed, Available or Done!"))
|
||||
valid_lines = 0
|
||||
return_history = self.get_return_history(cr, uid, record_id, context)
|
||||
for m in pick.move_lines:
|
||||
|
||||
@@ -51,7 +51,7 @@ class stock_split_into(osv.osv_memory):
|
||||
# (move.product_id.name, move.product_id.id,))
|
||||
if quantity > move.product_qty:
|
||||
raise osv.except_osv(_('Error!'), _('Total quantity after split exceeds the quantity to split ' \
|
||||
'for this product: "%s" (id: %d)') % \
|
||||
'for this product: "%s" (id: %d).') % \
|
||||
(move.product_id.name, move.product_id.id,))
|
||||
if quantity > 0:
|
||||
move_obj.setlast_tracking(cr, uid, [move.id], context=context)
|
||||
|
||||
Reference in New Issue
Block a user