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
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Jan 25
|
6329 | ||
|
1
Dec 23
|
4256 | ||
|
2
Nov 22
|
3613 | ||
|
0
Nov 22
|
3494 | ||
|
0
Oct 22
|
1883 |