Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3381 Переглядів

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





Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
бер. 16
4756
1
жовт. 20
3592
0
черв. 16
3416
2
трав. 25
1211
1
січ. 23
3016