fix: reposting error AttributeError: 'datetime.timedelta' object has no attribute 'replace'

(cherry picked from commit eeda264eb6)
This commit is contained in:
s-aga-r
2022-01-12 20:55:30 +05:30
committed by Mergify
parent 65ac84e020
commit 4b0c9b6115

View File

@@ -263,7 +263,7 @@ def repost_future_sle(
def validate_item_warehouse(args):
for field in ["item_code", "warehouse", "posting_date", "posting_time"]:
if not args.get(field):
if args.get(field) in [None, ""]:
validation_msg = f"The field {frappe.unscrub(field)} is required for the reposting"
frappe.throw(_(validation_msg))