summaryrefslogtreecommitdiff
path: root/addons/project/models/project.py
diff options
context:
space:
mode:
authorLucas Lefèvre <lul@odoo.com>2020-03-09 09:56:02 +0000
committerYannick Tivisse <yti@odoo.com>2020-03-10 13:44:20 +0000
commit900f0175dbd1fbb2f64c2003aac3d033002ece99 (patch)
treee08aead06e88b3820f37088211769bf4a7bd55e2 /addons/project/models/project.py
parent65cded061fde6a39ae6aed0492f7562081ab85cb (diff)
[FIX] project: Allow multi company ir rule relaxion
If you want to de-activate the multi company ir.rule, those checks will still raise an error. Task 2198433 closes odoo/odoo#47291 X-original-commit: 12a81a3a5265cbd18f5c00ab439cd1486696521b Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
Diffstat (limited to 'addons/project/models/project.py')
-rw-r--r--addons/project/models/project.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/addons/project/models/project.py b/addons/project/models/project.py
index 10b91c7092b..09fef75a8a7 100644
--- a/addons/project/models/project.py
+++ b/addons/project/models/project.py
@@ -964,8 +964,6 @@ class Task(models.Model):
return self.env['project.task']
return children + children._get_all_subtasks()
def action_open_parent_task(self):
- if self.sudo().parent_id and self.sudo().parent_id.company_id.id not in self.env.companies.ids:
- raise UserError(_('The parent task belongs to a company you do not have access to.'))
return {
'name': _('Parent Task'),
'view_mode': 'form',
@@ -976,8 +974,6 @@ class Task(models.Model):
}
def action_subtask(self):
- if self.sudo().subtask_project_id and self.sudo().subtask_project_id.company_id.id not in self.env.companies.ids:
- raise UserError(_('The subtasks belong to a company you do not have access to.'))
action = self.env.ref('project.project_task_action_sub_task').read()[0]
# display all subtasks of current task