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

Hi,
I want to check database name in qweb template odoo 10, how I can get it, please help if anyone know.

아바타
취소

Hi Nalini,

in Which Qweb Template you need Database name ?

작성자

I have added 1 report for printing journal entry .. in that I want to fetch database name. But i don't know how we can get it in template.

베스트 답변

Hello Nalini

You can try with following code in qweb report.

<t t-esc='doc.env.cr.dbname'/>

correct me if i am wrong !

Thank you 

아바타
취소
작성자

Yes it helped.. Thanks alot

베스트 답변

Hi Nalini,

In Normal we can use this method for find database name

self.env.cr.dbname

for qweb replace self by request

 <t t-esc='request.env.cr.dbname'/>

아바타
취소
작성자

Thanks a lot.. it helped me..