Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
896 มุมมอง

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!

Related Posts ตอบกลับ มุมมอง กิจกรรม
Products not showing in checkout pages แก้ไขแล้ว
3
เม.ย. 24
1690
2
พ.ค. 25
1131
0
มี.ค. 25
1060
1
ส.ค. 24
2015
2
ม.ค. 24
2704