[Delivery Note] Moved prevdoc to Sales Order and Sales Invoice so links will work webnotes/erpnext#868

This commit is contained in:
Rushabh Mehta
2013-10-03 12:22:52 +05:30
parent fa228e9c9b
commit f1b6f67a98
10 changed files with 85 additions and 75 deletions

View File

@@ -0,0 +1,12 @@
# 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.conn.sql("""update `tabDelivery Note Item` set against_sales_order=prevdoc_docname
where prevdoc_doctype='Sales Order' """)
webnotes.conn.sql("""update `tabDelivery Note Item` set against_sales_invoice=prevdoc_docname
where prevdoc_doctype='Sales Invoice' """)