Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project_task_analytic_lines/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
'name': 'Project Task Analytic Lines',
'version': '14.0.1.3.0',
'version': '14.0.1.2.1',
'author': 'Numigi',
'maintainer': 'Numigi',
'website': 'https://numigi.com/',
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions project_task_analytic_lines/models/account_analytic_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ class AnalyticLine(models.Model):
"project.task", "Origin Task", ondelete="restrict", index=True
)

@api.depends('task_id', 'task_id.project_id', 'origin_task_id',
'origin_task_id.project_id')
def _compute_project_id(self):
for line in self.filtered(lambda line: not line.project_id):
if line.task_id.project_id:
line.project_id = line.task_id.project_id
if not line.task_id.project_id and line.origin_task_id.project_id:
line.project_id = line.origin_task_id.project_id

@api.model
def search(self, args, offset=0, limit=None, order=None, count=False):
args = args or []
Expand Down
10 changes: 2 additions & 8 deletions project_task_analytic_lines/tests/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © Numigi (tm) and all its contributors (https://numigi.com/r/home)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

Expand All @@ -15,11 +14,7 @@ def setUpClass(cls):
"login": "account_user",
"email": "account_user@test.com",
"groups_id": [
(4, cls.env.ref("account.group_account_invoice").id),
(4, cls.env.ref("analytic.group_analytic_accounting").id),
(4, cls.env.ref("project.group_project_manager").id),
(4, cls.env.ref("hr_timesheet.group_timesheet_manager").id),
],
(4, cls.env.ref("account.group_account_invoice").id)],
}
)

Expand Down Expand Up @@ -115,5 +110,4 @@ def _get_invoice_line_vals(cls, **kwargs):

def _validate_invoice(self):
self.invoice.invoice_date = '2023-01-01'
# In Odoo 14, use .with_user(user) instead of the deprecated .sudo(user)
self.invoice.with_user(self.account_user).action_post()
self.invoice.sudo(self.account_user).action_post()
Loading