Browse Source

[PORT] disable_odoo_online. [REF] remove obsolete code. OCA convention. (#583)

* [PORT] disable_odoo_online. [REF] remove obsolete code. OCA convention.

* [FIX] restauring old feature

* [IMP] do not disable some feature for Enterprise Edition. [REF] some improvements
pull/586/head
Sylvain LE GAL 8 years ago
committed by Dave Lasley
parent
commit
dff8628506
  1. 56
      disable_odoo_online/README.rst
  2. 26
      disable_odoo_online/__init__.py
  3. 43
      disable_odoo_online/__manifest__.py
  4. 8
      disable_odoo_online/data/ir_cron.xml
  5. 21
      disable_odoo_online/model/__init__.py
  6. 29
      disable_odoo_online/model/publisher_warranty_contract.py
  7. 2
      disable_odoo_online/models/__init__.py
  8. 16
      disable_odoo_online/models/publisher_warranty_contract.py
  9. 9
      disable_odoo_online/static/src/js/disable_odoo_online.js
  10. 13
      disable_odoo_online/views/disable_odoo_online.xml
  11. 6
      disable_odoo_online/views/ir_ui_menu.xml

56
disable_odoo_online/README.rst

@ -0,0 +1,56 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
========================
Remove odoo.com Bindings
========================
This module deactivates all bindings to odoo.com that come with the standard
code:
* update notifier code is deactivated and the function is overwritten
* apps and updates menu items in settings are hidden inside Tools\\Parameters
* upload thread is deactivated
Usage
=====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/10.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Holger Brunn <hbrunn@therp.nl>
* Stefan Rijnhart <stefan@opener.am>
* Sylvain LE GAL (https://twitter.com/legalsylvain)
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.

26
disable_odoo_online/__init__.py

@ -1,24 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import model
# Copyright (C) 2013 Therp BV (<http://therp.nl>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tools.misc import upload_data_thread
from . import models
from odoo.tools.misc import upload_data_thread
upload_data_thread.run = lambda x: None

43
disable_odoo_online/__manifest__.py

@ -1,51 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# Copyright (C) 2013 Therp BV (<http://therp.nl>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Remove odoo.com bindings",
"version": "9.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"name": "Remove odoo.com Bindings",
"version": "10.0.1.0.0",
"author": "Therp BV,GRAP,Odoo Community Association (OCA)",
"license": "AGPL-3",
"complexity": "normal",
"description": """
This module deactivates all bindings to openerp.com that
come with the standard code:
* update notifier code is deactivated and the function is overwritten
* apps and updates menu items in settings are hidden inside Tools\\Parameters
* help and account menu items in user menu are removed
* prevent lookup of OPW for current database uuid and resulting
'unsupported' warning
""",
"category": "",
"category": "base",
"depends": [
'base',
'mail',
],
"data": [
"views/disable_odoo_online.xml",
'views/ir_ui_menu.xml',
'data/ir_cron.xml',
],
"qweb": [
'static/src/xml/base.xml',
],
'installable': False,
'installable': True,
}

8
disable_odoo_online/data/ir_cron.xml

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<odoo>
<record id="mail.ir_cron_module_update_notification" model="ir.cron">
<field name="active" eval="False" />
</record>
</data>
</openerp>
</odoo>

21
disable_odoo_online/model/__init__.py

@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import publisher_warranty_contract

29
disable_odoo_online/model/publisher_warranty_contract.py

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import api, models
class publisher_warranty_contract(models.AbstractModel):
_inherit = 'publisher_warranty.contract'
@api.multi
def update_notification(self, cron_mode=True, context=None):
pass

2
disable_odoo_online/models/__init__.py

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import publisher_warranty_contract

16
disable_odoo_online/models/publisher_warranty_contract.py

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2013 Therp BV (<http://therp.nl>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models
from odoo.release import version_info
class PublisherWarrantyContract(models.AbstractModel):
_inherit = 'publisher_warranty.contract'
@api.multi
def update_notification(self, cron_mode=True):
if version_info[5] == 'e':
return super(PublisherWarrantyContract, self).update_notification(
cron_mode=cron_mode)

9
disable_odoo_online/static/src/js/disable_odoo_online.js

@ -1,9 +0,0 @@
odoo.define('disable_odoo_online.announcement', function (require) {
"use strict";
var WebClient = require('web.WebClient');
WebClient.include({
show_announcement_bar: function() {
// do nothing here
}
});
});

13
disable_odoo_online/views/disable_odoo_online.xml

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- 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_odoo_online assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/disable_odoo_online/static/src/js/disable_odoo_online.js"></script>
</xpath>
</template>
</data>
</openerp>

6
disable_odoo_online/views/ir_ui_menu.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<odoo>
<!-- Menus moved under Tools\Parameters -->
<record model="ir.ui.menu" id="base.module_mi">
@ -11,5 +10,4 @@
<field name="parent_id" ref="base.menu_ir_property"/>
</record>
</data>
</openerp>
</odoo>
Loading…
Cancel
Save