From 1da6e1b864326f2876940d1b8f0f8eb8c61736a3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 28 Nov 2012 15:24:11 +0530 Subject: [PATCH] patch: update % delievered and % billed in SO if pos made against that so --- .../update_delivered_billed_percentage_for_pos.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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