Browse Source

[MIG] dead_mans_switch_client: Migration to 10.0

pull/1090/head
Miku Laitinen 7 years ago
committed by Holger Brunn
parent
commit
13d3cc3c46
  1. 3
      dead_mans_switch_client/README.rst
  2. 9
      dead_mans_switch_client/__manifest__.py
  3. 22
      dead_mans_switch_client/data/ir_actions.xml
  4. 22
      dead_mans_switch_client/data/ir_cron.xml
  5. 5
      dead_mans_switch_client/models/dead_mans_switch_client.py
  6. 3
      dead_mans_switch_client/tests/test_dead_mans_switch_client.py

3
dead_mans_switch_client/README.rst

@ -30,7 +30,7 @@ This module doesn't have any visible effect on the client.
.. 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/9.0
:target: https://runbot.odoo-community.org/runbot/149/10.0
For further information, please visit:
@ -57,6 +57,7 @@ Contributors
* Holger Brunn <hbrunn@therp.nl>
* Jairo Llopis <yajo.sk8@gmail.com>
* Miku Laitinen <miku@avoin.systems>
Maintainer
----------

9
dead_mans_switch_client/__manifest__.py

@ -1,13 +1,14 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Therp BV <http://therp.nl>
# © 2017 Avoin.Systems - Miku Laitinen
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Dead man's switch (client)",
"version": "9.0.1.0.1",
"author": "Therp BV,Odoo Community Association (OCA)",
"version": "10.0.1.0.0",
"author": "Therp BV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Monitoring",
"summary": "Be notified when customers' odoo instances go down",
"summary": "Be notified when customers' Odoo instances go down",
"depends": [
'base',
],
@ -18,5 +19,5 @@
"demo": [
"demo/dead_mans_switch_client_demo.yml",
],
'installable': False,
'installable': True,
}

22
dead_mans_switch_client/data/ir_actions.xml

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<act_window id="action_setup" res_model="ir.config_parameter"
name="Configure the dead man's switch server" view_mode="form"
context="{'default_key': 'dead_mans_switch_client.url'}"/>
<record id="todo_setup" model="ir.actions.todo">
<field name="name">Configure the dead man's switch server</field>
<field name="type">automatic</field>
<field name="action_id" ref="action_setup" />
</record>
</data>
</openerp>
<odoo>
<act_window id="action_setup" res_model="ir.config_parameter"
name="Configure the dead man's switch server" view_mode="form"
context="{'default_key': 'dead_mans_switch_client.url'}"/>
<record id="todo_setup" model="ir.actions.todo">
<field name="name">Configure the dead man's switch server</field>
<field name="type">automatic</field>
<field name="action_id" ref="action_setup"/>
</record>
</odoo>

22
dead_mans_switch_client/data/ir_cron.xml

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="1">
<record id="cron_client" model="ir.cron">
<field name="name">Dead man&apos;s switch client</field>
<field name="interval_number">5</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="model">dead.mans.switch.client</field>
<field name="function">alive</field>
</record>
</data>
</openerp>
<odoo noupdate="1">
<record id="cron_client" model="ir.cron">
<field name="name">Dead man&apos;s switch client</field>
<field name="interval_number">5</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="model">dead.mans.switch.client</field>
<field name="function">alive</field>
</record>
</odoo>

5
dead_mans_switch_client/models/dead_mans_switch_client.py

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Therp BV <http://therp.nl>
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# © 2017 Avoin.Systems - Miku Laitinen
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import json
import logging
@ -10,8 +11,8 @@ try:
except ImportError: # pragma: no cover
psutil = None
import urllib2
from openerp import api, models
from openerp.tools.config import config
from odoo import api, models
from odoo.tools.config import config
SEND_TIMEOUT = 60

3
dead_mans_switch_client/tests/test_dead_mans_switch_client.py

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
# © 2015 Therp BV <http://therp.nl>
# © 2017 Avoin.Systems - Miku Laitinen
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
from odoo.tests.common import TransactionCase
class TestDeadMansSwitchClient(TransactionCase):

Loading…
Cancel
Save