Do not raise missing accounts errors on readonly transactions

issue6913
review42811002
This commit is contained in:
Sergi Almacellas Abellana
2017-11-27 16:51:06 +01:00
parent 0cd15ec936
commit 4eb7daf022
+2 -1
View File
@@ -28,7 +28,8 @@ def account_used(field_name):
account = func(self)
if not account:
account = self.get_account(field_name + '_used')
if not account:
# Allow empty values on on_change
if not account and not Transaction().readonly:
self.raise_user_error('missing_account', {
'name': self.name,
'id': self.id,