Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2720 Vizualizări

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


Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
ian. 25
6754
1
dec. 23
4914
2
nov. 22
4065
0
nov. 22
3903
0
oct. 22
2197