Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odgovori
875 Prikazi

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

Avatar
Opusti
Avtor Best Answer

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!

Avatar
Opusti
Best Answer

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

Avatar
Opusti
Avtor

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!

Best Answer

Hello Luis,  

from odoo import models, fields, api, _

Thanks.

Avatar
Opusti
Avtor

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 Odgovori Prikazi Aktivnost
3
apr. 24
1658
2
maj 25
1082
0
mar. 25
1023
1
avg. 24
1963
2
jan. 24
2666