update valuation and bin_aqat patch

This commit is contained in:
Nabin Hait 2011-09-16 14:32:23 +05:30
parent fd6a2c7c9e
commit 0b5f9b0475

View File

@ -1,7 +1,7 @@
# REMEMBER to update this
# ========================
last_patch = 365
last_patch = 366
#-------------------------------------------
@ -308,7 +308,7 @@ def execute(patch_no):
sql("update tabDocField set label='Produced Qty',description='Updated after finished goods are transferred to FG Warehouse through Stock Entry' where parent='Production Order' and fieldname='produced_qty'")
rs = sql("select fieldname from tabDocField where parent='Features Setup' and fieldname is not null")
from webnotes.model.doc import Document
m = Document('Features Setup', 'Features Setup')
m = Document('Features Setup')
for d in rs:
m.fields[d[0]] = 1
m.save()
@ -340,3 +340,9 @@ def execute(patch_no):
elif patch_no == 365:
from patches.delivery_billing_status_patch import run_patch
run_patch()
elif patch_no == 366:
bin = sql("select name from tabBin")
for b in bin:
bobj = get_obj('Bin',b[0])
prev_sle = bobj.get_prev_sle(posting_date = '2011-09-15', posting_time = '01:00')
bobj.update_item_valuation(posting_date = '2011-09-15', posting_time = '01:00', prev_sle = prev_sle)