Set missing values only in unsubmitted documents

This commit is contained in:
Nabin Hait 2014-06-05 17:00:53 +05:30
parent 704a453b7a
commit 86207afe15

View File

@ -12,7 +12,7 @@ import json
class AccountsController(TransactionBase): class AccountsController(TransactionBase):
def validate(self): def validate(self):
if self.docstatus == 0: if self._actions != "update_after_submit":
self.set_missing_values(for_validate=True) self.set_missing_values(for_validate=True)
self.validate_date_with_fiscal_year() self.validate_date_with_fiscal_year()
if self.meta.get_field("currency"): if self.meta.get_field("currency"):