[buying] [manufacturing] Added new Reports and fixes for demo

This commit is contained in:
Rushabh Mehta
2013-08-20 15:18:42 +05:30
parent d8982d4af4
commit 20a109452a
12 changed files with 198 additions and 76 deletions

View File

@@ -143,6 +143,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