-m
This commit is contained in:
parent
39a3c03b62
commit
c313d662df
@ -219,7 +219,9 @@ class DocType:
|
|||||||
if args.get("warehouse"):
|
if args.get("warehouse"):
|
||||||
args["warehouse_type"] = webnotes.conn.get_value('Warehouse' , args["warehouse"],
|
args["warehouse_type"] = webnotes.conn.get_value('Warehouse' , args["warehouse"],
|
||||||
'warehouse_type')
|
'warehouse_type')
|
||||||
sle = webnotes.model_wrapper([args]).insert()
|
sle = webnotes.model_wrapper([args])
|
||||||
|
sle.ignore_permissions = 1
|
||||||
|
sle.insert()
|
||||||
return sle.doc.name
|
return sle.doc.name
|
||||||
|
|
||||||
def repost(self):
|
def repost(self):
|
||||||
|
@ -89,11 +89,13 @@ def update_entries_after(args, verbose=1):
|
|||||||
# update bin
|
# update bin
|
||||||
if not webnotes.conn.exists({"doctype": "Bin", "item_code": args["item_code"],
|
if not webnotes.conn.exists({"doctype": "Bin", "item_code": args["item_code"],
|
||||||
"warehouse": args["warehouse"]}):
|
"warehouse": args["warehouse"]}):
|
||||||
webnotes.model_wrapper([{
|
bin_wrapper = webnotes.model_wrapper([{
|
||||||
"doctype": "Bin",
|
"doctype": "Bin",
|
||||||
"item_code": args["item_code"],
|
"item_code": args["item_code"],
|
||||||
"warehouse": args["warehouse"],
|
"warehouse": args["warehouse"],
|
||||||
}]).insert()
|
}])
|
||||||
|
bin_wrapper.ignore_permissions = 1
|
||||||
|
bin_wrapper.insert()
|
||||||
|
|
||||||
webnotes.conn.sql("""update `tabBin` set valuation_rate=%s, actual_qty=%s,
|
webnotes.conn.sql("""update `tabBin` set valuation_rate=%s, actual_qty=%s,
|
||||||
stock_value=%s,
|
stock_value=%s,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user