brotherton-erpnext/erpnext/patches/july_2012/address_contact_perms.py

11 lines
304 B
Python
Raw Normal View History

2012-07-02 14:55:26 +00:00
def execute():
import webnotes
webnotes.conn.sql("""\
delete from `tabDocPerm`
where parent in ('Address', 'Contact')""")
webnotes.conn.commit()
import webnotes.model.sync
webnotes.model.sync.sync('utilities', 'address')
webnotes.model.sync.sync('utilities', 'contact')
webnotes.conn.begin()