mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 23:19:20 +00:00
[merge] merged with master
This commit is contained in:
@@ -4,5 +4,7 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.delete_doc("DocType", "Sales and Purchase Return Item")
|
||||
webnotes.delete_doc("DocType", "Sales and Purchase Return Tool")
|
||||
if webnotes.conn.exists("DocType", "Sales and Purchase Return Item"):
|
||||
webnotes.delete_doc("DocType", "Sales and Purchase Return Item")
|
||||
if webnotes.conn.exists("DocType", "Sales and Purchase Return Tool"):
|
||||
webnotes.delete_doc("DocType", "Sales and Purchase Return Tool")
|
||||
@@ -11,6 +11,7 @@ def execute():
|
||||
and docstatus=2""" % (entry['voucher_type'], "%s"), entry['voucher_no'])
|
||||
is_cancelled = docstatus and 'Yes' or None
|
||||
if is_cancelled:
|
||||
print entry['voucher_type'], entry['voucher_no']
|
||||
webnotes.conn.sql("""update `tabGL Entry` set is_cancelled = 'Yes'
|
||||
where voucher_type = %s and voucher_no = %s""",
|
||||
(entry['voucher_type'], entry['voucher_no']))
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("setup", "doctype", "item_price")
|
||||
|
||||
webnotes.conn.sql("""update `tabItem Price` ip, `tabItem` i
|
||||
set ip.item_name=i.item_name, ip.item_description=i.description
|
||||
where ip.item_code=i.name""")
|
||||
|
||||
webnotes.conn.sql("""update `tabItem Price` ip, `tabPrice List` pl
|
||||
set ip.price_list=pl.name, ip.currency=pl.currency,
|
||||
ip.buying_or_selling=pl.buying_or_selling
|
||||
where ip.parent=pl.name""")
|
||||
|
||||
webnotes.conn.sql("""update `tabItem Price`
|
||||
set parent=null, parenttype=null, parentfield=null, idx=null""")
|
||||
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
def execute():
|
||||
from patches.march_2013 import p06_remove_sales_purchase_return_tool
|
||||
p06_remove_sales_purchase_return_tool.execute()
|
||||
9
patches/october_2013/p04_update_report_permission.py
Normal file
9
patches/october_2013/p04_update_report_permission.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.conn.sql("""update tabDocPerm set `create`=1 where
|
||||
parent='Report'
|
||||
and role in ('Administrator', 'Report Manager', 'System Manager')""")
|
||||
@@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
def execute():
|
||||
import webnotes
|
||||
entries = webnotes.conn.sql("""select voucher_type, voucher_no
|
||||
from `tabGL Entry` group by voucher_type, voucher_no""", as_dict=1)
|
||||
for entry in entries:
|
||||
try:
|
||||
cancelled_voucher = webnotes.conn.sql("""select name from `tab%s` where name = %s
|
||||
and docstatus=2""" % (entry['voucher_type'], "%s"), entry['voucher_no'])
|
||||
if cancelled_voucher:
|
||||
webnotes.conn.sql("""delete from `tabGL Entry` where voucher_type = %s and
|
||||
voucher_no = %s""", (entry['voucher_type'], entry['voucher_no']))
|
||||
except:
|
||||
pass
|
||||
@@ -229,4 +229,9 @@ patch_list = [
|
||||
"patches.october_2013.p06_rename_packing_list_doctype",
|
||||
"execute:webnotes.delete_doc('DocType', 'Sales Common')",
|
||||
"patches.october_2013.p09_update_naming_series_settings",
|
||||
"patches.october_2013.p02_update_price_list_and_item_details_in_item_price",
|
||||
"execute:webnotes.delete_doc('Report', 'Item-wise Price List')",
|
||||
"patches.october_2013.p03_remove_sales_and_purchase_return_tool",
|
||||
"patches.october_2013.p04_update_report_permission",
|
||||
"patches.october_2013.p05_delete_gl_entries_for_cancelled_vouchers",
|
||||
]
|
||||
Reference in New Issue
Block a user