commit | a819f6f8abe32b82c02eb39414e4c23a00b0582e | [log] [tgz] |
---|---|---|
author | Nabin Hait <nabinhait@gmail.com> | Fri Aug 05 11:09:25 2011 +0530 |
committer | Nabin Hait <nabinhait@gmail.com> | Fri Aug 05 11:09:25 2011 +0530 |
tree | 86b270a0614e622c5fb3b37bac832fae57bbce3b | |
parent | 71f2bd97b644b2d8601d3ab2087872d4dbc08e6b [diff] |
rename function added in item
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py index ae67749..7f0d3c2 100644 --- a/stock/doctype/item/item.py +++ b/stock/doctype/item/item.py
@@ -178,3 +178,7 @@ sle = sql("select name from `tabStock Ledger Entry` where item_code = %s and ifnull(is_cancelled, 'No') = 'No'", self.doc.name) return sle and 'exists' or 'not exists' + + def on_rename(self,newdn,olddn): + sql("update tabItem set item_code = %s where name = %s", (newdn, olddn)) +