Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-11-28 11:01:35 +01:00
commit 84e3938bca

View File

@ -2,7 +2,8 @@ def execute():
import webnotes import webnotes
from webnotes.model.code import get_obj from webnotes.model.code import get_obj
sc_obj = get_obj("Sales Common") #sc_obj = get_obj("Sales Common")
from selling.doctype.sales_common import sales_common
si = webnotes.conn.sql("""select distinct si.name si = webnotes.conn.sql("""select distinct si.name
from `tabSales Invoice` si, `tabSales Invoice Item` si_item from `tabSales Invoice` si, `tabSales Invoice Item` si_item
@ -12,4 +13,5 @@ def execute():
and ifnull(si_item.sales_order, '') != '' and ifnull(si_item.sales_order, '') != ''
""") """)
for d in si: for d in si:
sc_obj.update_prevdoc_detail(1, get_obj("Sales Invoice", d[0], with_children=1)) sales_common.StatusUpdater(get_obj("Sales Invoice", d[0], with_children=1), \
1).update_all_qty()