mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 23:19:20 +00:00
moved directory structure
This commit is contained in:
1
patches/april_2012/__init__.py
Normal file
1
patches/april_2012/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from __future__ import unicode_literals
|
||||
6
patches/april_2012/after_sync_cleanup.py
Normal file
6
patches/april_2012/after_sync_cleanup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model import delete_doc
|
||||
webnotes.conn.sql("update `tabDocType` set module = 'Utilities' where name in ('Question', 'Answer')")
|
||||
delete_doc('Module Def', 'Knowledge Base')
|
||||
6
patches/april_2012/change_cacheitem_schema.py
Normal file
6
patches/april_2012/change_cacheitem_schema.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
webnotes.conn.commit()
|
||||
webnotes.conn.sql("alter table __CacheItem modify `value` longtext")
|
||||
webnotes.conn.begin()
|
||||
7
patches/april_2012/delete_about_contact.py
Normal file
7
patches/april_2012/delete_about_contact.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model import delete_doc
|
||||
delete_doc('DocType', 'About Us Team')
|
||||
delete_doc('DocType', 'About Us Settings')
|
||||
delete_doc('DocType', 'Contact Us Settings')
|
||||
13
patches/april_2012/naming_series_patch.py
Normal file
13
patches/april_2012/naming_series_patch.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model.code import get_obj
|
||||
ns_list = webnotes.conn.sql("""\
|
||||
SELECT `tabDocField`.`parent`, `tabDocField`.`options`
|
||||
FROM `tabDocField`, `tabDocType`
|
||||
WHERE `tabDocField`.`fieldname` = 'naming_series'
|
||||
AND `tabDocType`.name=`tabDocField`.parent""")
|
||||
ns_obj = get_obj('Naming Series')
|
||||
for ns in ns_list:
|
||||
if ns[0] and isinstance(ns[1], basestring):
|
||||
ns_obj.set_series_for(ns[0], ns[1].split("\n"))
|
||||
5
patches/april_2012/reload_c_form.py
Normal file
5
patches/april_2012/reload_c_form.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.modules import reload_doc
|
||||
reload_doc('accounts', 'doctype', 'c_form')
|
||||
4
patches/april_2012/remove_default_from_rv_detail.py
Normal file
4
patches/april_2012/remove_default_from_rv_detail.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
webnotes.conn.sql("update `tabDocField` set `default` = '' where fieldname = 'cost_center' and parent = 'RV Detail' and `default` = 'Purchase - TC'")
|
||||
10
patches/april_2012/repost_stock_for_posting_time.py
Normal file
10
patches/april_2012/repost_stock_for_posting_time.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model.code import get_obj
|
||||
|
||||
bins = webnotes.conn.sql("select distinct t2.name from `tabStock Ledger Entry` t1, tabBin t2 where t1.posting_time > '00:00:00' and t1.posting_time < '00:01:00' and t1.item_code = t2.item_code and t1.warehouse = t2.warehouse")
|
||||
webnotes.conn.sql("update `tabStock Ledger Entry` set posting_time = '00:00:00' where posting_time > '00:00:00' and posting_time < '00:01:00'")
|
||||
|
||||
for d in bins:
|
||||
get_obj('Bin', d[0]).update_entries_after(posting_date = '2000-01-01', posting_time = '12:01')
|
||||
7
patches/april_2012/serial_no_fixes.py
Normal file
7
patches/april_2012/serial_no_fixes.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.modules import reload_doc
|
||||
reload_doc('stock', 'doctype', 'serial_no')
|
||||
|
||||
webnotes.conn.sql("update `tabSerial No` set sle_exists = 1")
|
||||
15
patches/april_2012/update_appraisal_permission.py
Normal file
15
patches/april_2012/update_appraisal_permission.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model.doc import addchild
|
||||
from webnotes.model.code import get_obj
|
||||
|
||||
webnotes.conn.sql("delete from `tabDocPerm` where role = 'All' and permlevel = 0 and parent in ('Appraisal', 'Ticket', 'Project')")
|
||||
|
||||
appr = get_obj('DocType', 'Appraisal', with_children=1)
|
||||
ch = addchild(appr.doc, 'permissions', 'DocPerm', 0)
|
||||
ch.permlevel = 0
|
||||
ch.role = 'Employee'
|
||||
ch.read = 1
|
||||
ch.write = 1
|
||||
ch.save()
|
||||
4
patches/april_2012/update_permlevel_in_address.py
Normal file
4
patches/april_2012/update_permlevel_in_address.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
webnotes.conn.sql("update `tabDocPerm` set permlevel = 0 where parent = 'Address'")
|
||||
22
patches/april_2012/update_role_in_address.py
Normal file
22
patches/april_2012/update_role_in_address.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model.doc import addchild
|
||||
from webnotes.model.code import get_obj
|
||||
|
||||
webnotes.conn.sql("delete from `tabDocPerm` where role = 'All' and parent = 'Address'")
|
||||
|
||||
role1 = ['Sales User', 'Purchase User', 'Accounts User', 'Maintenance User']
|
||||
role2 = ['Sales Manager', 'Sales Master Manager', 'Purchase Manager', 'Purchase Master Manager', 'Accounts Manager', 'Maintenance Manager']
|
||||
|
||||
addr = get_obj('DocType', 'Address', with_children=1)
|
||||
for d in role1+role2:
|
||||
ch = addchild(addr.doc, 'permissions', 'DocPerm', 0)
|
||||
ch.role = d
|
||||
ch.read = 1
|
||||
ch.write = 1
|
||||
ch.create = 1
|
||||
if d in role2:
|
||||
ch.cancel = 1
|
||||
|
||||
ch.save()
|
||||
Reference in New Issue
Block a user