This question has been flagged
4 Replies
5529 Views

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

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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?

Best Answer

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

Avatar
Discard
Best Answer

Yes pls. Im totally agree with Hengky

Avatar
Discard
Best Answer

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é

Avatar
Discard
Author

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