mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
fix: allow both custodian and location while creating asset
(cherry picked from commit bff00bc8b2)
Co-authored-by: anandbaburajan <anandbaburajan@gmail.com>
This commit is contained in:
@@ -62,11 +62,12 @@ class AssetMovement(Document):
|
|||||||
frappe.throw(_("Source and Target Location cannot be same"))
|
frappe.throw(_("Source and Target Location cannot be same"))
|
||||||
|
|
||||||
if self.purpose == "Receipt":
|
if self.purpose == "Receipt":
|
||||||
if not (d.source_location or d.from_employee) and not (d.target_location or d.to_employee):
|
if not (d.source_location) and not (d.target_location or d.to_employee):
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Target Location or To Employee is required while receiving Asset {0}").format(d.asset)
|
_("Target Location or To Employee is required while receiving Asset {0}").format(d.asset)
|
||||||
)
|
)
|
||||||
elif d.from_employee and not d.target_location:
|
elif d.source_location:
|
||||||
|
if d.from_employee and not d.target_location:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Target Location is required while receiving Asset {0} from an employee").format(d.asset)
|
_("Target Location is required while receiving Asset {0} from an employee").format(d.asset)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user