Browse Source

Merge 03f9f6418a into ad79aa45cf

pull/1078/merge
Emīls Goško 5 years ago
committed by GitHub
parent
commit
5d24873527
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 55
      web_ir_actions_act_view_reload/README.rst
  2. 0
      web_ir_actions_act_view_reload/__init__.py
  3. 18
      web_ir_actions_act_view_reload/__manifest__.py
  4. 13
      web_ir_actions_act_view_reload/i18n/web_ir_actions_act_view_reload.pot
  5. BIN
      web_ir_actions_act_view_reload/static/description/icon.png
  6. 16
      web_ir_actions_act_view_reload/static/src/js/web_ir_actions_act_view_reload.js
  7. 14
      web_ir_actions_act_view_reload/views/web_ir_actions_act_view_reload.xml

55
web_ir_actions_act_view_reload/README.rst

@ -0,0 +1,55 @@
.. image:: https://www.gnu.org/graphics/lgplv3-147x51.png
:target: https://www.gnu.org/licenses/lgpl-3.0.en.html
:alt: License: LGPL-v3
=========================
Web Actions Window Reload
=========================
This module provides a way to trigger reload of the current window on ActionManager
Usage
=====
To use this functionality you need to return following action:
.. code-block:: python
@api.multi
def foo():
self.ensure_one()
return {
'type': 'ir.actions.act_view_reload',
}
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/web/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Petar Najman <petar.najman@modoolar.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
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.
To contribute to this module, please visit https://odoo-community.org.

0
web_ir_actions_act_view_reload/__init__.py

18
web_ir_actions_act_view_reload/__manifest__.py

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2017 - 2018 Modoolar <info@modoolar.com>
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
{
"name": "Web Actions View Reload",
"summary": "Enables reload of the current view via ActionManager",
"category": "Web",
"version": "10.0.1.0.0",
"license": "LGPL-3",
"author": "Modoolar, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web/",
"depends": ["web"],
"data": [
"views/web_ir_actions_act_view_reload.xml",
],
"installable": True,
}

13
web_ir_actions_act_view_reload/i18n/web_ir_actions_act_view_reload.pot

@ -0,0 +1,13 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.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"

BIN
web_ir_actions_act_view_reload/static/description/icon.png

After

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

16
web_ir_actions_act_view_reload/static/src/js/web_ir_actions_act_view_reload.js

@ -0,0 +1,16 @@
// Copyright 2017 - 2018 Modoolar <info@modoolar.com>
// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
odoo.define('web_ir_actions_act_view_reload.ir_actions_act_view_reload', function (require) {
"use strict";
var ActionManager = require('web.ActionManager');
ActionManager.include({
ir_actions_act_view_reload: function (action, options) {
if (this.inner_widget && this.inner_widget.active_view && this.inner_widget.active_view.controller)
this.inner_widget.active_view.controller.reload();
return $.when();
}
});
});

14
web_ir_actions_act_view_reload/views/web_ir_actions_act_view_reload.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
# Copyright 2017 - 2018 Modoolar <info@modoolar.com>
# 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">
<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"/>
</xpath>
</template>
</odoo>
Loading…
Cancel
Save