summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnael Closson <acl@openerp.com>2014-05-13 14:19:45 +0200
committerAnael Closson <acl@openerp.com>2014-05-13 14:19:45 +0200
commit5bc76f63e9efe02afc150fbbf122de018985b549 (patch)
treef77be23ebcd2f044a1e00c2ff1a257a3ded70ab9
parent11a9c2d409411029c9a69b38fe22d6091f189847 (diff)
[FIX] sale_stock: error message does not match chosen units when not enough stock.
-rw-r--r--addons/sale_stock/sale_stock.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py
index 6c1e4c58e6c..a1e8f511866 100644
--- a/addons/sale_stock/sale_stock.py
+++ b/addons/sale_stock/sale_stock.py
@@ -612,11 +612,11 @@ class sale_order_line(osv.osv):
warning_msgs = res_packing.get('warning') and res_packing['warning']['message'] or ''
compare_qty = float_compare(product_obj.virtual_available, qty, precision_rounding=uom2.rounding)
if (product_obj.type=='product') and int(compare_qty) == -1 \
- and (product_obj.procure_method=='make_to_stock'):
+ and (product_obj.procure_method=='make_to_stock'):
warn_msg = _('You plan to sell %.2f %s but you only have %.2f %s available !\nThe real stock is %.2f %s. (without reservations)') % \
- (qty, uom2 and uom2.name or product_obj.uom_id.name,
- max(0,product_obj.virtual_available), product_obj.uom_id.name,
- max(0,product_obj.qty_available), product_obj.uom_id.name)
+ (qty, uom2.name,
+ max(0,product_obj.virtual_available), uom2.name,
+ max(0,product_obj.qty_available), uom2.name)
warning_msgs += _("Not enough stock ! : ") + warn_msg + "\n\n"
#update of warning messages