Se agrega en account.py la importacioÃÃndel error de validación AccessError y gettext
This commit is contained in:
parent
9d29805055
commit
996c914ee7
1 changed files with 5 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
|||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.i18n import gettext
|
||||
|
||||
__all__ = ['Account','Move','Line']
|
||||
|
||||
|
@ -56,6 +58,6 @@ class Line(metaclass=PoolMeta):
|
|||
if bool(self.party) != bool(self.account.party_required):
|
||||
error = 'party_set' if self.party else 'party_required'
|
||||
raise AccessError(
|
||||
gettext('account.msg_line_%s' % error,
|
||||
account=self.account.rec_name,
|
||||
line=self.rec_name))
|
||||
gettext('account.msg_line_%s' % error,
|
||||
account=self.account.rec_name,
|
||||
line=self.rec_name))
|
||||
|
|
Loading…
Reference in a new issue