Browse Source

[MIG] Migrate the module disable_openerp_online to v9

pull/399/head
Bui Ngoc Tu 9 years ago
parent
commit
8d49bd445a
  1. 4
      disable_openerp_online/__openerp__.py
  2. 16
      disable_openerp_online/static/src/js/disable_openerp_online.js
  3. 2
      disable_openerp_online/static/src/xml/base.xml
  4. 5
      disable_openerp_online/views/disable_openerp_online.xml
  5. 2
      disable_openerp_online/views/ir_ui_menu.xml

4
disable_openerp_online/__openerp__.py

@ -20,7 +20,7 @@
############################################################################## ##############################################################################
{ {
"name": "Remove odoo.com bindings", "name": "Remove odoo.com bindings",
"version": "8.0.1.1.0",
"version": "9.0.0.1.0",
"author": "Therp BV,Odoo Community Association (OCA)", "author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",
"complexity": "normal", "complexity": "normal",
@ -47,5 +47,5 @@ come with the standard code:
"qweb": [ "qweb": [
'static/src/xml/base.xml', 'static/src/xml/base.xml',
], ],
'installable': False,
'installable': True,
} }

16
disable_openerp_online/static/src/js/disable_openerp_online.js

@ -1,7 +1,9 @@
openerp.disable_openerp_online = function(instance) {
// Disabling the lookup of a valid OPW for the dbuuid,
// resulting in 'Your OpenERP is not supported'
instance.web.WebClient.include({
show_annoucement_bar: function() {}
});
};
odoo.define('disable_openerp_online.announcement', function (require) {
"use strict";
var WebClient = require('web.WebClient');
WebClient.include({
show_announcement_bar: function() {
// do nothing here
}
});
});

2
disable_openerp_online/static/src/xml/base.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<templates> <templates>
<t t-extend="UserMenu"> <t t-extend="UserMenu">
<t t-jquery="a[data-menu='account'], a[data-menu='help']">
<t t-jquery="a[data-menu='account'], a[data-menu='documentation'], a[data-menu='support']">
this.parent().remove(); this.parent().remove();
</t> </t>
</t> </t>

5
disable_openerp_online/views/disable_openerp_online.xml

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<openerp> <openerp>
<data> <data>
<template id="assets_backend" name="disable_openerp_online assets" inherit_id="web.assets_backend">
<!-- the name of template will affect the order include the js,
this js file should load after annoucement.js to override function
in annoucement.js file -->
<template id="assets_backend" name="mail disable_openerp_online assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" src="/disable_openerp_online/static/src/js/disable_openerp_online.js"></script> <script type="text/javascript" src="/disable_openerp_online/static/src/js/disable_openerp_online.js"></script>
</xpath> </xpath>

2
disable_openerp_online/views/ir_ui_menu.xml

@ -2,7 +2,7 @@
<openerp> <openerp>
<data> <data>
<!-- Menus moved under Tools\Parameters -->
<!-- Menus moved under Tools\Parameters -->
<record model="ir.ui.menu" id="base.module_mi"> <record model="ir.ui.menu" id="base.module_mi">
<field name="parent_id" ref="base.menu_ir_property"/> <field name="parent_id" ref="base.menu_ir_property"/>
</record> </record>

Loading…
Cancel
Save