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
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
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
2
ian. 25
|
7851 | |||
|
1
dec. 23
|
7050 | |||
|
Menu item for users and group only
Rezolvat
|
2
nov. 22
|
5549 | ||
|
0
nov. 22
|
4893 | |||
|
0
oct. 22
|
3289 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.