fix: set posting time during restore

This commit is contained in:
ravibharathi656
2025-12-19 19:48:58 +05:30
parent 32b3a13591
commit a55092d8da

View File

@@ -19,8 +19,8 @@ class UOMMustBeIntegerError(frappe.ValidationError):
class TransactionBase(StatusUpdater):
def validate_posting_time(self):
# set Edit Posting Date and Time to 1 while data import
if frappe.flags.in_import and self.posting_date:
# set Edit Posting Date and Time to 1 while data import and restore
if (frappe.flags.in_import or self.flags.from_restore) and self.posting_date:
self.set_posting_time = 1
if not getattr(self, "set_posting_time", None):