Hardik Sanchawat (OpenERP) has proposed merging 
lp:~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-stock-hsa
 into lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr.

Requested reviews:
  Kuldeep Joshi(OpenERP) (kjo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-stock-hsa/+merge/114809

Hello,

I update warning messages in stock module.

Thanks
-hsa
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-stock-hsa/+merge/114809
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr.
=== modified file 'stock/product.py'
--- stock/product.py	2012-07-09 13:40:24 +0000
+++ stock/product.py	2012-07-13 08:56:59 +0000
@@ -107,10 +107,10 @@
                 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 @@
                         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 @@
                                     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 @@
                                     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,))

=== modified file 'stock/stock.py'
--- stock/stock.py	2012-06-22 06:48:54 +0000
+++ stock/stock.py	2012-07-13 08:56:59 +0000
@@ -516,7 +516,7 @@
         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 @@
         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 @@
         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 @@
         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

=== modified file 'stock/wizard/stock_invoice_onshipping.py'
--- stock/wizard/stock_invoice_onshipping.py	2012-05-21 06:27:36 +0000
+++ stock/wizard/stock_invoice_onshipping.py	2012-07-13 08:56:59 +0000
@@ -109,7 +109,7 @@
         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":

=== modified file 'stock/wizard/stock_partial_picking.py'
--- stock/wizard/stock_partial_picking.py	2012-05-16 16:01:15 +0000
+++ stock/wizard/stock_partial_picking.py	2012-07-13 08:56:59 +0000
@@ -164,7 +164,7 @@
 
             #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)

=== modified file 'stock/wizard/stock_return_picking.py'
--- stock/wizard/stock_return_picking.py	2012-05-16 16:01:15 +0000
+++ stock/wizard/stock_return_picking.py	2012-07-13 08:56:59 +0000
@@ -103,7 +103,7 @@
                 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 @@
                 })
                 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)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to