Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion web_responsive/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Web Responsive
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d09e54c7868a3255b5e7d2ec43ea85369b451ed086ba68870656418cf2f3c6bc
!! source digest: sha256:37a112da29616296a3f1b5c2d23c87a54491cf6eaf2a2a428fc65a455f9257d3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down Expand Up @@ -97,6 +97,9 @@ comfortably

|image11|

- When the user chooses to display file viewer, then preview attachments
directly display in the interface.

.. |image| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_responsive/static/img/redirecthome.gif
.. |image1| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_responsive/static/img/appmenu.gif
.. |image2| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_responsive/static/img/appsearch.gif
Expand Down Expand Up @@ -179,6 +182,10 @@ Contributors

- Angel Patel <patelangel1414@gmail.com>

- `SerpentCS <https://www.serpentcs.com>`__:

- Parvez Qureshi <parvez.qureshi@serpentcs.com>

Maintainers
-----------

Expand Down
1 change: 1 addition & 0 deletions web_responsive/models/ir_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def session_info(self):
user = self.env.user
return {
**session,
"displayFileViewer": user.display_file_viewer,
"apps_menu": {
"search_type": user.apps_menu_search_type,
"theme": user.apps_menu_theme,
Expand Down
3 changes: 3 additions & 0 deletions web_responsive/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class ResUsers(models.Model):
store=True,
readonly=False,
)
display_file_viewer = fields.Boolean(
help="Enable this to display the file viewer for preview.",
)

@api.depends("action_id")
def _compute_redirect_home(self):
Expand Down
3 changes: 3 additions & 0 deletions web_responsive/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
- Taras Shabaranskyi \<<shabaranskij@gmail.com>\>

- Angel Patel \<<patelangel1414@gmail.com>\>

- [SerpentCS](https://www.serpentcs.com):
- Parvez Qureshi \<<parvez.qureshi@serpentcs.com>\>
2 changes: 2 additions & 0 deletions web_responsive/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ comfortably
log.

![image](../static/img/chatter-colors.png)

- When the user chooses to display file viewer, then preview attachments directly display in the interface.
9 changes: 8 additions & 1 deletion web_responsive/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Web Responsive</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d09e54c7868a3255b5e7d2ec43ea85369b451ed086ba68870656418cf2f3c6bc
!! source digest: sha256:37a112da29616296a3f1b5c2d23c87a54491cf6eaf2a2a428fc65a455f9257d3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/17.0/web_responsive"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_responsive"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds responsiveness to web backend.</p>
Expand Down Expand Up @@ -428,6 +428,9 @@ <h1 class="title">Web Responsive</h1>
log.</p>
<p><img alt="image11" src="https://raw.githubusercontent.com/OCA/web/17.0/web_responsive/static/img/chatter-colors.png" /></p>
</li>
<li><p class="first">When the user chooses to display file viewer, then preview attachments
directly display in the interface.</p>
</li>
</ul>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand Down Expand Up @@ -496,6 +499,10 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<li>David Vidal &lt;<a class="reference external" href="mailto:david.vidal&#64;tecnativa.com">david.vidal&#64;tecnativa.com</a>&gt;</li>
<li>Taras Shabaranskyi &lt;<a class="reference external" href="mailto:shabaranskij&#64;gmail.com">shabaranskij&#64;gmail.com</a>&gt;</li>
<li>Angel Patel &lt;<a class="reference external" href="mailto:patelangel1414&#64;gmail.com">patelangel1414&#64;gmail.com</a>&gt;</li>
<li><a class="reference external" href="https://www.serpentcs.com">SerpentCS</a>:<ul>
<li>Parvez Qureshi &lt;<a class="reference external" href="mailto:parvez.qureshi&#64;serpentcs.com">parvez.qureshi&#64;serpentcs.com</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
4 changes: 4 additions & 0 deletions web_responsive/static/src/views/form/form_renderer.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

import {patch} from "@web/core/utils/patch";
import {FormRenderer} from "@web/views/form/form_renderer";
import {session} from "@web/session";

export const unpatchDisableFilePreview = patch(FormRenderer.prototype, {
/** @returns {Boolean}*/
hasFileViewer() {
if (session.displayFileViewer) {
return super.hasFileViewer();
}
return false;
},
});
2 changes: 0 additions & 2 deletions web_responsive/static/src/views/form/form_statusbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
overflow: unset;

.o_form_sheet {
overflow: auto;

&::-webkit-scrollbar {
width: 10px;
height: 10px;
Expand Down
12 changes: 12 additions & 0 deletions web_responsive/views/res_users_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,20 @@
<data>
<field name="action_id" position="after">
<field name="is_redirect_home" invisible="action_id" />
<field name="display_file_viewer" />
</field>
</data>
</field>
</record>

<record id="res_users_view_form_preferences_web_responsive" model="ir.ui.view">
<field name="name">res.users.preferences.form.web.responsive</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="arch" type="xml">
<field name="tz" position="after">
<field name="display_file_viewer" />
</field>
</field>
</record>
</odoo>