تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
32632 أدوات العرض

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
مارس 19
3216
0
يناير 19
4122
4
فبراير 24
11365
0
يناير 18
3306
0
سبتمبر 17
3687