mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
[usability] item price moved to price list
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user