mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 02:31:21 +00:00
Merge branch '1310' of github.com:webnotes/erpnext
Conflicts: setup/doctype/setup_control/setup_control.py stock/doctype/stock_entry/stock_entry.py utilities/demo/demo_docs/Price_List.csv
This commit is contained in:
@@ -6,7 +6,7 @@ import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("selling", "doctype", "shopping_cart_price_list")
|
||||
webnotes.reload_doc("setup", "doctype", "item_price")
|
||||
webnotes.reload_doc("stock", "doctype", "item_price")
|
||||
|
||||
for t in [
|
||||
("Supplier Quotation", "price_list_name", "buying_price_list"),
|
||||
|
||||
@@ -7,8 +7,8 @@ from webnotes.utils import cint
|
||||
import MySQLdb
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("setup", "doctype", "price_list")
|
||||
webnotes.reload_doc("setup", "doctype", "item_price")
|
||||
webnotes.reload_doc("stock", "doctype", "price_list")
|
||||
webnotes.reload_doc("stock", "doctype", "item_price")
|
||||
|
||||
try:
|
||||
for price_list in webnotes.conn.sql_list("""select name from `tabPrice List`"""):
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("setup", "doctype", "for_territory")
|
||||
webnotes.reload_doc("setup", "doctype", "price_list")
|
||||
webnotes.reload_doc("setup", "doctype", "applicable_territory")
|
||||
webnotes.reload_doc("stock", "doctype", "price_list")
|
||||
webnotes.reload_doc("accounts", "doctype", "sales_taxes_and_charges_master")
|
||||
webnotes.reload_doc("accounts", "doctype", "shipping_rule")
|
||||
|
||||
@@ -14,12 +14,12 @@ def execute():
|
||||
|
||||
for parenttype in ["Sales Taxes and Charges Master", "Price List", "Shipping Rule"]:
|
||||
for name in webnotes.conn.sql_list("""select name from `tab%s` main
|
||||
where not exists (select parent from `tabFor Territory` territory
|
||||
where not exists (select parent from `tabApplicable Territory` territory
|
||||
where territory.parenttype=%s and territory.parent=main.name)""" % \
|
||||
(parenttype, "%s"), (parenttype,)):
|
||||
|
||||
doc = webnotes.doc({
|
||||
"doctype": "For Territory",
|
||||
"doctype": "Applicable Territory",
|
||||
"__islocal": 1,
|
||||
"parenttype": parenttype,
|
||||
"parentfield": "valid_for_territories",
|
||||
|
||||
@@ -5,7 +5,7 @@ from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("setup", "doctype", "item_price")
|
||||
webnotes.reload_doc("stock", "doctype", "item_price")
|
||||
|
||||
webnotes.conn.sql("""update `tabItem Price` ip, `tabItem` i
|
||||
set ip.item_name=i.item_name, ip.item_description=i.description
|
||||
|
||||
23
patches/october_2013/p07_rename_for_territory.py
Normal file
23
patches/october_2013/p07_rename_for_territory.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes, os
|
||||
|
||||
def execute():
|
||||
from webnotes.utils import get_base_path
|
||||
webnotes.reload_doc("core", "doctype", "doctype")
|
||||
|
||||
tables = webnotes.conn.sql_list("show tables")
|
||||
|
||||
if "tabApplicable Territory" not in tables:
|
||||
webnotes.rename_doc("DocType", "For Territory", "Applicable Territory", force=True)
|
||||
|
||||
webnotes.reload_doc("setup", "doctype", "applicable_territory")
|
||||
|
||||
path = os.path.join(get_base_path(), "app", "setup", "doctype", "for_territory")
|
||||
if os.path.exists(path):
|
||||
os.system("rm -rf {path}".format(path=path))
|
||||
|
||||
if webnotes.conn.exists("DocType", "For Territory"):
|
||||
webnotes.delete_doc("DocType", "For Territory")
|
||||
@@ -161,7 +161,6 @@ patch_list = [
|
||||
"execute:webnotes.delete_doc('Report', 'Sales Orders Pending To Be Delivered')",
|
||||
"patches.june_2013.p05_remove_unused_doctypes",
|
||||
"patches.june_2013.p06_drop_unused_tables",
|
||||
"patches.june_2013.p07_taxes_price_list_for_territory",
|
||||
"patches.june_2013.p08_shopping_cart_settings",
|
||||
"patches.june_2013.p09_update_global_defaults",
|
||||
"patches.june_2013.p10_lead_address",
|
||||
@@ -235,4 +234,6 @@ patch_list = [
|
||||
"patches.october_2013.p04_update_report_permission",
|
||||
"patches.october_2013.p05_delete_gl_entries_for_cancelled_vouchers",
|
||||
"patches.october_2013.p06_update_control_panel_and_global_defaults",
|
||||
"patches.october_2013.p07_rename_for_territory",
|
||||
"patches.june_2013.p07_taxes_price_list_for_territory",
|
||||
]
|
||||
@@ -5,8 +5,8 @@ from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("setup", "doctype", "price_list")
|
||||
webnotes.reload_doc("setup", "doctype", "item_price")
|
||||
webnotes.reload_doc("stock", "doctype", "price_list")
|
||||
webnotes.reload_doc("stock", "doctype", "item_price")
|
||||
webnotes.reload_doc("stock", "doctype", "item")
|
||||
|
||||
webnotes.conn.sql("""update `tabItem Price` set parenttype='Price List',
|
||||
|
||||
Reference in New Issue
Block a user