update stock uo in sle for DN

This commit is contained in:
Nabin Hait
2015-02-20 14:23:42 +05:30
parent 010657145d
commit ad3fd5166b
3 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabStock Ledger Entry` sle, tabItem item
set sle.stock_uom = item.stock_uom
where sle.voucher_type="Delivery Note" and item.name = sle.item_code
and sle.stock_uom != item.stock_uom""")