Skip to content

Commit

Permalink
[MIG] iot_rule: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoRomera committed Aug 6, 2024
1 parent cb6eb6c commit 5fa4120
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion iot_rule/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "IoT Rule",
"summary": """
Define IoT Rules (Keys that control Inputs)""",
"version": "15.0.1.0.0",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "CreuBlanca,ForgeFlow,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/iot",
Expand Down
2 changes: 1 addition & 1 deletion iot_rule/models/iot_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def write(self, vals):
device_input.lock_id.write(
{"name": vals.get("name") + " / " + input_name}
)
return super(IotDevice, self).write(vals)
return super().write(vals)
2 changes: 1 addition & 1 deletion iot_rule/tests/test_iot_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class TestIotRule(SavepointCase):
@classmethod
def setUpClass(cls):
super(TestIotRule, cls).setUpClass()
super().setUpClass()

cls.rule_1 = cls.env["iot.rule"].create({"name": "rule 1"})
cls.rule_2 = cls.env["iot.rule"].create({"name": "rule 2"})
Expand Down
4 changes: 2 additions & 2 deletions iot_rule/views/iot_device_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
groups="iot_oca.group_iot_manager"
string="Generate IoT Lock for this Input"
type="object"
attrs="{'invisible': [('lock_id', '!=', False)]}"
invisible="lock_id"
/>
<field
name="lock_id"
groups="iot_oca.group_iot_user"
attrs="{'invisible': [('lock_id', '=', False)]}"
invisible="not lock_id"
string="IoT Lock associated"
/>
</field>
Expand Down
2 changes: 1 addition & 1 deletion iot_rule/views/iot_key.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name="web_ribbon"
text="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<field name="active" invisible="1" />
<div class="oe_button_box" name="button_box">
Expand Down
2 changes: 1 addition & 1 deletion iot_rule/views/iot_lock.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name="web_ribbon"
text="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<field name="active" invisible="1" />
<div class="oe_button_box" name="button_box">
Expand Down
2 changes: 1 addition & 1 deletion iot_rule/views/iot_rule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name="web_ribbon"
text="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<field name="active" invisible="1" />
<div class="oe_button_box" name="button_box" />
Expand Down
2 changes: 1 addition & 1 deletion iot_rule/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class="oe_stat_button"
name="action_view_iot_key"
type="object"
attrs="{'invisible': [('iot_key_count', '=', 0)]}"
invisible="iot_key_count == 0"
icon="fa-key"
>
<field string="Keys" name="iot_key_count" widget="statinfo" />
Expand Down
4 changes: 2 additions & 2 deletions iot_rule/wizards/iot_key_wizard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
name="create_key"
string="Create"
class="btn-primary"
attrs="{'invisible': [('iot_key_id', '!=', False)]}"
invisible="iot_key_id"
type="object"
/>
<button
name="update_key"
string="Update"
class="btn-primary"
attrs="{'invisible': [('iot_key_id', '=', False)]}"
invisible="not iot_key_id"
type="object"
/>
<button string="Cancel" class="btn-default" special="cancel" />
Expand Down

0 comments on commit 5fa4120

Please sign in to comment.