test case fixes

This commit is contained in:
Nabin Hait
2015-05-22 16:55:40 +05:30
parent 2eba53f763
commit fd4bcd855b
13 changed files with 37 additions and 43 deletions

View File

@@ -279,7 +279,7 @@ class BuyingController(StockController):
def set_qty_as_per_stock_uom(self):
for d in self.get("items"):
if d.meta.get_field("stock_qty") and not d.stock_qty:
if d.meta.get_field("stock_qty"):
if not d.conversion_factor:
frappe.throw(_("Row {0}: Conversion Factor is mandatory").format(d.idx))
d.stock_qty = flt(d.qty) * flt(d.conversion_factor)