Skip to content

Commit

Permalink
Merge pull request #77 from OCA/16.0
Browse files Browse the repository at this point in the history
Fork Sync Branch 16.0
  • Loading branch information
btl-bot authored Jul 25, 2024
2 parents e8f212e + 17389a8 commit f79801d
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ addon | version | maintainers | summary
[web_notify_channel_message](web_notify_channel_message/) | 16.0.1.0.0 | | Send an instant notification to channel users when a new message is posted
[web_pivot_computed_measure](web_pivot_computed_measure/) | 16.0.1.0.0 | [![CarlosRoca13](https://github.com/CarlosRoca13.png?size=30px)](https://github.com/CarlosRoca13) | Web Pivot Computed Measure
[web_pwa_oca](web_pwa_oca/) | 16.0.1.0.0 | [![eLBati](https://github.com/eLBati.png?size=30px)](https://github.com/eLBati) | Make Odoo a PWA
[web_refresher](web_refresher/) | 16.0.3.1.0 | | Web Refresher
[web_refresher](web_refresher/) | 16.0.3.1.2 | | Web Refresher
[web_remember_tree_column_width](web_remember_tree_column_width/) | 16.0.1.0.2 | [![frahikLV](https://github.com/frahikLV.png?size=30px)](https://github.com/frahikLV) [![luisg123v](https://github.com/luisg123v.png?size=30px)](https://github.com/luisg123v) [![cuongnmtm](https://github.com/cuongnmtm.png?size=30px)](https://github.com/cuongnmtm) | Remember the tree columns' widths across sessions.
[web_responsive](web_responsive/) | 16.0.1.2.10 | [![Tardo](https://github.com/Tardo.png?size=30px)](https://github.com/Tardo) [![SplashS](https://github.com/SplashS.png?size=30px)](https://github.com/SplashS) | Responsive web client, community-supported
[web_save_discard_button](web_save_discard_button/) | 16.0.1.0.2 | [![synconics](https://github.com/synconics.png?size=30px)](https://github.com/synconics) | Save & Discard Buttons
Expand Down
2 changes: 1 addition & 1 deletion web_refresher/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Web Refresher
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9cd1f0a6edcccfc60252f7115a9171954f3aea28033a911f837e5061821f6b33
!! source digest: sha256:db958a642d9c373c0e9bad709726c3a6a2ffd8ea8037d523de633fb9d7b268eb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion web_refresher/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Web Refresher",
"version": "16.0.3.1.0",
"version": "16.0.3.1.2",
"author": "Compassion Switzerland, Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/web",
Expand Down
13 changes: 8 additions & 5 deletions web_refresher/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -366,7 +367,7 @@ <h1 class="title">Web Refresher</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9cd1f0a6edcccfc60252f7115a9171954f3aea28033a911f837e5061821f6b33
!! source digest: sha256:db958a642d9c373c0e9bad709726c3a6a2ffd8ea8037d523de633fb9d7b268eb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/16.0/web_refresher"><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-16-0/web-16-0-web_refresher"><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=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Adds a button next to the pager (in trees/kanban views) to refresh the displayed list.</p>
Expand Down Expand Up @@ -420,7 +421,9 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
Expand Down
20 changes: 12 additions & 8 deletions web_refresher/static/src/js/control_panel.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ ControlPanel.components = Object.assign({}, ControlPanel.components, {
Refresher,
});

/**
* @property {String[]} forbiddenSubTypes
* @property {Object<String, *>} refresherProps
*/
patch(ControlPanel.prototype, "web_refresher.ControlPanel", {
setup() {
this._super(...arguments);
const {config, searchModel} = this.env;
const forbiddenSubType = ["base_settings"];
if (!forbiddenSubType.includes(config.viewSubType)) {
this.refresherProps = {
searchModel: searchModel,
pagerProps: this.pagerProps,
};
}
this.forbiddenSubTypes = ["base_settings"];
this.refresherProps = {
searchModel: this.env.searchModel,
pagerProps: this.pagerProps,
};
this.displayRefresher = !this.forbiddenSubTypes.includes(
this.env.config.viewSubType
);
},
});
4 changes: 2 additions & 2 deletions web_refresher/static/src/js/refresher.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ export class Refresher extends Component {
* @returns {Promise<Boolean>}
*/
async refresh() {
let updated = this._searchModelRefresh();
let updated = await this._pagerRefresh();
if (!updated) {
updated = await this._pagerRefresh();
updated = this._searchModelRefresh();
}
return updated;
}
Expand Down
8 changes: 4 additions & 4 deletions web_refresher/static/src/xml/control_panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<xpath expr="//div[hasclass('o_cp_pager')]" position="before">
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher t-props="refresherProps" />
<Refresher t-if="displayRefresher" t-props="refresherProps" />
</div>
</xpath>
<xpath expr="//div[hasclass('o_cp_bottom_right')]" position="before">
Expand All @@ -19,7 +19,7 @@
class="o_cp_bottom_right d-flex flex-row-reverse"
>
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher refresherReport="true" />
<Refresher t-if="displayRefresher" refresherReport="true" />
</div>
</div>
</xpath>
Expand All @@ -32,7 +32,7 @@
>
<xpath expr="//div[hasclass('o_cp_pager')]" position="before">
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher t-props="refresherProps" />
<Refresher t-if="displayRefresher" t-props="refresherProps" />
</div>
</xpath>
<xpath expr="//div[hasclass('o_cp_bottom_right')]" position="before">
Expand All @@ -41,7 +41,7 @@
class="o_cp_bottom_right d-flex flex-row-reverse"
>
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher refresherReport="true" />
<Refresher t-if="displayRefresher" refresherReport="true" />
</div>
</div>
</xpath>
Expand Down
4 changes: 2 additions & 2 deletions web_refresher/static/src/xml/form_control_panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<xpath expr="//div[hasclass('o_cp_pager')]" position="before">
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher t-props="refresherProps" />
<Refresher t-if="displayRefresher" t-props="refresherProps" />
</div>
</xpath>
<xpath expr="//div[hasclass('o_cp_bottom_right')]" position="before">
Expand All @@ -19,7 +19,7 @@
class="o_cp_bottom_right d-flex flex-row-reverse"
>
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher refresherReport="true" />
<Refresher t-if="displayRefresher" refresherReport="true" />
</div>
</div>
</xpath>
Expand Down

0 comments on commit f79801d

Please sign in to comment.