[fix] Sales order link to purchase order not working fixed

This commit is contained in:
Vishal 2018-01-24 16:46:18 +05:30 committed by vishdha
parent e37e5d6134
commit 4dc329f5ea
2 changed files with 5 additions and 4 deletions

View File

@ -240,7 +240,8 @@ def make_purchase_order(source_name, target_doc=None):
["name", "material_request_item"],
["parent", "material_request"],
["uom", "stock_uom"],
["uom", "uom"]
["uom", "uom"],
["sales_order", "sales_order"]
],
"postprocess": update_item,
"condition": lambda doc: doc.ordered_qty < doc.stock_qty

View File

@ -472,8 +472,8 @@ def get_projected_qty(item_code, warehouse):
@frappe.whitelist()
def get_bin_details(item_code, warehouse):
return frappe.db.get_value("Bin", {"item_code": item_code, "warehouse": warehouse},
["projected_qty", "actual_qty"], as_dict=True) \
or {"projected_qty": 0, "actual_qty": 0}
["projected_qty", "actual_qty", "ordered_qty"], as_dict=True) \
or {"projected_qty": 0, "actual_qty": 0, "ordered_qty": 0}
@frappe.whitelist()
def get_serial_no_details(item_code, warehouse, stock_qty, serial_no):