Commit Graph
26 Commits
Author SHA1 Message Date
Xavier BOL (xbo) a118555a40 [IMP] project: link milestone to task
Before this commit, the milestones are only linked to a project without
any link to the tasks of the same project. However, the tasks could be
considered as steps to reach a project milestone.

This commit adds a link between the `project.task` and
`project.milestone` models. This link is added in the `project.task`
model with the Many2One field called `milestone_id`. With this field,
the user will be able to link a milestone to a task.

task-2829542
2022-05-31 10:29:08 +02:00
abderraouf e9f21c9583 [FIX] project : average rating is wrong in tasks analysis
Before this commit:
- Join between task and rating is made on parent_res_id
- Displayed value is the sum of tasks average_rating
- No Unit test to cover this case
- Measure displayed when customer rating setting is not active
- [Demo data] Each task is rated one time so average_rating and last_rating are the same

After this commit:
- Join is made on res_id which is the task_id
- Displayed value is the avg of tasks average_rating
- Unit test added to cover mesaures calculation
- Measure dusplayed only when setting active
- New demo record added to let average_rating be different from last_rating

closes odoo/odoo#89764

X-original-commit: 3a5d816ef26a164fc38965154e38b45e33f9a81e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-04-27 07:52:21 +02:00
Xavier BOL (xbo) f13568c809 [IMP] project: review project profitability in right side panel
This commit reviews the project profitability displayed in right side
panel of project update kanban view. The goal of this commit is to add
more information to allow the user to see all information concerning the
profitability of his project.

task-2710808
2022-04-01 15:33:00 +02:00
William Braeckman a3a32c66fd [IMP] project: improve on x2many tracking
While investigating an issue with the x2many tracking, we found a
better way that to track those field while also fixing the issue.

Fixes an issue with `default_*` context keys that are used in the
project app upon writing on tasks.

TaskId-2725014

closes odoo/odoo#82189

X-original-commit: a281a18fc84a09177f7b5e8aab98b8dc34dcc3b8
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-04 08:47:07 +00:00
William Braeckman 85577f7b33 [FIX] project: fix following on assignation
This commit fixes an issue since user_id was changed to user_ids.

The default behaviour of `_message_auto_subscribe_followers` could not
work with the user_ids field as it is only meant to work with user_id.

This also fixes a related issue due to the same problem where the
assignation emails were not sent.

TaskId-2691486

closes odoo/odoo#79831

X-original-commit: 3510251ad19d4394f4613924aa2af20abb7c35d9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-16 12:19:57 +00:00
Xavier BOL (xbo) bd4acaa220 [IMP] project: add unit tests for project sharing feature
This commit adds unit tests to check the access of portal user. That is,
we check if the readable fields are only available in read access and
writable fields are available for the edition of the task.
We also check if the other fields in task model raise a AccessError if
the portal user wants to access to one of them.

task-2633229

closes #77156

X-original-commit: 1e7185bcdd8913c006148466dec260b8f6d53c0b
2021-11-05 17:14:19 +01:00
Xavier BOL (xbo) edd25f3261 [IMP] project: add tour js for project sharing feature
This commit adds an unit test to start a tour with an internal user
connected to test the project sharing feature. Another test is
created to start a tour with a portal user connected to test the
project sharing feature.

part of task-2633229

closes odoo/odoo#76906

X-original-commit: db7825efb1b5cc052ecc795f9c81db5f3f58a5d3
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-22 05:41:16 +00:00
William Braeckman 7563b448da [IMP] project: add personal task stages and multiple assignments
Adds personal stages to tasks.
Users assigned to tasks will be able to have their own pipeline to
handle their tasks independently of the project's pipeline.

The assignee field on Tasks has also been changed to a Many2many to
support multiple assignees on one task.

The same table is used to store those information, essentially a triplet
(task, user, stage), to ensure that:
1) personal stages only apply to tasks to which you are assigned to.
2) synchronizing to make sure that you don't have a personal stage for a
   task on which you are not assigned anymore.

