[minor] set set_posting_time to 1 while data import (#8835)
This commit is contained in:
parent
939db36ad4
commit
b0df661e81
@ -18,6 +18,10 @@ class TransactionBase(StatusUpdater):
|
||||
frappe.db.get_value("Notification Control", None, dt + "_message"))
|
||||
|
||||
def validate_posting_time(self):
|
||||
# set Edit Posting Date and Time to 1 while data import
|
||||
if frappe.flags.in_import:
|
||||
self.set_posting_time = 1
|
||||
|
||||
if not getattr(self, 'set_posting_time', None):
|
||||
now = now_datetime()
|
||||
self.posting_date = now.strftime('%Y-%m-%d')
|
||||
|
Loading…
Reference in New Issue
Block a user