Merge branch 'hotfix'

This commit is contained in:
Nabin Hait 2018-02-22 18:10:37 +05:30
commit 00330f52bd
3 changed files with 5 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides from erpnext.hooks import regional_overrides
from frappe.utils import getdate from frappe.utils import getdate
__version__ = '10.1.0' __version__ = '10.1.1'
def get_default_company(user=None): def get_default_company(user=None):
'''Get default company for user''' '''Get default company for user'''

View File

@ -14,5 +14,6 @@ def execute():
where fieldname = 'reason_for_issuing_document' where fieldname = 'reason_for_issuing_document'
""") """)
frappe.db.sql("""delete from `tabCustom Field` where dt = 'Purchase Invoice' for doctype in ["Sales Invoice", "Delivery Note", "Purchase Invoice"]:
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""") frappe.db.sql("""delete from `tabCustom Field` where dt = %s
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""", doctype)

View File

@ -28,9 +28,6 @@ def get_qty_in_stock(item_code, item_warehouse_field, warehouse=None):
if stock_qty: if stock_qty:
in_stock = stock_qty[0][0] > 0 and 1 or 0 in_stock = stock_qty[0][0] > 0 and 1 or 0
if stock_qty:
in_stock = stock_qty[0][0] > 0 and 1 or 0
return frappe._dict({"in_stock": in_stock, "stock_qty": stock_qty, "is_stock_item": is_stock_item}) return frappe._dict({"in_stock": in_stock, "stock_qty": stock_qty, "is_stock_item": is_stock_item})