diff --git a/patches/november_2012/update_delivered_billed_percentage_for_pos.py b/patches/november_2012/update_delivered_billed_percentage_for_pos.py index 502a36a748..0c9a8ad2b2 100644 --- a/patches/november_2012/update_delivered_billed_percentage_for_pos.py +++ b/patches/november_2012/update_delivered_billed_percentage_for_pos.py @@ -2,7 +2,8 @@ def execute(): import webnotes 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 from `tabSales Invoice` si, `tabSales Invoice Item` si_item @@ -12,4 +13,5 @@ def execute(): and ifnull(si_item.sales_order, '') != '' """) for d in si: - sc_obj.update_prevdoc_detail(1, get_obj("Sales Invoice", d[0], with_children=1)) \ No newline at end of file + sales_common.StatusUpdater(get_obj("Sales Invoice", d[0], with_children=1), \ + 1).update_all_qty() \ No newline at end of file