Merge branch 'master' into develop
This commit is contained in:
commit
f327a58b7f
@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.2.2'
|
__version__ = '7.2.3'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -3,5 +3,13 @@ import frappe
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
stock_settings = frappe.get_doc('Stock Settings')
|
stock_settings = frappe.get_doc('Stock Settings')
|
||||||
|
|
||||||
|
if stock_settings.default_warehouse \
|
||||||
|
and not frappe.db.exists("Warehouse", stock_settings.default_warehouse):
|
||||||
|
stock_settings.default_warehouse = None
|
||||||
|
|
||||||
|
if stock_settings.stock_uom and not frappe.db.exists("UOM", stock_settings.stock_uom):
|
||||||
|
stock_settings.stock_uom = None
|
||||||
|
|
||||||
stock_settings.flags.ignore_mandatory = True
|
stock_settings.flags.ignore_mandatory = True
|
||||||
stock_settings.save()
|
stock_settings.save()
|
||||||
|
@ -267,7 +267,8 @@ def get_items(warehouse, posting_date, posting_time):
|
|||||||
items = frappe.get_list("Bin", fields=["item_code"], filters={"warehouse": warehouse}, as_list=1)
|
items = frappe.get_list("Bin", fields=["item_code"], filters={"warehouse": warehouse}, as_list=1)
|
||||||
|
|
||||||
items += frappe.get_list("Item", fields=["name"], filters= {"is_stock_item": 1, "has_serial_no": 0,
|
items += frappe.get_list("Item", fields=["name"], filters= {"is_stock_item": 1, "has_serial_no": 0,
|
||||||
"has_batch_no": 0, "has_variants": 0, "disabled": 0, "default_warehouse": warehouse}, as_list=1)
|
"has_batch_no": 0, "has_variants": 0, "disabled": 0, "default_warehouse": warehouse},
|
||||||
|
as_list=1)
|
||||||
|
|
||||||
res = []
|
res = []
|
||||||
for item in set(items):
|
for item in set(items):
|
||||||
@ -280,6 +281,7 @@ def get_items(warehouse, posting_date, posting_time):
|
|||||||
"item_code": item[0],
|
"item_code": item[0],
|
||||||
"warehouse": warehouse,
|
"warehouse": warehouse,
|
||||||
"qty": stock_bal[0],
|
"qty": stock_bal[0],
|
||||||
|
"item_name": frappe.db.get_value('Item', item[0], 'item_name'),
|
||||||
"valuation_rate": stock_bal[1],
|
"valuation_rate": stock_bal[1],
|
||||||
"current_qty": stock_bal[0],
|
"current_qty": stock_bal[0],
|
||||||
"current_valuation_rate": stock_bal[1]
|
"current_valuation_rate": stock_bal[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user