[minor] fixed conflict while merging with master

This commit is contained in:
Nabin Hait
2013-08-21 17:49:26 +05:30
19 changed files with 340 additions and 112 deletions

View File

@@ -145,6 +145,12 @@ def get_item_details(item):
def make_stock_entry(production_order_id, purpose):
production_order = webnotes.bean("Production Order", production_order_id)
# validate already existing
ste = webnotes.conn.get_value("Stock Entry", {
"production_order":production_order_id,
"purpose": purpose
}, "name")
stock_entry = webnotes.new_bean("Stock Entry")
stock_entry.doc.purpose = purpose
stock_entry.doc.production_order = production_order_id
@@ -158,5 +164,6 @@ def make_stock_entry(production_order_id, purpose):
else:
stock_entry.doc.from_warehouse = production_order.doc.wip_warehouse
stock_entry.doc.to_warehouse = production_order.doc.fg_warehouse
stock_entry.run_method("get_items")
return [d.fields for d in stock_entry.doclist]