mirror of
https://bitbucket.org/presik/trytonpsk-staff_payroll.git
synced 2023-12-14 05:33:13 +01:00
Add check kind normal for duplicated payroll
This commit is contained in:
parent
5994a58db8
commit
180684eea5
1 changed files with 1 additions and 0 deletions
|
@ -220,6 +220,7 @@ class Payroll(Workflow, ModelSQL, ModelView):
|
|||
payrolls = Payroll.search([
|
||||
('period', '=', payroll.period.id),
|
||||
('contract', '=', payroll.contract.id),
|
||||
('kind', '=', 'normal'),
|
||||
])
|
||||
if len(payrolls) > 1:
|
||||
cls.raise_user_error('payroll_exist_period',)
|
||||
|
|
Loading…
Reference in a new issue