Alongside those changes, some minor changes have also been made:
- Modified the task's tree view.
- Renamed the Tasks menu to 'My Tasks'.
- The default view is now the kanban view for the 'My Tasks' action.
- project_id is not required anymore, tasks with no project are
  considered 'private', those tasks are only visible to those that are
  assigned to it.
- Added tracking of both user_ids and depend_on_ids in the chatter.

Closes odoo/odoo#74087

Task ID: 2398734
2021-09-01 07:17:40 +00:00
Xavier BOL (xbo) 768c63b15e [IMP] project: add unit test for project sharing feature
task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
f6ab481ad9 [FIX] project: improve performance of burndown chart report
Before this commit, for the db with old active tasks and many
projects and tasks. The report takes several hours to execute the sql view.
Because we take the create date of the oldest task as the begin date
of each generate_series to calculate the different group bys (day, week,
month, quarter and year) until CURRENT_DATE.

This commit hugely improves the performance of the sql view execution
for the burndown chart report.

closes odoo/odoo#72664

X-original-commit: 89726a22862cf14f7b88e130fb79ddc74bffff5e
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Nicolas Seinlet (NSE) <nse@openerp.com>
Co-authored-by: Thibault Libioulle (TLE) <tle@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
2021-06-24 07:22:52 +00:00
Thibault Libioulle 0953b6a839 [IMP] project: add project updates tests
This commit adds project update tests.

PR : #68899

task-2393768
2021-06-01 15:08:42 +02:00
Thibault Libioulle bc86a101a8 [IMP] project: add tests for subtasks
This commit adds tests concerning PR #62577.

Tests also address errors in PR #68647 and #69170.

PR #70576

task-2388034
task-2522066

X-original-commit: b76e277f03c881ce6fd4d92fc8c8fb3e0ab704ea
2021-05-19 11:31:17 +00:00
Thibault Libioulle b1f0e1a42a [REV] project: following a private project no longer required
This reverts commit odoo/odoo@7059b17.

This commit translates tests introduced in this reverted commit to be
aligned with the current workflow.

This commit reverts functionality or business logic linked to the
reverted commit :
- odoo/odoo#47248 : You no longer have to be an allowed user to see the
timesheets but only a message partner.
- odoo/odoo#49021 : We no longer deal with allowed_user_ids or
allowed_portal_user_ids
- odoo/odoo@f2a1a00 : We no longer deal with the allowed users lists.

This commit removes the button project_privacy_visibility for functional
reasons.

Closes: #65367
task-2439329

Related: odoo/upgrade#2128
Related: odoo/enterprise#16067
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-09 12:12:54 +00:00
Xavier BOL (xbo) d2dadbcc3b [IMP] project: add task dependencies feature in project.task model
This commit adds two new fields in the project.task model.
The first one called 'allow_task_dependencies' is a related field to the
one project.project model. The other field called 'depend_on_ids' is a
Many2many field will contain the tasks which the current task depend on.

In the form view of project.task model, these fields are added.

task-2387984

closes #66740
2021-03-12 14:15:36 +01:00
Dominik RuboandKevin Baptiste a93f1e8d9b [IMP] project: enable config-selected features in projects
This change ensures that when the user activates optional features of the
project app, they are enabled in existing projects as well as newly created
projects automatically, which is likely what the user expects.

For most optional features, this behavior was already in place. It was not in
place yet for the sub-tasks and timesheets features, which this change fixes.

Two added tests check the behavior described above for features that are
activated through a `group_*` field on `res.config.settings` (sub-tasks,
recurring tasks and ratings). The tests do not cover features that are
activated through a `module_*` field, as such fields require the installation
of further modules and we cannot simulate this.

Task 2297054

closes odoo/odoo#60106

X-original-commit: 8dd0edae898a532dbe7e4f18c9118b9b68e57900
Related: odoo/enterprise#14119
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Kevin Baptiste <50135801+kba-odoo@users.noreply.github.com>
2020-10-15 14:18:30 +00:00
Kevin Baptiste 1b62bd9508 [IMP] project: add recurring tasks
Some interventions are done on a regular basis (e.g. maintenance of
fire alarms, safety inspections). Having tasks auto-generate would
facilitate the process and would ensure that the next intervention
isn't missed/forgotten.

