Merge remote-tracking branch 'frappe/v4.x.x' into develop

Conflicts:
	.travis.yml
	erpnext/__version__.py
	erpnext/controllers/queries.py
	erpnext/hooks.py
	erpnext/selling/sales_common.js
	erpnext/stock/doctype/bin/bin.py
	erpnext/stock/doctype/stock_entry/stock_entry.js
	erpnext/stock/doctype/stock_entry/stock_entry.py
	erpnext/stock/stock_ledger.py
	setup.py
This commit is contained in:
Anand Doshi
2015-04-06 12:59:34 +05:30
14 changed files with 105 additions and 121 deletions

View File

@@ -79,11 +79,11 @@ def get_bin(item_code, warehouse):
bin_obj.flags.ignore_permissions = True
return bin_obj
def update_bin(args, allow_negative_stock=False):
def update_bin(args, allow_negative_stock=False, via_landed_cost_voucher=False):
is_stock_item = frappe.db.get_value('Item', args.get("item_code"), 'is_stock_item')
if is_stock_item == 'Yes':
bin = get_bin(args.get("item_code"), args.get("warehouse"))
bin.update_stock(args, allow_negative_stock)
bin.update_stock(args, allow_negative_stock, via_landed_cost_voucher)
return bin
else:
frappe.msgprint(_("Item {0} ignored since it is not a stock item").format(args.get("item_code")))