mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
[minor] fixed conflict while merging with master
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user