closes odoo/odoo#55517

Taskid: 2172156
Related: odoo/enterprise#12246
Related: odoo/upgrade#1604
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-12 08:39:32 +00:00
Lucas Lefèvre 7059b177ee [IMP] project: Following a private project no longer required
=======
Purpose
=======

Currently for a user to be allowed to see a private project they must follow the
project. This means that they will be added as a follower of all new tasks in the
project which causes them to receive 1000000 notifications, especially if there are a
lot of tasks in a project.

==============
Specifications
==============

1) Add an Employee m2m field on project next to 'Invited Employees'
    - only visible if the 'Invited Employees' option is selected
    - the project should only be visible to employees selected there (regardless if they
      are followers or not)
2) Add an Employee m2m field on tasks below the 'Email cc' one in debug mode
    - only visible if the 'Invited Employees' option is selected on the related project
    - should be pre-filled with what is set on the project
    - the task should be visible to employees selected there (regardless if they are
      followers or not)
3) Add a Portal users m2m field on project next to 'Portal users and all employees'
    - only visible if the 'Portal users and all employees' option is selected
    - the project should only be visible to portal users selected there (regardless if
      they are followers or not)
    - rename the option into 'Invited portal users and all employees'
4) Add a Portal users m2m field on tasks below the 'Email cc' one in debug mode
    - only visible if the 'Portal users and all employees' option is selected
    - should be pre-filled with what is set on the project
    - the task should be visible to portal users selected there (regardless if they are
      followers or not)
5) Following a project/task should not grant the user/employee the ability to see the
   project/task

Task 2031527

closes odoo/odoo#40505

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-14 16:26:32 +00:00
jem-odoo 0fdee29bb4 [IMP] project: multi company subtasks
This commit makes possible the task delegation in a multi company
environement. A subtask is a normal task with a parent, but can
now be in a different company, to be use as subcontracting task in
another company.
Tests are added to check multi company consistency for the project
app in general and for the subtask cases.

Task-1999686
2019-09-27 11:43:13 +00:00
Jérome Maes 424c16f115 [MOV] website_project,project: move all features
Making project depending on portal, makes website_project
useless. So move all feature from one module to the other.
2017-08-16 14:56:41 +02:00
qsm-odoo eaf8e82efb [IMP] *: activate automatic tour tests
* project, crm, point_of_sale, website, website_sale, website_blog,
website_event, website_forum
2016-07-18 14:22:29 +02:00
Damien Bouvy 8bd6074f03 [IMP] project,project_issue,project_timesheet,project_issue_sheet: project visibility and access rights modifications
[REM] portal_project: move ALL the things
- move portal access rights from portal_project  and website_project_issue to project and project_issue
- move portal menuitems back to their respective module
- remove public visibility of projects
- adapt demo data to have a 'Demo Portal' project
- add correct access rights for account.analytic.line for portal users
- small view tweak (do not display 'timesheet' tab if one can't see antyhing in it anyway)
2015-08-14 13:19:03 +02:00
Jignesh Rathod b55969a577 [REF] mail: migrated tests to the new API and refactored them.
Tests have been migrated to the new api to prepare the migration of the
mail module itself. Moreover tests have been cleaned: redundant tests
and unnecessary tests have been removed.

As the base test class in mail is used in other addons, other addons
have been updated :
- portal
- project
- portal_project
- website_project_issue
- sale
- purchase

Future commits will come with somes fixes for issues detected when cleaning
the tests.
2015-03-24 10:18:16 +01:00
Christophe Simonis 18e22be138 [MERGE] forward port of branch 8.0 up to 0aab81c 2015-01-19 17:15:56 +01:00
Xavier Morel 65cd4a2a33 [FIX] remove deprecated checks/fast_suite test attributes from standard modules 2015-01-15 14:31:40 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
Thibault Delavallée 9b41f8fadc [TESTS] project: refactored tests. Moved surviving yml tests into unittest; added mailgateway test.
bzr revid: tde@openerp.com-20130710101508-62eh89gzq22qvpq5
2013-07-10 12:15:08 +02:00