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
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
2
يناير 25
|
6782 | ||
|
1
ديسمبر 23
|
4952 | ||
|
2
نوفمبر 22
|
4112 | ||
|
0
نوفمبر 22
|
3930 | ||
|
0
أكتوبر 22
|
2222 |