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

After installing the module language-flags, I get an internal server error and my website does not display anymore.

Does anyone encountered this already an have a solution for this ?

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

I tried Maurice Matheeussen's solution, but that did not work for me. I can't find a models directory. Can you help me out? Thanks.

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

In the mean time I have found a solution myself


add a file ir_http.py with the following content to the website_language_flags module in the models directory.



import openerp

from openerp.osv import orm, osv, fields

from openerp.http import request

class ir_http(orm.AbstractModel):

_inherit="ir.http"

def get_nearest_lang(self, lang):

# Try to find a similar lang. Eg: fr_BE and fr_FR

if lang in request.website.get_languages():

return lang

short = lang.split('_')[0]

for code, name, lang_obj in request.website.get_languages():

if code.startswith(short):

return code

return False

ir_http()

 

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

I do not have a crystal ball, so unfortunately I'm not able to look into your odoo server's log file.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 22
7262
Box multi language sur site web แก้ไขแล้ว
3
เม.ย. 24
2607
0
ม.ค. 23
1997
5
ม.ค. 22
11541
3
ก.ค. 24
7443