Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ def project_task_type_rating(env):
ORDER BY write_date DESC
LIMIT 1
""",
(tuple(task_type.project_ids.ids),),
(
tuple(
(
task_type.project_ids
or task_type.with_context(active_test=False).project_ids
).ids
),
),
)
for vals in env.cr.dictfetchall():
task_type.write(vals)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
env = locals().get("env")

# create task type with exclusively inactive projects
task_type = env["project.task.type"].create(
{
"name": "Task type",
}
)
project = env["project.project"].create(
{
"name": "Inactive project",
"active": False,
"type_ids": [(6, 0, task_type.ids)],
}
)


env.cr.commit()
Loading