From 704a453b7aeffe3ec463f1395597442fd48c6736 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 5 Jun 2014 16:55:31 +0530 Subject: [PATCH] Set missing values only in unsubmitted documents --- erpnext/controllers/accounts_controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 4567dd7005..a1bce2d213 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -12,7 +12,8 @@ import json class AccountsController(TransactionBase): def validate(self): - self.set_missing_values(for_validate=True) + if self.docstatus == 0: + self.set_missing_values(for_validate=True) self.validate_date_with_fiscal_year() if self.meta.get_field("currency"): self.calculate_taxes_and_totals()