Minor improvements based on skip_transfer (#10457)

This commit is contained in:
Nabin Hait 2017-08-22 19:07:16 +05:30 committed by GitHub
parent 382f5eb1b1
commit 34c218b2de
4 changed files with 6 additions and 4 deletions

View File

@ -523,7 +523,8 @@ def set_production_order_ops(name):
@frappe.whitelist()
def make_stock_entry(production_order_id, purpose, qty=None):
production_order = frappe.get_doc("Production Order", production_order_id)
if not frappe.db.get_value("Warehouse", production_order.wip_warehouse, "is_group"):
if not frappe.db.get_value("Warehouse", production_order.wip_warehouse, "is_group") \
and not production_order.skip_transfer:
wip_warehouse = production_order.wip_warehouse
else:
wip_warehouse = None

View File

@ -229,6 +229,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:!parent.skip_transfer",
"fieldname": "transferred_qty",
"fieldtype": "Float",
"hidden": 0,
@ -353,7 +354,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-07-10 17:37:20.212361",
"modified": "2017-08-18 18:11:10.311736",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order Item",

View File

@ -556,7 +556,7 @@ class StockEntry(StockController):
item_dict = self.get_bom_raw_materials(self.fg_completed_qty)
for item in item_dict.values():
if self.pro_doc:
if self.pro_doc and not self.pro_doc.skip_transfer:
item["from_warehouse"] = self.pro_doc.wip_warehouse
item["to_warehouse"] = self.to_warehouse if self.purpose=="Subcontract" else ""