[IMP]Stock : Warning Messages are changed

bzr revid: hsa@tinyerp.com-20120712062539-w4lbgg01rwbsyddv
This commit is contained in:
Hardik 2012-07-12 11:55:39 +05:30
parent 6cbb04758a
commit ffca1e887d
5 changed files with 19 additions and 19 deletions

View File

@ -107,10 +107,10 @@ class product_product(osv.osv):
product = self.browse(cr, uid, rec_id, context=c)
qty = product.qty_available
diff = product.standard_price - new_price
if not diff: raise osv.except_osv(_('Error!'), _("Could not find any difference between standard price and new price!"))
if not diff: raise osv.except_osv(_('Error!'), _("No difference between standard price and new price!"))
if qty:
company_id = location.company_id and location.company_id.id or False
if not company_id: raise osv.except_osv(_('Error!'), _('Company is not specified in Location'))
if not company_id: raise osv.except_osv(_('Error!'), _('Company is not specified in Location.'))
#
# Accounting Entries
#
@ -118,8 +118,8 @@ class product_product(osv.osv):
journal_id = product.categ_id.property_stock_journal and product.categ_id.property_stock_journal.id or False
if not journal_id:
raise osv.except_osv(_('Error!'),
_('There is no journal defined '\
'on the product category: "%s" (id: %d)') % \
_('No journal defined '\
'on the product category: "%s" (id: %d)') % \
(product.categ_id.name,
product.categ_id.id,))
move_id = move_obj.create(cr, uid, {
@ -139,7 +139,7 @@ class product_product(osv.osv):
property_stock_account_input_categ.id
if not stock_input_acc:
raise osv.except_osv(_('Error!'),
_('There is no stock input account defined ' \
_('No stock input account defined ' \
'for this product: "%s" (id: %d)') % \
(product.name,
product.id,))
@ -165,7 +165,7 @@ class product_product(osv.osv):
property_stock_account_output_categ.id
if not stock_output_acc:
raise osv.except_osv(_('Error!'),
_('There is no stock output account defined ' \
_('No stock output account defined ' \
'for this product: "%s" (id: %d)') % \
(product.name,
product.id,))

View File

@ -516,7 +516,7 @@ class stock_tracking(osv.osv):
return res
def unlink(self, cr, uid, ids, context=None):
raise osv.except_osv(_('Error'), _('You can not remove a lot line !'))
raise osv.except_osv(_('Error'), _('You cannot remove a lot line !'))
def action_traceability(self, cr, uid, ids, context={}):
""" It traces the information of a product
@ -762,7 +762,7 @@ class stock_picking(osv.osv):
wf_service = netsvc.LocalService("workflow")
for pick in self.browse(cr, uid, ids):
if not pick.move_lines:
raise osv.except_osv(_('Error !'),_('You can not process picking without stock moves'))
raise osv.except_osv(_('Error !'),_('You cannot process picking without stock moves.'))
wf_service.trg_validate(uid, 'stock.picking', pick.id,
'button_confirm', cr)
return True
@ -2166,22 +2166,22 @@ class stock_move(osv.osv):
journal_id = accounts['stock_journal']
if acc_dest == acc_valuation:
raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Output Account defined on this product and Valuation account on category of this product are same.'))
raise osv.except_osv(_('Error!'), _('Cannot create Journal Entry, Output Account defined on this product and Valuation account on category of this product are same.'))
if acc_src == acc_valuation:
raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Input Account defined on this product and Valuation account on category of this product are same.'))
raise osv.except_osv(_('Error!'), _('Cannot create Journal Entry, Input Account defined on this product and Valuation account on category of this product are same.'))
if not acc_src:
raise osv.except_osv(_('Error!'), _('There is no stock input account defined for this product or its category: "%s" (id: %d)') % \
raise osv.except_osv(_('Error!'), _('No stock input account defined for this product or its category: "%s" (id: %d)') % \
(move.product_id.name, move.product_id.id,))
if not acc_dest:
raise osv.except_osv(_('Error!'), _('There is no stock output account defined for this product or its category: "%s" (id: %d)') % \
raise osv.except_osv(_('Error!'), _('No stock output account defined for this product or its category: "%s" (id: %d)') % \
(move.product_id.name, move.product_id.id,))
if not journal_id:
raise osv.except_osv(_('Error!'), _('There is no journal defined on the product category: "%s" (id: %d)') % \
raise osv.except_osv(_('Error!'), _('No journal defined on the product category: "%s" (id: %d)') % \
(move.product_id.categ_id.name, move.product_id.categ_id.id,))
if not acc_valuation:
raise osv.except_osv(_('Error!'), _('There is no inventory Valuation account defined on the product category: "%s" (id: %d)') % \
raise osv.except_osv(_('Error!'), _('No inventory Valuation account defined on the product category: "%s" (id: %d)') % \
(move.product_id.categ_id.name, move.product_id.categ_id.id,))
return journal_id, acc_src, acc_dest, acc_valuation
@ -2497,7 +2497,7 @@ class stock_move(osv.osv):
for move in self.browse(cr, uid, ids, context=context):
move_qty = move.product_qty
if move_qty <= 0:
raise osv.except_osv(_('Error!'), _('Can not consume a move with negative or zero quantity !'))
raise osv.except_osv(_('Error!'), _('Cannot consume a move with negative or zero quantity !'))
quantity_rest = move.product_qty
quantity_rest -= quantity
uos_qty_rest = quantity_rest / move_qty * move.product_uos_qty

View File

@ -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'), _('No Invoices were created.'))
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":

View File

@ -164,7 +164,7 @@ 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)

View File

@ -103,7 +103,7 @@ class stock_return_picking(osv.osv_memory):
if m.product_qty * m.product_uom.factor > return_history[m.id]:
valid_lines += 1
if not valid_lines:
raise osv.except_osv(_('Warning !'), _("There are no products to return (only lines in Done state and not fully returned yet can be returned)!"))
raise osv.except_osv(_('Warning !'), _("No products to return (only lines in Done state and not fully returned yet can be returned)!"))
return res
def get_return_history(self, cr, uid, pick_id, context=None):
@ -195,7 +195,7 @@ class stock_return_picking(osv.osv_memory):
})
move_obj.write(cr, uid, [move.id], {'move_history_ids2':[(4,new_move)]}, context=context)
if not returned_lines:
raise osv.except_osv(_('Warning !'), _("Please specify at least one non-zero quantity!"))
raise osv.except_osv(_('Warning !'), _("Please specify at least one non-zero quantity."))
if set_invoice_state_to_none:
pick_obj.write(cr, uid, [pick.id], {'invoice_state':'none'}, context=context)