From 5c52fa9785a762978b408ad9c07a35fea80484a3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 18 Jul 2016 14:40:14 +0530 Subject: [PATCH] [fix] variant error message --- erpnext/controllers/item_variant.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index 8294b64da9..ba1d2426cb 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -58,12 +58,13 @@ def validate_item_variant_attributes(item, args=None): is_incremental = remainder==0 or remainder==increment if not (is_in_range and is_incremental): - frappe.throw(_("Value for Attribute {0} must be within the range of {1} to {2} in the increments of {3} for Item {2}")\ - .format(attribute, from_range, to_range, increment, item.name), InvalidItemAttributeValueError) + frappe.throw(_("Value for Attribute {0} must be within the range of {1} to {2} in the increments of {3} for Item {4}")\ + .format(attribute, from_range, to_range, increment, item.name), + InvalidItemAttributeValueError, title=_('Invalid Attribute')) elif value not in attribute_values.get(attribute.lower(), []): frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values for Item {2}").format( - value, attribute, item.name), InvalidItemAttributeValueError) + value, attribute, item.name), InvalidItemAttributeValueError, title=_('Invalid Attribute')) def get_attribute_values(): if not frappe.flags.attribute_values: