mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
update stock uo in sle for DN
This commit is contained in:
11
erpnext/patches/v4_2/update_stock_uom_for_dn_in_sle.py
Normal file
11
erpnext/patches/v4_2/update_stock_uom_for_dn_in_sle.py
Normal 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""")
|
||||
Reference in New Issue
Block a user