brotherton-erpnext/erpnext/patches/may_2012/page_role_series_fix.py

6 lines
229 B
Python
Raw Normal View History

2012-05-11 05:41:46 +00:00
def execute():
import webnotes
sr = webnotes.conn.sql("select max(name) from `tabPage Role`")
if sr and sr[0][0].startswith('PR'):
2012-05-11 06:17:18 +00:00
webnotes.conn.sql("update tabSeries set current = %s where name = 'PR'", int(sr[0][0][2:]))