コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
6783 ビュー

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
4286
0
8月 24
3702
0
6月 20
2349
1
10月 19
11044
0
10月 23
3936