[minor] set_posting_time=1 only when imported data contains posting date. (#9349)

This commit is contained in:
Sagar Vora 2017-06-19 12:12:22 +05:30 committed by Rushabh Mehta
parent b7b49f6da7
commit 67fe1010c7

View File

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