Browse Source

[ADD] Module disable_openerp_online

pull/2/head
unknown 11 years ago
committed by Stefan Rijnhart
parent
commit
4155686c34
  1. 24
      disable_openerp_online/__init__.py
  2. 55
      disable_openerp_online/__openerp__.py
  3. 8
      disable_openerp_online/data/ir_cron.xml
  4. 7
      disable_openerp_online/data/ir_ui_menu.xml
  5. 21
      disable_openerp_online/model/__init__.py
  6. 28
      disable_openerp_online/model/publisher_warranty_contract.py
  7. BIN
      disable_openerp_online/static/src/img/icon.png
  8. 8
      disable_openerp_online/static/src/xml/base.xml

24
disable_openerp_online/__init__.py

@ -0,0 +1,24 @@
# -*- 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/>.
#
##############################################################################
import model
from openerp.tools.misc import upload_data_thread
upload_data_thread.run = lambda x: None

55
disable_openerp_online/__openerp__.py

@ -0,0 +1,55 @@
# -*- 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/>.
#
##############################################################################
{
"name" : "Remove openerp.com bindings",
"version" : "1.0",
"author" : "Therp BV",
"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 removed
* help and account menu items in user menu are removed
""",
"category" : "",
"depends" : [
'base',
'mail',
],
"data" : [
'data/ir_ui_menu.xml',
'data/ir_cron.xml',
],
"js": [
],
"css": [
],
"qweb": [
'static/src/xml/base.xml',
],
"auto_install": False,
"installable": True,
"external_dependencies" : {
'python' : [],
},
}

8
disable_openerp_online/data/ir_cron.xml

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

7
disable_openerp_online/data/ir_ui_menu.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<delete model="ir.ui.menu" id="base.module_mi" />
<delete model="ir.ui.menu" id="base.menu_module_updates" />
</data>
</openerp>

21
disable_openerp_online/model/__init__.py

@ -0,0 +1,21 @@
# -*- 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/>.
#
##############################################################################
import publisher_warranty_contract

28
disable_openerp_online/model/publisher_warranty_contract.py

@ -0,0 +1,28 @@
# -*- 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.osv.orm import Model
class publisher_warranty_contract(Model):
_inherit = 'publisher_warranty.contract'
def update_notification(self, cr, uid, ids, cron_mode=True, context=None):
pass

BIN
disable_openerp_online/static/src/img/icon.png

After

Width: 80  |  Height: 80  |  Size: 4.0 KiB

8
disable_openerp_online/static/src/xml/base.xml

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