Se agrega en account.py la importacioÃÃndel error de validación AccessError y gettext

This commit is contained in:
raskolnikov 2021-02-14 01:14:45 -05:00
parent 9d29805055
commit 996c914ee7

View file

@ -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))