[MIG] web_action_conditionable: Migration to 11.0

pull/2435/head
andreparames 2018-01-22 18:17:04 +01:00 committed by Jasper Jumelet
parent 7f1ea1e2e4
commit 1cff9b12ba
5 changed files with 53 additions and 56 deletions

View File

@ -1,6 +1,8 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg .. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3 :alt: License: AGPL-3
========================
Web Action Conditionable Web Action Conditionable
======================== ========================
@ -34,42 +36,38 @@ Not needed.
Usage Usage
===== =====
To use this module, you need to: This module has no direct interface, it only adds functionality for custom views.
* go to ...
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/web/8.0 :target: https://runbot.odoo-community.org/runbot/162/11.0
.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt .. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
.. branch is "8.0" for example .. branch is "8.0" for example
For further information, please visit:
* https://www.odoo.com/forum/help-1
Known issues / Roadmap
======================
* ...
Bug Tracker Bug Tracker
=========== ===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_. Bugs are tracked on `GitHub Issues
In case of trouble, please check there if your issue has already been reported. <https://github.com/OCA/web/issues>`_. In case of trouble, please
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback check there if your issue has already been reported. If you spotted it first,
`here <https://github.com/OCA/web/issues/new?body=module:web_action_conditionableversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. help us smash it by providing detailed and welcomed feedback.
Credits Credits
======= =======
Images
------
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
Contributors Contributors
------------ ------------
* Cristian Salamea <cristian.salamea@gmail.com> * Cristian Salamea <cristian.salamea@gmail.com>
* André Paramés <github@andreparames.com> (https://www.acsone.eu/)
Do not contact contributors directly about support or help with technical issues.
Maintainer Maintainer
---------- ----------
@ -84,4 +82,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
To contribute to this module, please visit http://odoo-community.org. To contribute to this module, please visit https://odoo-community.org.

View File

@ -1 +0,0 @@
# -*- coding: utf-8 -*-

View File

@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
{ {
"name": 'web_action_conditionable', "name": 'web_action_conditionable',
"version": "8.0.0.1.0", "version": "11.0.1.0.0",
"depends": [ "depends": [
'base', 'base',
'web', 'web',
], ],
'data': ['views/view.xml'], 'data': ['views/view.xml'],
"author": "Cristian Salamea,Odoo Community Association (OCA)", "author": "Cristian Salamea,Odoo Community Association (OCA)",
'installable': False, "website": "https://github.com/OCA/web",
"license": "AGPL-3",
'installable': True,
} }

View File

@ -1,7 +1,9 @@
/*global openerp, _, $ */ odoo.define('web.web_action_conditionable', function (require) {
"use strict";
openerp.web_action_conditionable = function (instance) { var View = require('web.View');
instance.web.View.include({
View.include({
is_action_enabled: function(action) { is_action_enabled: function(action) {
var attrs = this.fields_view.arch.attrs; var attrs = this.fields_view.arch.attrs;
if (action in attrs) { if (action in attrs) {
@ -19,4 +21,4 @@ openerp.web_action_conditionable = function (instance) {
} }
} }
}); });
} });

View File

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<openerp> <odoo>
<data>
<template id="assets_backend" name="action conditionable assets" inherit_id="web.assets_backend"> <template id="assets_backend" name="action conditionable assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" src="/web_action_conditionable/static/src/js/views.js"></script> <script type="text/javascript" src="/web_action_conditionable/static/src/js/views.js"></script>
</xpath> </xpath>
</template> </template>
</data> </odoo>
</openerp>