콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
4918 화면

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.

아바타
취소
관련 게시물 답글 화면 활동
2
3월 22
7622
3
4월 24
3101
0
1월 23
2309
5
1월 22
11842
3
7월 24
7892