mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-12 19:35:09 +00:00
fix: remove autocommit from item rename
(cherry picked from commit 5caf411be3)
This commit is contained in:
committed by
Ankush Menat
parent
8e19608d0f
commit
c57f639ed8
@@ -496,7 +496,6 @@ class Item(Document):
|
||||
|
||||
def recalculate_bin_qty(self, new_name):
|
||||
from erpnext.stock.stock_balance import repost_stock
|
||||
frappe.db.auto_commit_on_many_writes = 1
|
||||
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
|
||||
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
|
||||
|
||||
@@ -510,7 +509,6 @@ class Item(Document):
|
||||
repost_stock(new_name, warehouse)
|
||||
|
||||
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", existing_allow_negative_stock)
|
||||
frappe.db.auto_commit_on_many_writes = 0
|
||||
|
||||
def update_bom_item_desc(self):
|
||||
if self.is_new():
|
||||
|
||||
Reference in New Issue
Block a user