Odoo Help

0

Error: NameError: name 'field' is not defined

By
Drees Far
on 12/3/15, 2:07 PM 1,914 views

Hello everybody!!

Please, who knows what is the origin of this error because i didnt find anything in the python code.

Error: NameError: name 'field' is not defined

Thanks a lot in advance.

Best Regards.

0
TKF
On 12/4/15, 12:17 AM

Hi,

Can you post all the message error and you python code ?

I have the same error like you when I write field without s:

Bad syntax
tax_line_ids = field.One2many('account.tax', 'tax_id', string='Tax Lines')
Correct syntax
tax_line_ids = fields.One2many('account.tax', 'tax_id', string='Tax Lines')

I got message error :

NameError: name 'field' is not defined

So check your code and find the error syntax.


Best regards,


 

0

Pawan

--Pawan--
1422
| 4 4 5
Hyderabad, India
--Pawan--


Pawan
On 12/4/15, 12:12 AM

Drees,
The cause of this error is that u must be having a typo somewhere with "fields" while defining the field under a class.

You can trace this by looking at your terminal, or if you dont have it, simply check your defined fields and see if you have any typo like that...

Hope it helps !

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 12/3/15, 2:07 PM
Seen: 1914 times
Last updated: 12/4/15, 12:17 AM