Skip to content

Commit

Permalink
[MIG] fieldservice_activity: Migratation to 13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brian10048 committed Jul 22, 2020
1 parent 740408f commit e8ccff4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fieldservice_activity/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Field Service Activity",
"summary": """Field Service Activities are a set of actions
that need to be performed on a service order""",
"version": "12.0.1.0.0",
"version": "13.0.1.0.0",
"category": "Field Service",
"license": "AGPL-3",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
Expand Down
4 changes: 1 addition & 3 deletions fieldservice_activity/models/fsm_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from odoo import fields, models


class FSMActiity(models.Model):
class FSMActivity(models.Model):
_name = "fsm.activity"
_description = "Field Service Activity"

Expand Down Expand Up @@ -35,13 +35,11 @@ class FSMActiity(models.Model):
default="todo",
)

@api.multi
def action_done(self):
self.completed = True
self.completed_on = datetime.now()
self.completed_by = self.env.user
self.state = "done"

@api.multi
def action_cancel(self):
self.state = "cancel"
4 changes: 1 addition & 3 deletions fieldservice_activity/models/fsm_order.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2019, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models
from odoo import _, fields, models
from odoo.exceptions import ValidationError


Expand All @@ -10,7 +10,6 @@ class FSMOrder(models.Model):

order_activity_ids = fields.One2many("fsm.activity", "fsm_order_id", "Activites")

@api.multi
@api.onchange("template_id")
def _onchange_template_id(self):
res = super()._onchange_template_id()
Expand All @@ -34,7 +33,6 @@ def _onchange_template_id(self):
rec.template_id.temp_activity_ids.write({"fsm_template_id": False})
return res

@api.multi
def action_complete(self):
res = super().action_complete()
for activity_id in self.order_activity_ids:
Expand Down

0 comments on commit e8ccff4

Please sign in to comment.