add error message in duplicate account
This commit is contained in:
parent
ec3739a95d
commit
6974562e64
13
account.py
13
account.py
|
@ -155,6 +155,19 @@ class Account(metaclass=PoolMeta):
|
|||
('colgaap', 'Colgaap'),
|
||||
], 'Classification')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Account, cls).__setup__()
|
||||
table = cls.__table__()
|
||||
cls._error_messages.update({
|
||||
'bad_operation': ('Operación No permitida.'),
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def copy(cls, records, default=None):
|
||||
cls.raise_user_error('bad_operation')
|
||||
return super(Account, cls).copy(records, default=default)
|
||||
|
||||
|
||||
class AuxiliaryBookStart(ModelView):
|
||||
'Auxiliary Book Start'
|
||||
|
|
Loading…
Reference in New Issue