mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
fix: remove autocommit from item rename
This commit is contained in:
committed by
Ankush Menat
parent
72dbc3d6b8
commit
5caf411be3
@@ -724,7 +724,6 @@ class Item(WebsiteGenerator):
|
|||||||
|
|
||||||
def recalculate_bin_qty(self, new_name):
|
def recalculate_bin_qty(self, new_name):
|
||||||
from erpnext.stock.stock_balance import repost_stock
|
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")
|
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)
|
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
|
||||||
|
|
||||||
@@ -738,7 +737,6 @@ class Item(WebsiteGenerator):
|
|||||||
repost_stock(new_name, warehouse)
|
repost_stock(new_name, warehouse)
|
||||||
|
|
||||||
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", existing_allow_negative_stock)
|
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", existing_allow_negative_stock)
|
||||||
frappe.db.auto_commit_on_many_writes = 0
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def copy_specification_from_item_group(self):
|
def copy_specification_from_item_group(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user