[usability] item price moved to price list

This commit is contained in:
Akhilesh Darjee
2013-09-11 13:05:24 +05:30
parent 881a47f5c7
commit db59ffb76d
32 changed files with 129 additions and 289 deletions

View File

@@ -6,7 +6,7 @@ from webnotes.utils import cint
def execute():
webnotes.reload_doc("setup", "doctype", "price_list")
webnotes.reload_doc("stock", "doctype", "item_price")
webnotes.reload_doc("setup", "doctype", "item_price")
for price_list in webnotes.conn.sql_list("""select name from `tabPrice List`"""):
buying, selling = False, False
@@ -15,7 +15,5 @@ def execute():
buying = buying or cint(b)
selling = selling or cint(s)
buying_or_selling = "Selling" if selling else "Buying"
buying_or_selling = "Buying" if buying else "Selling"
webnotes.conn.set_value("Price List", price_list, "buying_or_selling", buying_or_selling)
webnotes.conn.sql("""update `tabItem Price` set buying_or_selling=%s
where price_list_name=%s""", (buying_or_selling, price_list))