mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
fix in setup control and patch to fix existing docstatus problem
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import webnotes
|
||||
def execute():
|
||||
webnotes.conn.sql("""update `tabCompany` set docstatus = 0
|
||||
where docstatus is null""")
|
||||
|
||||
webnotes.conn.sql("""update `tabFiscal Year` set docstatus = 0
|
||||
where docstatus is null""")
|
||||
6
patches/october_2012/remove_old_trial_bal.py
Normal file
6
patches/october_2012/remove_old_trial_bal.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
from webnotes.model import delete_doc
|
||||
|
||||
def execute():
|
||||
# remove search criteria
|
||||
delete_doc("Search Criteria", "trial_balance")
|
||||
14
patches/october_2012/update_account_property.py
Normal file
14
patches/october_2012/update_account_property.py
Normal file
@@ -0,0 +1,14 @@
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.utils.nestedset import rebuild_tree
|
||||
rebuild_tree('Account', 'parent_account')
|
||||
|
||||
roots = webnotes.conn.sql("""
|
||||
select lft, rgt, debit_or_credit, is_pl_account, company from `tabAccount`
|
||||
where ifnull(parent_account, '') = ''
|
||||
""", as_dict=1)
|
||||
|
||||
for acc in roots:
|
||||
webnotes.conn.sql("""update tabAccount set debit_or_credit = %(debit_or_credit)s,
|
||||
is_pl_account = %(is_pl_account)s, company = %(company)s
|
||||
where lft > %(lft)s and rgt < %(rgt)s""", acc, debug=1)
|
||||
Reference in New Issue
Block a user