[minor] set set_posting_time to 1 while data import (#8835)

This commit is contained in:
Makarand Bauskar 2017-05-16 07:59:58 +05:30 committed by Nabin Hait
parent 939db36ad4
commit b0df661e81

View File

@ -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')