Skip to content

Commit

Permalink
[IMP] fieldservice_stage_migration: black, isort, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
brian10048 committed Jul 21, 2020
1 parent 7dc064f commit ab3abda
Show file tree
Hide file tree
Showing 8 changed files with 736 additions and 471 deletions.
40 changes: 16 additions & 24 deletions fieldservice_stage_server_action/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
# Copyright (C) 2019 Open Source Integrators
# # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
'name': 'FSM Stage Server Action',
'summary': 'Execute server actions when reaching a Field Service stage',
'version': '12.0.1.0.0',
'category': 'Field Service',
'author': 'Open Source Integrators, Odoo Community Association (OCA)',
'website': 'https://github.com/ursais/osi-addons',
'depends': [
'fieldservice',
'fieldservice_substatus',
'base_automation'
"name": "FSM Stage Server Action",
"summary": "Execute server actions when reaching a Field Service stage",
"version": "12.0.1.0.0",
"category": "Field Service",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"website": "https://github.com/ursais/osi-addons",
"depends": ["fieldservice", "fieldservice_substatus", "base_automation"],
"data": [
"data/ir_server_action.xml",
"data/fsm_stage.xml",
"data/base_automation.xml",
"views/fsm_stage.xml",
],
'data': [
'data/ir_server_action.xml',
'data/fsm_stage.xml',
'data/base_automation.xml',
'views/fsm_stage.xml'
],
'installable': True,
'license': 'AGPL-3',
'development_status': 'Beta',
'maintainers': [
'wolfhall',
'max3903',
'osi-scampbell'
]
"installable": True,
"license": "AGPL-3",
"development_status": "Beta",
"maintainers": ["wolfhall", "max3903", "osi-scampbell"],
}
18 changes: 9 additions & 9 deletions fieldservice_stage_server_action/data/base_automation.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<odoo>
<record id="fsm_order_email_sender" model="base.automation">
<field name="name">FSM Order Email Sender</field>
<field name="model_id" ref="fieldservice.model_fsm_order"/>
<field name="trigger">on_create_or_write</field>
<field name="active" eval="True"/>
<field name="state">multi</field>
<field name="child_ids" eval=
<record id="fsm_order_email_sender" model="base.automation">
<field name="name">FSM Order Email Sender</field>
<field name="model_id" ref="fieldservice.model_fsm_order" />
<field name="trigger">on_create_or_write</field>
<field name="active" eval="True" />
<field name="state">multi</field>
<field name="child_ids" eval=
"[(6, 0, [
ref('fsm_order_parent_completed'),
ref('fsm_order_parent_canceled')])
]"/>
</record>
]" />
</record>
</odoo>
12 changes: 6 additions & 6 deletions fieldservice_stage_server_action/data/fsm_stage.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<odoo>
<record id="fieldservice.fsm_stage_completed" model="fsm.stage">
<field name="action_id" ref="fsm_order_parent_completed"/>
</record>
<record id="fieldservice.fsm_stage_completed" model="fsm.stage">
<field name="action_id" ref="fsm_order_parent_completed" />
</record>

<record id="fieldservice.fsm_stage_cancelled" model="fsm.stage">
<field name="action_id" ref="fsm_order_parent_canceled"/>
</record>
<record id="fieldservice.fsm_stage_cancelled" model="fsm.stage">
<field name="action_id" ref="fsm_order_parent_canceled" />
</record>
</odoo>
20 changes: 10 additions & 10 deletions fieldservice_stage_server_action/data/ir_server_action.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<odoo>
<record id="fsm_order_parent_completed" model="ir.actions.server">
<field name="name">FSM Order Completed Parent</field>
<field name="model_id" ref="fieldservice.model_fsm_order"/>
<field name="state">multi</field>
</record>
<record id="fsm_order_parent_completed" model="ir.actions.server">
<field name="name">FSM Order Completed Parent</field>
<field name="model_id" ref="fieldservice.model_fsm_order" />
<field name="state">multi</field>
</record>

<record id="fsm_order_parent_canceled" model="ir.actions.server">
<field name="name">FSM Order Canceled Parent</field>
<field name="model_id" ref="fieldservice.model_fsm_order"/>
<field name="state">multi</field>
</record>
<record id="fsm_order_parent_canceled" model="ir.actions.server">
<field name="name">FSM Order Canceled Parent</field>
<field name="model_id" ref="fieldservice.model_fsm_order" />
<field name="state">multi</field>
</record>
</odoo>
4 changes: 1 addition & 3 deletions fieldservice_stage_server_action/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import (
fsm_stage,
)
from . import fsm_stage
4 changes: 2 additions & 2 deletions fieldservice_stage_server_action/models/fsm_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@


class FSMStage(models.Model):
_inherit = 'fsm.stage'
_inherit = "fsm.stage"

action_id = fields.Many2one('ir.actions.server', string="Server Action")
action_id = fields.Many2one("ir.actions.server", string="Server Action")
Loading

0 comments on commit ab3abda

Please sign in to comment.