mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 17:15:04 +00:00
fix: dont erase voucher_type and voucher_no for item_wh repost
kept for tracability.
(cherry picked from commit 1d3842f03a)
This commit is contained in:
committed by
mergify-bot
parent
21f64e5eba
commit
3e9d639fb5
@@ -29,15 +29,12 @@ class RepostItemValuation(Document):
|
||||
if self.based_on == 'Transaction':
|
||||
self.item_code = None
|
||||
self.warehouse = None
|
||||
else:
|
||||
self.voucher_type = None
|
||||
self.voucher_no = None
|
||||
|
||||
self.allow_negative_stock = self.allow_negative_stock or \
|
||||
cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock"))
|
||||
|
||||
def set_company(self):
|
||||
if self.voucher_type and self.voucher_no:
|
||||
if self.based_on == "Transaction":
|
||||
self.company = frappe.get_cached_value(self.voucher_type, self.voucher_no, "company")
|
||||
elif self.warehouse:
|
||||
self.company = frappe.get_cached_value("Warehouse", self.warehouse, "company")
|
||||
|
||||
Reference in New Issue
Block a user