Do not raise missing accounts errors on readonly transactions
issue6913 review39871002
This commit is contained in:
@@ -232,7 +232,8 @@ class Party(CompanyMultiValueMixin):
|
||||
if not account:
|
||||
config = Configuration(1)
|
||||
account = config.get_multivalue('default_account_payable')
|
||||
if not account:
|
||||
# Allow empty values on on_change
|
||||
if not account and not Transaction().readonly:
|
||||
self.raise_user_error('missing_payable_account', {
|
||||
'name': self.rec_name,
|
||||
})
|
||||
@@ -246,7 +247,8 @@ class Party(CompanyMultiValueMixin):
|
||||
if not account:
|
||||
config = Configuration(1)
|
||||
account = config.get_multivalue('default_account_receivable')
|
||||
if not account:
|
||||
# Allow empty values on on_change
|
||||
if not account and not Transaction().readonly:
|
||||
self.raise_user_error('missing_receivable_account', {
|
||||
'name': self.rec_name,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user