mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
[minor] fixes to crm patch
This commit is contained in:
@@ -5,6 +5,7 @@ from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("stock", "doctype", "delivery_note_item")
|
||||
webnotes.conn.sql("""update `tabDelivery Note Item` set against_sales_order=prevdoc_docname
|
||||
where prevdoc_doctype='Sales Order' """)
|
||||
|
||||
|
||||
@@ -29,4 +29,19 @@ def execute():
|
||||
["Waiting for Customer", "Replied"],
|
||||
["To Reply", "Open"],
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
for dt, opts in change_map.items():
|
||||
for status in opts:
|
||||
webnotes.conn.sql("""update `tab%s` set status=%s where status=%s""" % \
|
||||
(dt, "%s", "%s"), (status[1], status[0]))
|
||||
|
||||
# for dt in ["Lead", "Opportunity"]:
|
||||
# for name in webnotes.conn.sql_list("""select name from `tab%s`""" % dt):
|
||||
# bean = webnotes.bean(dt, name)
|
||||
# before_status = bean.doc.status
|
||||
# bean.get_controller().set_status()
|
||||
#
|
||||
# if bean.doc.status != before_status:
|
||||
# webnotes.conn.sql("""update `tab%s` set status=%s where name=%s""" % (dt, "%s", "%s"),
|
||||
# (bean.doc.status, name))
|
||||
|
||||
Reference in New Issue
Block a user