Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
890 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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!

Câu trả lời hay nhất

Hello Luis,  

from odoo import models, fields, api, _

Thanks.

Ảnh đại diện
Huỷ bỏ
Tác giả

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!

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 4 24
1676
2
thg 5 25
1110
0
thg 3 25
1051
1
thg 8 24
2008
2
thg 1 24
2692