summaryrefslogtreecommitdiff
path: root/addons/hr_contract/models
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/hr_contract/models
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/hr_contract/models')
-rw-r--r--addons/hr_contract/models/hr_contract.py2
-rw-r--r--addons/hr_contract/models/resource.py1
2 files changed, 0 insertions, 3 deletions
diff --git a/addons/hr_contract/models/hr_contract.py b/addons/hr_contract/models/hr_contract.py
index 9195bf138d6..b9a54ff2871 100644
--- a/addons/hr_contract/models/hr_contract.py
+++ b/addons/hr_contract/models/hr_contract.py
@@ -137,7 +137,6 @@ class Contract(models.Model):
for contract in self:
contract.employee_id.sudo().write({'contract_id': contract.id})
- @api.multi
def write(self, vals):
res = super(Contract, self).write(vals)
if vals.get('state') == 'open':
@@ -163,7 +162,6 @@ class Contract(models.Model):
contract.employee_id.resource_calendar_id = contract.resource_calendar_id
return contracts
- @api.multi
def _track_subtype(self, init_values):
self.ensure_one()
if 'state' in init_values and self.state == 'open' and 'kanban_state' in init_values and self.kanban_state == 'blocked':
diff --git a/addons/hr_contract/models/resource.py b/addons/hr_contract/models/resource.py
index 9382b7e5217..865e8733318 100644
--- a/addons/hr_contract/models/resource.py
+++ b/addons/hr_contract/models/resource.py
@@ -9,7 +9,6 @@ from odoo.osv.expression import AND
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
- @api.multi
def transfer_leaves_to(self, other_calendar, resources=None, from_date=None):
"""
Transfer some resource.calendar.leaves from 'self' to another calendar 'other_calendar'.