From ffca1e887de4e818cdac107a2a45a62455154230 Mon Sep 17 00:00:00 2001 From: Hardik Date: Thu, 12 Jul 2012 11:55:39 +0530 Subject: [PATCH 1/2] [IMP]Stock : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120712062539-w4lbgg01rwbsyddv --- addons/stock/product.py | 12 ++++++------ addons/stock/stock.py | 18 +++++++++--------- .../stock/wizard/stock_invoice_onshipping.py | 2 +- addons/stock/wizard/stock_partial_picking.py | 2 +- addons/stock/wizard/stock_return_picking.py | 4 ++-- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/addons/stock/product.py b/addons/stock/product.py index 62fdbb24ca2..d3566a7d1eb 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -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,)) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index a279b8bea6c..c06d1945dc6 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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 diff --git a/addons/stock/wizard/stock_invoice_onshipping.py b/addons/stock/wizard/stock_invoice_onshipping.py index 46c55311045..ca21cf7cee4 100644 --- a/addons/stock/wizard/stock_invoice_onshipping.py +++ b/addons/stock/wizard/stock_invoice_onshipping.py @@ -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": diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index dd91f20e8cf..05dde6a1b04 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -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) diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index 4c85ddcae85..8e37291a110 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -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) From b1d9f20ba3bb8a0de4faa3a52d4d2437f66b4176 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 16:41:54 +0530 Subject: [PATCH 2/2] [IMP]Stock(.pot) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713111154-0hzur5xo1dnwz01r --- addons/stock/i18n/stock.pot | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index 3832e3197c7..4ce55d4f9eb 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -344,7 +344,7 @@ msgstr "" #: code:addons/stock/stock.py:2119 #, python-format msgid "" -"Can not create Journal Entry, Input Account defined on this product and " +"Cannot create Journal Entry, Input Account defined on this product and " "Valuation account on category of this product are same." msgstr "" @@ -533,7 +533,7 @@ msgstr "" #: code:addons/stock/stock.py:2125 #, python-format msgid "" -"There is no stock output account defined for this product or its category: " +"No stock output account defined for this product or its category: " "\"%s\" (id: %d)" msgstr "" @@ -557,7 +557,7 @@ msgstr "" #. module: stock #: code:addons/stock/stock.py:760 #, python-format -msgid "You can not process picking without stock moves" +msgid "You cannot process picking without stock moves." msgstr "" #. module: stock @@ -675,7 +675,7 @@ msgstr "" #: code:addons/stock/stock.py:2131 #, python-format msgid "" -"There is no inventory Valuation account defined on the product category: \"%s" +"No inventory Valuation account defined on the product category: \"%s" "\" (id: %d)" msgstr "" @@ -1370,7 +1370,7 @@ msgstr "" #. module: stock #: code:addons/stock/product.py:92 #, python-format -msgid "Company is not specified in Location" +msgid "Company is not specified in Location." 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 "No Invoices were created." msgstr "" #. module: stock @@ -1755,7 +1755,7 @@ msgstr "" #. module: stock #: code:addons/stock/stock.py:513 #, python-format -msgid "You can not remove a lot line !" +msgid "You cannot remove a lot line !" msgstr "" #. module: stock @@ -1873,7 +1873,7 @@ msgstr "" #: code:addons/stock/stock.py:2116 #, python-format msgid "" -"Can not create Journal Entry, Output Account defined on this product and " +"Cannot create Journal Entry, Output Account defined on this product and " "Valuation account on category of this product are same." msgstr "" @@ -1906,7 +1906,7 @@ msgstr "" #: code:addons/stock/stock.py:2122 #, python-format msgid "" -"There is no stock input account defined for this product or its category: " +"No stock input account defined for this product or its category: " "\"%s\" (id: %d)" msgstr "" @@ -2138,7 +2138,7 @@ msgstr "" #. module: stock #: code:addons/stock/product.py:89 #, python-format -msgid "Could not find any difference between standard price and new price!" +msgid "No difference between standard price and new price!" msgstr "" #. module: stock @@ -2554,7 +2554,7 @@ msgstr "" #. module: stock #: code:addons/stock/stock.py:2445 #, python-format -msgid "Can not consume a move with negative or zero quantity !" +msgid "Cannot consume a move with negative or zero quantity !" 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 @@ -3578,7 +3578,7 @@ msgstr "" #. module: stock #: code:addons/stock/wizard/stock_return_picking.py:189 #, python-format -msgid "Please specify at least one non-zero quantity!" +msgid "Please specify at least one non-zero quantity." 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 "There is no journal defined on the product category: \"%s\" (id: %d)" +msgid "No journal defined on the product category: \"%s\" (id: %d)" msgstr "" #. module: stock