Skip to Content
Menu
This question has been flagged

I have been creating new sequence by Hospital module, I've following channel Odoo mates on YouTube, here's the link:

https://www.youtube.com/watch?v=ZfKzmfiqeg0&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM&index=10

But it throws an error, on v13.  Now am getting error as:

File "/opt/odoo/github/src/custom_modules/CustomHospital/models/patient.py", line 16, in <lambda> index=True, default=lambda self: _('New')) NameError: name '_' is not defined

How do i get rid of that? Thanks in advance for your valuable solution.



Avatar
Discard
Best Answer

Hello Thirumalai Vasan,

Try following thinks, it's helps you, you don't have import  '_'  that's why you got this type of error.

from odoo import api,fields, models, _

Avatar
Discard
Author

Got it Thanks! Yeah as you told, the '_' made an error

you're welcome @Thirumalai Vasan,

Related Posts Replies Views Activity
0
May 20
1661
4
Jul 24
18541
2
Oct 23
6037
0
Oct 20
2616
2
Apr 23
17793