user_id = fields.Many2one('hr.employee', string='Employee', default=lambda self: self.env.user, tracking=True)
i did not delet any record and its working on local but when i create create record on testing instance it give me above error.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
user_id = fields.Many2one('hr.employee', string='Employee', default=lambda self: self.env.user, tracking=True)
i did not delet any record and its working on local but when i create create record on testing instance it give me above error.
Hello your field definition model is hr.employee while you have default=lambda self: self.env.user, i think this is not true at all
user_id = fields.Many2one('res.users', string='Employee', default=lambda self: self.env.user, tracking=True)
change model 'hr.employee' to 'res.users'., it will be work.
Thanks
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
lut 21
|
7438 | ||
|
1
mar 24
|
1764 | ||
How can I recover ownership?
Rozwiązane
|
|
1
lut 23
|
2044 | |
Odoo database failed
Rozwiązane
|
|
1
gru 22
|
11637 | |
Edit Company data Powered by Odoo
Rozwiązane
|
|
6
cze 15
|
7910 |