コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2976 ビュー

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
1月 25
6992
1
12月 23
5297
2
11月 22
4327
0
11月 22
4081
0
10月 22
2407