Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3364 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mar 16
4733
1
ott 20
3573
0
giu 16
3410
2
mag 25
1199
1
gen 23
3008