summaryrefslogtreecommitdiff
path: root/addons/gamification/models/challenge.py
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2019-07-10 14:59:37 +0200
committerAdrian Torres <adt@odoo.com>2019-07-17 14:13:12 +0200
commit4b38cc6590abcb58a0ca102a06063eb3db7ac1f4 (patch)
treecfd11739fc6b4c0cb4b23b54cc6badad4bf5c55e /addons/gamification/models/challenge.py
parentf6fdde96bddfedf8764cd8a73089e44340d476ae (diff)
[REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
Diffstat (limited to 'addons/gamification/models/challenge.py')
-rw-r--r--addons/gamification/models/challenge.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py
index 503ec655c5c..08194e0d7ec 100644
--- a/addons/gamification/models/challenge.py
+++ b/addons/gamification/models/challenge.py
@@ -167,7 +167,6 @@ class Challenge(models.Model):
return super(Challenge, self).create(vals)
- @api.multi
def write(self, vals):
if vals.get('user_domain'):
users = self._get_challenger_users(ustr(vals.get('user_domain')))
@@ -299,12 +298,10 @@ class Challenge(models.Model):
return True
- @api.multi
def action_start(self):
"""Start a challenge"""
return self.write({'state': 'inprogress'})
- @api.multi
def action_check(self):
"""Check a challenge
@@ -317,7 +314,6 @@ class Challenge(models.Model):
return self._update_all()
- @api.multi
def action_report_progress(self):
"""Manual report of a goal, does not influence automatic report frequency"""
for challenge in self:
@@ -602,7 +598,6 @@ class Challenge(models.Model):
return challenge.write({'last_report_date': fields.Date.today()})
##### Challenges #####
- @api.multi
def accept_challenge(self):
user = self.env.user
sudoed = self.sudo()
@@ -610,7 +605,6 @@ class Challenge(models.Model):
sudoed.write({'invited_user_ids': [(3, user.id)], 'user_ids': [(4, user.id)]})
return sudoed._generate_goals_from_challenge()
- @api.multi
def discard_challenge(self):
"""The user discard the suggested challenge"""
user = self.env.user