Browse Source

Merge db0c96185d into d736ee4460

pull/1297/merge
George Daramouskas 5 years ago
committed by GitHub
parent
commit
8fb88eb896
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      web_ir_actions_act_window_none/__init__.py
  2. 16
      web_ir_actions_act_window_none/__manifest__.py
  3. 14
      web_ir_actions_act_window_none/i18n/web_ir_actions_act_window_none.pot
  4. 8
      web_ir_actions_act_window_none/readme/CONTRIBUTORS.rst
  5. 9
      web_ir_actions_act_window_none/readme/DESCRIPTION.rst
  6. 17
      web_ir_actions_act_window_none/readme/USAGE.rst
  7. BIN
      web_ir_actions_act_window_none/static/description/icon.png
  8. 16
      web_ir_actions_act_window_none/static/src/js/web_ir_actions_act_window_none.js
  9. 8
      web_ir_actions_act_window_none/views/templates.xml

2
web_ir_actions_act_window_none/__init__.py

@ -0,0 +1,2 @@
# Copyright 2019 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

16
web_ir_actions_act_window_none/__manifest__.py

@ -0,0 +1,16 @@
# Copyright 2019 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Noop action",
"version": "11.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Hidden/Dependency",
"summary": "Execute nothing",
"depends": [
'web',
],
"data": [
'views/templates.xml',
],
}

14
web_ir_actions_act_window_none/i18n/web_ir_actions_act_window_none.pot

@ -0,0 +1,14 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

8
web_ir_actions_act_window_none/readme/CONTRIBUTORS.rst

@ -0,0 +1,8 @@
Credits
=======
Contributors
------------
* Holger Brunn <hbrunn@therp.nl>
* George Daramouskas <gdaramouskas@therp.nl>

9
web_ir_actions_act_window_none/readme/DESCRIPTION.rst

@ -0,0 +1,9 @@
===========
Noop action
===========
This module was written to have an action that does nothing. A notorious case
where this is useful is buttons on popup windows, because they need to return
an action. Given the default here is `ir.actions.act_window_close`, you'll
have to jump through some hoops if you have a button that is not supposed to
close the popup window.

17
web_ir_actions_act_window_none/readme/USAGE.rst

@ -0,0 +1,17 @@
Usage
=====
To use this module, depend on it in your module and return::
{'type': 'ir.actions.act_window.none'}
The button will trigger a reload of the popup's form, in case you want to
suppress this, set key ``reload`` to ``False`` in the action you return.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/162/8.0
For further information, please visit:
* https://www.odoo.com/forum/help-1

BIN
web_ir_actions_act_window_none/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

16
web_ir_actions_act_window_none/static/src/js/web_ir_actions_act_window_none.js

@ -0,0 +1,16 @@
//Copyright 2019 Therp BV <http://therp.nl>
//License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
odoo.define('web_ir_actions_act_window_none.act_window_none',
function (required) {
var ActionManager = require('web.ActionManager');
ActionManager.include({
ir_actions_act_window_none: function (action) {
if (action.reload === undefined || action.reload) {
if (this.dialog_widget && this.dialog_widget.views.form) {
return this.dialog_widget.views.form.controller.reload();
}
}
}
});
}

8
web_ir_actions_act_window_none/views/templates.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="assets_backend" name="web_ir_actions_act_window_none assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_ir_actions_act_window_none/static/src/js/web_ir_actions_act_window_none.js"></script>
</xpath>
</template>
</odoo>
Loading…
Cancel
Save