Se rendre au contenu
Menu
Cette question a été signalée
4 Réponses
7122 Vues

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

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Auteur

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?

Meilleure réponse

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
Ignorer
Meilleure réponse

Yes pls. Im totally agree with Hengky

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Auteur

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

Publications associées Réponses Vues Activité
0
mai 21
4683
0
août 24
3947
0
juin 20
2607
1
oct. 19
11389
0
oct. 23
4163