[patch] Patch added to rename net_weight field (#11798)

This commit is contained in:
Vishal Dhayagude 2017-11-30 13:52:30 +05:30 committed by Nabin Hait
parent f9cc56cd62
commit 8677cd1565
2 changed files with 9 additions and 0 deletions

View File

@ -474,3 +474,4 @@ erpnext.patches.v9_2.repost_reserved_qty_for_production
erpnext.patches.v9_2.remove_company_from_patient
erpnext.patches.v9_2.set_item_name_in_production_order
erpnext.patches.v10_0.update_lft_rgt_for_employee
erpnext.patches.v9_2.rename_net_weight_in_item_master

View File

@ -0,0 +1,8 @@
from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("stock", "doctype", "item")
if frappe.db.has_column('Item', 'net_weight'):
rename_field("Item", "net_weight", "weight_per_unit")