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

How to enable debug mode in webiste_ module?

Is there any solution for that situation because I just want to debug.

Thank in advance!

아바타
취소
베스트 답변

Just add to the end of URL:

?debug 
아바타
취소

I can't see any effect. How should that work?

If you look at JS in Developer Tools of your Browser, its not compressed.

Now I see, thanks.

작성자 베스트 답변

I found the fastway to do that. enable debug mode default. 

Notice: Should use only dev mode :D

openerp/addons/base/ir/ir_qweb.py

def render_tag_call_assets(self, element, template_attributes, generated_attributes, qwebcontext):

        """ This special 't-call' tag can be used in order to aggregate/minify javascript and css assets"""
        name = template_attributes['call-assets']

        # Backward compatibility hack for manifest usage
        qwebcontext['manifest_list'] = openerp.addons.web.controllers.main.manifest_list

        d = qwebcontext.copy()
        d.context['inherit_branding'] = False
        content = self.render_tag_call(
            element, {'call': name}, generated_attributes, d)
        bundle = AssetsBundle(name, html=content)
        css = self.get_attr_bool(template_attributes.get('css'), default=True)
        js = self.get_attr_bool(template_attributes.get('js'), default=True)
        # return bundle.to_html(css=css, js=js, debug=bool(qwebcontext.get('debug')))
        return bundle.to_html(css=css, js=js, debug=1)

아바타
취소
관련 게시물 답글 화면 활동
1
3월 25
841
0
3월 15
5082
1
3월 15
4274
0
3월 15
3574
0
3월 15
4016