Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
2795 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

Above code is not working

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
zář 22
4596
0
dub 21
1989
1
zář 25
564
1
kvě 25
1788
1
dub 25
4157