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

Hey there, 

I wanted to set up my check-out. But every time I chose a specific combination from my product-configurator, Odoo tells me that there is a specific error:

RPC_ERROR

Odoo Server Error

Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/sale_order_line.py", line 61, in _get_sale_order_line_multiline_description_variants

    name += "\n" + _(

NameError: name '_' is not defined

Does anybody knows what I did wrong and could help me?

Many thanks in advance! 


Greetings

Luis

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

I think I understand what the problem is. Could you explain maybe a little bit more, what I have to do to solve this problem? 

Again; many thanks in advance!

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

The error occurs because the code is trying to use a function named _, which is not defined in the file sale_order_line.py. Ensure that the translation function is properly imported:

from odoo import _


Hope it helps

الصورة الرمزية
إهمال
الكاتب

I think I understand what the problem is. Could you explain maybe a little bit more, what I have to do to solve this problem?

Again; many thanks in advance!

أفضل إجابة

Hello Luis,  

from odoo import models, fields, api, _

Thanks.

الصورة الرمزية
إهمال
الكاتب

I think I understand what the problem is. Could you explain maybe a little bit more, what I have to do to solve this problem?

Again; many thanks in advance!

المنشورات ذات الصلة الردود أدوات العرض النشاط
3
أبريل 24
1654
2
مايو 25
1056
0
مارس 25
1015
1
أغسطس 24
1960
2
يناير 24
2654