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

can someone help me how to remove or disable mobile version in odoo website (CMS) 

아바타
취소
베스트 답변

hi,

you can do by inherit concept.

you should create a file as "website_mobile_view.xml" in the path "views/website_mobile_view.xml" in your odoo module and add the file to the __openerp.py file.

In website_mobile_view.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<template id="mobile" inherit_id="website.user_navbar">
    <xpath expr="//i[@class='fa fa-mobile']" position="replace">
    </xpath>
</template>
</data>
</openerp>

 

it works.All the best

아바타
취소
작성자

what it want to remove is mobile version not the navbar i mean when i browse with mobile the interface is same with desktop so how can i achieved this? any idea?

베스트 답변

As we all know, Odoo's client uses the Bootstrap front-end library - Build fast, responsive sites and is based on a mobile-first approach. Also, the purpose of this lib is to support devices with various aspect ratios not just mobile. Hence the whole idea is to create responsive web pages and we do not want to kill this feature.

Also restricting just the mobile may not be sufficient for you . You may have to override all the media queries supporting various devices with different heights and widths other than Desktop with Desktop CSS.

Also, you do not know Desktop could be of any resolution and aspect ratio.

Odoo 16.0 now uses Bootstrap 5.1.3 

https://github.com/odoo/odoo/tree/16.0/addons/web/static/lib/bootstrap

아바타
취소
베스트 답변

Yes pls. Im totally agree with Hengky

아바타
취소
베스트 답변

Hello,

Can you say why you want to remove the mobile version ?

Please note that today, 60% of internet users do navigate with their mobile and also that, once you have resized your images, everything works fine with mobile website in Odoo.

Best regards,

José

아바타
취소
작성자

yeah you are right but sometimes we want to keep the view same with desktop, any idea dude?

관련 게시물 답글 화면 활동
0
5월 21
4297
0
8월 24
3710
0
6월 20
2356
1
10월 19
11050
0
10월 23
3947