Hello,
I want to add a computed field in the leave form for wage adversary if the employees take leave before the trial period, their wages should be an adversary.
Thank you in advance for any help
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I want to add a computed field in the leave form for wage adversary if the employees take leave before the trial period, their wages should be an adversary.
Thank you in advance for any help
Hi,
Here is an example:
from odoo import api, fields, models
class TestComputed(models.Model):
_name = "test.computed"
wage = fields.Float(compute="_compute_wage_adversary")
trail_period = fields.Integer()
@api.depends("trail_period")
def _compute_wage_adversary(self):
"""You can write your condition here"""
Hope it helps
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
sty 25
|
6688 | ||
|
1
gru 23
|
4815 | ||
Menu item for users and group only
Rozwiązane
|
|
2
lis 22
|
3990 | |
|
0
lis 22
|
3800 | ||
|
0
paź 22
|
2154 |