George Daramouskas
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
90 additions and
0 deletions
-
web_ir_actions_act_window_none/__init__.py
-
web_ir_actions_act_window_none/__manifest__.py
-
web_ir_actions_act_window_none/i18n/web_ir_actions_act_window_none.pot
-
web_ir_actions_act_window_none/readme/CONTRIBUTORS.rst
-
web_ir_actions_act_window_none/readme/DESCRIPTION.rst
-
web_ir_actions_act_window_none/readme/USAGE.rst
-
BIN
web_ir_actions_act_window_none/static/description/icon.png
-
web_ir_actions_act_window_none/static/src/js/web_ir_actions_act_window_none.js
-
web_ir_actions_act_window_none/views/templates.xml
|
|
@ -0,0 +1,2 @@ |
|
|
|
# Copyright 2019 Therp BV <https://therp.nl> |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|
|
@ -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', |
|
|
|
], |
|
|
|
} |
|
|
@ -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" |
|
|
|
|
|
|
@ -0,0 +1,8 @@ |
|
|
|
Credits |
|
|
|
======= |
|
|
|
|
|
|
|
Contributors |
|
|
|
------------ |
|
|
|
|
|
|
|
* Holger Brunn <hbrunn@therp.nl> |
|
|
|
* George Daramouskas <gdaramouskas@therp.nl> |
|
|
@ -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. |
|
|
@ -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 |
Width: 128
|
Height: 128
|
Size: 9.2 KiB
|
|
|
@ -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(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
@ -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> |