mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] pre-commit run after update
Includes some manual fixes to silent ESLint warnings. [UPD] README.rst [UPD] README.rst
This commit is contained in:
@@ -19,11 +19,8 @@ Web Actions View Reload
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_ir_actions_act_view_reload
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/162/13.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|badge1| |badge2| |badge3| |badge4|
|
||||
|
||||
This module provides a way to trigger reload of the current window on ActionManager
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" 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" 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" href="https://github.com/OCA/web/tree/13.0/web_ir_actions_act_view_reload"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_ir_actions_act_view_reload"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" 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" 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" href="https://github.com/OCA/web/tree/13.0/web_ir_actions_act_view_reload"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_ir_actions_act_view_reload"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a></p>
|
||||
<p>This module provides a way to trigger reload of the current window on ActionManager</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
@@ -386,7 +386,7 @@ ul.auto-toc {
|
||||
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
|
||||
<p>To use this functionality you need to return following action:</p>
|
||||
<pre class="code python literal-block">
|
||||
<span class="nd">@api.multi</span>
|
||||
<span class="nd">@api</span><span class="o">.</span><span class="n">multi</span>
|
||||
<span class="k">def</span> <span class="nf">foo</span><span class="p">():</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">ensure_one</span><span class="p">()</span>
|
||||
<span class="k">return</span> <span class="p">{</span>
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// Copyright 2017 - 2018 Modoolar <info@modoolar.com>
|
||||
// Copyright 2018 Modoolar <info@modoolar.com>
|
||||
// License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||
odoo.define('web_ir_actions_act_view_reload.ir_actions_act_view_reload', function (require) {
|
||||
odoo.define("web_ir_actions_act_view_reload.ir_actions_act_view_reload", function(
|
||||
require
|
||||
) {
|
||||
"use strict";
|
||||
|
||||
var ActionManager = require('web.ActionManager');
|
||||
var ActionManager = require("web.ActionManager");
|
||||
|
||||
ActionManager.include({
|
||||
|
||||
/**
|
||||
* Intercept action handling to detect extra action type
|
||||
* @override
|
||||
*/
|
||||
_handleAction: function (action, options) {
|
||||
if (action.type === 'ir.actions.act_view_reload') {
|
||||
_handleAction: function(action, options) {
|
||||
if (action.type === "ir.actions.act_view_reload") {
|
||||
return this._executeReloadAction(action, options);
|
||||
}
|
||||
|
||||
@@ -24,7 +25,7 @@ odoo.define('web_ir_actions_act_view_reload.ir_actions_act_view_reload', functio
|
||||
* Handle 'ir.actions.act_view_reload' action
|
||||
* @returns {Promise} Resolved promise
|
||||
*/
|
||||
_executeReloadAction: function () {
|
||||
_executeReloadAction: function() {
|
||||
var controller = this.getCurrentController();
|
||||
if (controller && controller.widget) {
|
||||
controller.widget.reload();
|
||||
@@ -32,7 +33,5 @@ odoo.define('web_ir_actions_act_view_reload.ir_actions_act_view_reload', functio
|
||||
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2017 - 2018 Modoolar <info@modoolar.com>
|
||||
Copyright 2018 Brainbean Apps
|
||||
License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
|
||||
-->
|
||||
<odoo>
|
||||
<template id="assets_backend" name="web_ir_actions_act_view_reload assets" inherit_id="web.assets_backend">
|
||||
<template
|
||||
id="assets_backend"
|
||||
name="web_ir_actions_act_view_reload assets"
|
||||
inherit_id="web.assets_backend"
|
||||
>
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript"
|
||||
src="/web_ir_actions_act_view_reload/static/src/js/web_ir_actions_act_view_reload.js"/>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/web_ir_actions_act_view_reload/static/src/js/web_ir_actions_act_view_reload.js"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user