跳至内容
菜单
此问题已终结
4 回复
6994 查看

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
4495
0
8月 24
3869
0
6月 20
2507
1
10月 19
11287
0
10月 23
4086