Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3370 Lượt xem

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()





Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 16
4735
1
thg 10 20
3574
0
thg 6 16
3411
2
thg 5 25
1199
1
thg 1 23
3008