Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged

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





Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
mar. 16
4706
1
okt. 20
3545
0
jun. 16
3403
2
maj 25
1198
1
jan. 23
2985