Skip to Content
Menú
This question has been flagged
2 Respostes
2572 Vistes

How to setup a state named onhold in payroll process along with draft and done because we need salary of few employees on hold. Suppose if an employee going to relieve by next month end, we will hold this month and settle the entire amount in next month.

Help us hos to handle this scenario

Avatar
Descartar
Autor Best Answer

Above code is not working

Avatar
Descartar
Best Answer

Inherit the model hr.payslip and you can add the new value to the state field, add below code in the Python side and do necessary changes in the views like adding button to control this state etc


class HrPayslip(models.Model):
_inherit = 'hr.payslip'

state = fields.Selection(
selection_add=[('hold', 'On Hold')])
Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de set. 22
4363
0
d’abr. 21
1786
1
de maig 25
1128
1
d’abr. 25
3574
1
de març 25
1217