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

Hi,

Here is my code.... in DTR.PY


from odoo.exceptions import UserError

** function outside class and opening holiday table belong to other module

def holiday():

      holiday_obj = self.env['hr.holiday']   <--------- i got a error here! when i erase the "self." since it was

                                                                                not in a class but how can the ENV be evaluated?

      return holiday_obj


class Dtr(models.Model):

        holiday_obj = holiday()





アバター
破棄
関連投稿 返信 ビュー 活動
2
3月 16
4726
1
10月 20
3562
0
6月 16
3409
2
5月 25
1198
1
1月 23
3003