[cleanup] [minor] deprecated cancelled stock ledger entry

This commit is contained in:
Nabin Hait
2013-08-20 12:04:46 +05:30
parent 05652874fc
commit 4ae729bfd2
17 changed files with 22 additions and 59 deletions

View File

@@ -0,0 +1,8 @@
import webnotes
def execute():
webnotes.reload_doc("stock", "doctype", "stock_ledger_entry")
webnotes.reload_doc("stock", "doctype", "serial_no")
webnotes.reload_doc("stock", "report", "stock_ledger")
webnotes.conn.sql("""delete from `tabStock Ledger Entry`
where ifnull(is_cancelled, 'No') = 'Yes'""")

View File

@@ -37,7 +37,7 @@ def execute():
limit 1
"""% (s, s, s, s, d['parent']), as_dict=1)
status = 'Not in Use'
status = 'Not Available'
if sle and flt(sle[0]['actual_qty']) > 0:
status = 'Available'
elif sle and flt(sle[0]['actual_qty']) < 0:

View File

@@ -258,4 +258,5 @@ patch_list = [
"patches.august_2013.p05_employee_birthdays",
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-08-16",
"execute:webnotes.delete_doc('DocType', 'Stock Ledger')",
"patches.august_2013.p06_deprecate_cancelled_sl_entry",
]