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

I want to create translation file for custom module Odoo15 .But i get this error from system. How can i handle it

Errror :
Traceback (most recent call last):
File "C:\Users\Dogancan\Desktop\odoo-local\odoo\odoo\http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\Users\Dogancan\Desktop\odoo-local\odoo\odoo\http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: ("Can't load unknown file type %s.", 'i18n/tr.po')


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

It seems that Odoo is not recognizing the file format. I would appreciate any guidance on how to resolve this issue and ensure that the translation file is properly recognized and loaded.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Were you able to solve the issue ? I currently have the same issue

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

I already watched this video.  I follow these steps below many times: 

1-Export from Odoo Languages Tab
2-Import my custom module  
3-Update my module   

However this problem not resolved. 


อวตาร
ละทิ้ง

you have to import the exported file, not the module

ผู้เขียน

I did the same operation as in the video. I imported the exported .po file to my module. However, the error did not resolve. When I debug the error detail, I saw that this error was frozen from the file named "convert.py". (I am sharing the file below) I added the .po file extension here. However, I still could not translate my module.

with file_open(pathname, 'rb') as fp:
if ext == '.csv':
convert_csv_import(cr, module, pathname, fp.read(), idref, mode, noupdate)
elif ext == '.sql':
convert_sql_import(cr, fp)
elif ext == '.xml':
convert_xml_import(cr, module, fp, idref, mode, noupdate)
elif ext == '.js':
pass # .js files are valid but ignored here.
elif ext == '.po':
pass # .po files are valid but ignored here.

คำตอบที่ดีที่สุด

Hi,

Please refer the following link to add translation for the custom modules:  https://www.youtube.com/watch?v=ZRpmM8lDn-w

You have done something in wrong way/unexpected way and thus received the traceback.

It will be nice, if you update the steps you have tried with.


Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 25
851
3
พ.ค. 25
2584
1
พ.ค. 25
820
1
พ.ค. 25
1004
1
ก.พ. 25
6011