[IMP] Improved warning messages for stock module
authorpso (OpenERP) <pso@tinyerp.com>
Wed, 25 Jul 2012 10:30:41 +0000 (16:00 +0530)
committerpso (OpenERP) <pso@tinyerp.com>
Wed, 25 Jul 2012 10:30:41 +0000 (16:00 +0530)
bzr revid: pso@tinyerp.com-20120725103041-2ndjekods10xmhg8

addons/stock/i18n/stock.pot
addons/stock/product.py
addons/stock/stock.py

index 0b00861..6e75333 100644 (file)
@@ -792,7 +792,7 @@ msgstr ""
 #. module: stock
 #: code:addons/stock/product.py:75
 #, python-format
-msgid "Specify valuation Account for Product Category: %s"
+msgid "Specify valuation Account for Product Category: %s."
 msgstr ""
 
 #. module: stock
@@ -1043,7 +1043,7 @@ msgstr ""
 #: code:addons/stock/product.py:147
 #, python-format
 msgid ""
-"Define stock output account for this product: \"%s\" (id: %d)"
+"Please define stock output account for this product: \"%s\" (id: %d)."
 msgstr ""
 
 #. module: stock
@@ -2548,7 +2548,7 @@ msgstr ""
 #: code:addons/stock/product.py:121
 #, python-format
 msgid ""
-"Define stock input account for this product: \"%s\" (id: %d)"
+"Please define stock input account for this product: \"%s\" (id: %d)."
 msgstr ""
 
 #. module: stock
index a89754e..e0e5559 100644 (file)
@@ -93,7 +93,7 @@ class product_product(osv.osv):
         product_obj=self.browse(cr, uid, ids, context=context)[0]
         account_valuation = product_obj.categ_id.property_stock_valuation_account_id
         account_valuation_id = account_valuation and account_valuation.id or False
-        if not account_valuation_id: raise osv.except_osv(_('Error!'), _('Specify valuation Account for Product Category: %s') % (product_obj.categ_id.name))
+        if not account_valuation_id: raise osv.except_osv(_('Error!'), _('Specify valuation Account for Product Category: %s.') % (product_obj.categ_id.name))
         move_ids = []
         loc_ids = location_obj.search(cr, uid,[('usage','=','internal')])
         for rec_id in ids:
@@ -110,7 +110,7 @@ class product_product(osv.osv):
                 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!'), _('Specify company in Location.'))
+                    if not company_id: raise osv.except_osv(_('Error!'), _('Please specify company 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!'),
-                            _('Define journal '\
-                              'on the product category: "%s" (id: %d)') % \
+                            _('Please define journal '\
+                              'on the product category: "%s" (id: %d).') % \
                                 (product.categ_id.name,
                                     product.categ_id.id,))
                     move_id = move_obj.create(cr, uid, {
@@ -139,8 +139,8 @@ class product_product(osv.osv):
                                     property_stock_account_input_categ.id
                         if not stock_input_acc:
                             raise osv.except_osv(_('Error!'),
-                                    _('Define stock input account ' \
-                                            'for this product: "%s" (id: %d)') % \
+                                    _('Please define stock input account ' \
+                                            'for this product: "%s" (id: %d).') % \
                                             (product.name,
                                                 product.id,))
                         amount_diff = qty * diff
@@ -165,8 +165,8 @@ class product_product(osv.osv):
                                     property_stock_account_output_categ.id
                         if not stock_output_acc:
                             raise osv.except_osv(_('Error!'),
-                                    _('Define stock output account ' \
-                                            'for this product: "%s" (id: %d)') % \
+                                    _('Please define stock output account ' \
+                                            'for this product: "%s" (id: %d).') % \
                                             (product.name,
                                                 product.id,))
                         amount_diff = qty * -diff
index 7bd4703..51309f6 100644 (file)
@@ -2172,16 +2172,16 @@ class stock_move(osv.osv):
             raise osv.except_osv(_('Error!'),  _('Cannot create Journal Entry, Input Account of this product and Valuation account on category of this product are same.'))
 
         if not acc_src:
-            raise osv.except_osv(_('Error!'),  _('Define stock input account for this product or its category: "%s" (id: %d)') % \
+            raise osv.except_osv(_('Error!'),  _('Please define stock input account 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!'),  _('Define stock output account for this product or its category: "%s" (id: %d)') % \
+            raise osv.except_osv(_('Error!'),  _('Please define stock output account 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!'), _('Define journal on the product category: "%s" (id: %d)') % \
+            raise osv.except_osv(_('Error!'), _('Please define journal 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!'), _('Define inventory valuation account on the product category: "%s" (id: %d)') % \
+            raise osv.except_osv(_('Error!'), _('Please define inventory valuation account 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