mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix(asset): do not validate warehouse on asset purchase
This commit is contained in:
@@ -226,7 +226,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
def validate_warehouse(self, for_validate=True):
|
def validate_warehouse(self, for_validate=True):
|
||||||
if self.update_stock and for_validate:
|
if self.update_stock and for_validate:
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if not d.warehouse:
|
if not d.warehouse and not d.is_fixed_asset:
|
||||||
frappe.throw(_("Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2}").
|
frappe.throw(_("Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2}").
|
||||||
format(d.idx, d.item_code, self.company), exc=WarehouseMissingError)
|
format(d.idx, d.item_code, self.company), exc=WarehouseMissingError)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user