跳至内容
菜单
此问题已终结
2 回复
32614 查看

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.

形象
丢弃
最佳答案

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 !

形象
丢弃
最佳答案

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
3月 19
3207
0
1月 19
4115
4
2月 24
11358
0
1月 18
3302
0
9月 17
3684