Commit Graph
549 Commits
Author SHA1 Message Date
Vincent Larcin 7f908c6a69 [FIX] project: make personal stage non required in task form view
Since https://github.com/odoo/odoo/pull/90588, the personal stage is a required field in the task form view in debug mode.
However, we only generate personal stage for a given user when that user is first assigned to a task.
If a user creates their first task and assign it to themselves, they won't be able to give it a personal stage.

To prevent issues linked to the current users not having personal stages, this commit makes the field not required, but prevents the user from unsetting it

closes odoo/odoo#99735

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-14 21:21:45 +02:00
Pierre-Yves Dufays a577afc75e [IMP] account,crm,project,purchase,sale,[test_]mail: improves activity notif
Ease the understanding of the notifications sent when users are assigned to an
activity or a model (task, lead, ...).

Technical note:
- the customization of data sent to the email layout template (here subtitles)
should be done by overriding
mail_thread._notify_by_email_prepare_rendering_context on the model.
But in this case, we send an activity (ex.: todo) for a model (ex.: crm.lead)
which involves 2 models. Data from both models must be sent to the template
layout. To solve this problem an optional parameter to
mail_thread.message_notify has been added: subtitles. This allows the
caller which knows about the 2 models to set the values for subtitles for
the template.
- mail_activity._render_notify_header has been added to render the subject and
subtitles using the language of the recipients through the context lang
variable.
- a generic mail notification template has been added and the specific
mail_notification_paynow has been derived from it as the only change is the
handling of the signature.

Task-2801600

Part-of: odoo/odoo#88466
2022-09-14 19:13:44 +02:00
Yannick Tivisse faf1fe1b41 [FIX] project: Fix tags name_search perf
closes odoo/odoo#99762

X-original-commit: 4eaddc72ab09c70b200479872c397d5707cee6ab
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-08 09:38:41 +02:00
damr f3974bea4b [IMP] project,*: improve user experience
This commit (and its enterprise equivalent) purpose is to smooth the
user experience and remove unnecessary steps.

The commits:
- Remove all stat buttons except the status and collaborators one from
  the project edit form.
- Add multiple small changes to string/name fo fields in views
- Change the custom O2M widget for a standard M2M for the management of
  child tasks
- Add the milestone field to the portal page of shared project.
- Remove the wizard 'marked_as_reached_milestone'
- Add the automatic generation of milestone when a SO is confirmed if
  some SOL need it

task-2941835

closes odoo/odoo#98546

Related: odoo/enterprise#30628
Related: odoo/upgrade#3798
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-07 23:10:37 +02:00
Rohitkumar (roku) e849ca6fa7 [IMP] sale_(project),hr_timesheet: generic UX improvement for project
Purpose of this commit to improve generic usage of project app.

So in this commit done the following changes:
 - apply the 'open tasks' filter by default for my task menu
 - the search view set  the one from accounting and not timesheet for
   gross margin stat button
 - add a 'stalling for 30 days+' filter that should return open tasks whose
   last stage update was more than 30 days ago  for project task form view
 - move the 'stage' quicksearch above the 'project' one for burndown chart
 - when archiving a project containing tasks that are recurrent, disable their recurrence instead of
   raising an error
 - format some field in timesheets notebook in project sharing
 - display the 'rating email template' field by default for task stages

task-2899490

closes odoo/odoo#95636

Related: odoo/enterprise#29270
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-06 12:01:26 +02:00
Denis Ledoux 1744870d8d [IMP] base: cache back-end views
The master plan finally comes to an end.

Thanks to:
- odoo/odoo#87522 refactoring `load_views`,
- odoo/odoo#94337 refactoring `common.Form` to prevent changing
    invisible fields in unit tests using `Form` instances,
- odoo/odoo#95729 refactoring the behavior of `groups=` in views,
- odoo/odoo#98551 removing the need of the `groups_id` many2many field
    on back-end views.

The result returned by `get_view`/`get_views` can now finally be easily
and efficiently cached, in order to cache back-end views.

The goal of this revision is to cache the model views and fields
already post-processed for the web client
(with the modifiers, etc., already computed)
without group restriction.
Then, from this cached version, post-process group related features,
such as removing nodes restricted with a `groups=` attribute,
set the create/write button according to the user access rights to models, ...

Not including the groups in the cache key allows:
- to have less cached versions,
  (otherwise it would be one cached version per different group combination)
- to not have to fetch the user groups to compute the key
  (with the current cache key,
  there is nothing to fetch from the database to compute the key)

Besides, post-processing the groups features
after taking the view from the cache of the view doesn't take a tremendous time:
 - parsing arch from/to string with etree is fast,
 - removing the `groups=` nodes using etree is fast,
 - adding the `create="False"`, `write="False"`, `delete="False"` on the view
   root node according to the access right of the user on the model is fast.

This allows way faster calls to `get_views` by the web client,
as the server no longer need, for each call, to fetch the views in database,
combine the inherited views, post-process the modifiers attributes, etc.

Timing tests are available on the pull request of this revision.

Part-of: odoo/odoo#99417
2022-09-05 16:54:01 +02:00
Adesh Jolhe (adjo) 854260f436 [IMP] project,sale,hr(_timesheet): generic improvements for project
Purpose of this PR to improve generic usage of project app.

So, in this PR done following changes:

- In project.project form view :
  - Added name label above name field
  - Changed placeholder name of field to 'e.g. Office Party'
- in project_project_view_form_simplified:
   - displayed name as Title
   -  renamed 'create' into 'create project'
- in project.task form view > extra info notebook :
   - added the 'personal stage' field (Only visible in debug mode)
- in project.project form view:
   - based timesheet encoding unit set the 'cost' field name to Daily cost
     if uom in Days or In Hourly cost if uom in Hours
-  configuration > projects: if possible, clicking on a project kanban card
   will be open its form view

task-2821488

closes odoo/odoo#90588

Related: odoo/enterprise#26977
Related: odoo/upgrade#3492
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-05 14:49:49 +02:00
Xavier-Do b1b66b82a6 [FIX] crm, project: fixing some non-total order
Non total order can lead to randomized order in some case, making some
test behaviour random and/or difficult to debug.

Adding some fallback 'id' order shouldn't hurt

closes odoo/odoo#99324

X-original-commit: 6e40e5fe775273a2d3a968ac113cbeb578318dd1
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-08-31 21:12:12 +02:00
Xavier BOL (xbo) 810d1020e2 [FIX] project: cannot change stage if stage contains rating email
Before this commit, when the portal user changes the stage of a task and
the new stage contains a rating template email, he got a traceback
saying he has no access to `mail.template` model.

This commit fixes the issue by sending the email in superuser when we
are sure the user can write on that task.

Steps to reproduce:
==================

1) Enable the rating feature in the settings of Project App
2) Create a Project A and edit it to enable the rating feature on that
project and select "Rating when changing stage" (if it is not already
the case)
3) Set a rating email template on a stage of the project
4) Create a new task and save
5) Change the stage of that task to the stage contained the rating email
template

Actual Behavior:
---------------
A traceback is occurred saying the user has no access to `mail.template`
model.

Expected Behavior:
-----------------
The stage of the task should be changed and the rating email should be
sent.

closes odoo/odoo#99248

X-original-commit: c5093988411e5697f49ca2a128e93203c2d6aac9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-08-30 21:25:46 +02:00
Xavier BOL (xbo) b8ef0cc4f2 [REF] project,*: convert kanban, list and form views in OWL
Before this commit, all the custom code for the widgets, form, list and
kanban views are always in OWL and have to be migrate to the new JS
framework.

This commit converts all the widgets, list, kanban and form views used
in the project app in OWL. Some JS tours has been adapted according to
the OWL views, the project right side panel has been reviewed since it
was LegacyComponent (in old component in OWL)

task-2944742

Part-of: odoo/odoo#98380
2022-08-30 20:22:34 +02:00
Abdelouahab (abla) b342fe8460 [FIX] project: grouping by date_deadline access error
To Reproduce
=============

- share a project with a portal user (with editing rights)
- connect to portal with this user and try to group tasks by deadline

Problem
=======

An access error is raised stating that this user doesn't have right to read
`deadline_field:week` field.

The issue comes from this line :
https://github.com/odoo/odoo/blob/42cb8ad0a31162d9d1b93e4eae0562c89685fe3c/addons/project/models/project.py#L1621

where `fields` contains `date_deadline:week` but `self.SELF_READABLE_FIELDS` contains `date_deadline`
that's why `date_deadline:week` will remain in `unauthorized_fields` .

Solution
=========

To solve the issue we take only the field name from the groupby when computing `fields_list` that
will be checked by `_ensure_fields_are_accessible`

opw-2949047

closes odoo/odoo#98953

X-original-commit: 1d0a62d0d235a4f0686e17033bb9d144d5583907
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-08-26 08:07:55 +02:00
std-odooandThibault Delavallée 6ebb72332e [IMP] rating: improve rating notification with delaying until feedback
Purpose
=======

When someone receives an email with a rating request, he can click on a
smiley. But if he does not write a feedback, nobody is notified. This means
some rating as somehow lost and people are not notified of it.

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

Now, when the user clicks on the smiley, a message is posted but notifications
are not yet sent. This uses the new ``mail.message.schedule`` mechanism added
in this PR. It gives the user some time to write their feedback and send it.

If they write and submit a feedback, the notification process is launched.
Emails and inbox notifications are created and sent.

If they don't write a feedback notification process is launch after 2 hours.

Testing
=======

Some cleaning is done in tests, notably to split some fields tests from
performance test. A bit performance test is also split into sub tests in
order to better understand queries.

Task-2207626 (Rating: Log ratings, post feedbacks)

Part-of: odoo/odoo#95623
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2022-08-25 19:57:17 +02:00
Vincent Larcin 4bdd65d9c2 [FIX] project: force project active_id in view tasks action
Steps to reproduce
------------------

1. Install sale_project.
2. Create a product that creates a project on order.
3. Create a Sales Order with this project and confirm it.
4. Click on the 'Projects' stat button on the SO.
5. Try to click on one of the projects, you should get an error.

---

This commit fixes this error by properly using the id of the project
as `active_id` in the action to view its tasks.

Task-2957905

closes odoo/odoo#98464

Signed-off-by: Xavier <xbo@odoo.com>
2022-08-19 17:49:00 +02:00
Miquel Raïch a669992509 [FIX] project: use correct lang when creating personal stages
It's expected that the personal stage is in the lang of the user_id. This commit assures it happens.

closes odoo/odoo#97523

X-original-commit: 2ab1f055b77ab50b62245ab8e34de91500d0c423
Related: odoo/enterprise#30322
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-08-12 23:37:19 +02:00
Manisha Tulsiyani 038bfa2ca1 [IMP] project,sale_timesheet: generic improvement for the project
Purpose of the commit is to do the generic improvements for project.

So in this commit did the following changes:
 - the 'upsell opportunity' activity should be generated even
   if the service has already been invoiced
 - project.task hide the 'create' button if the project in the
   context is archived
 - project.task portal form view: only the ref of the invoice
   should be underlined on hover, not the empty space.

task-2857924

closes odoo/odoo#94776

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-08 10:50:50 +02:00
Rohitkumar (roku) a819d6a597 [IMP] sale_(project),hr_timesheet: improve generic UX for project
Purpose of this commit to improve generic usage of project app.

So in this commit done following changes:
 - when deleting a project, delete all of its tasks in the process instead of
   raising an error
 - make the list view editable bottom
 - add a 'view task' button to open the task form view
 - the 'download' and 'print' buttons should be centred
 - rename 'planned hours' into 'allocated hours' (or 'allocated days' if the
   timesheet encoding unit is in days)
 - when a project is linked to an SO manually, he should appear in the
   'projects' stat button of the SO; same goes for tasks
 - remove the 'profitability' setting
 - display the SOL and the quantity in red as well if the milestone hasn't been
   reached yet for update right side panel
 - add a project field for quickcreate in kanban view
 - 'fa-check-square-o x/y' in muted on the project kanban cards

task-2838372

closes odoo/odoo#92262

Related: odoo/enterprise#27758
Related: odoo/upgrade#3561
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-05 03:38:02 +02:00
Kartik Chavda 873dd773c0 [IMP] project: set default analytic account and analytic tags in task
Currently, the project's analytic account and analytic tags are not set by
default in the task.

Technical-
- In this task, we have added a demo of analytic tags in the project.
- The default_get() method does not call when the demo data is loaded, so
  the analytic account and analytic tags are not set. So we called
  default_get() from _load_records_create().

task-2861376

closes odoo/odoo#94144

Related: odoo/enterprise#28656
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-04 18:35:11 +02:00
Adesh Jolhe (adjo) 540c740ae4 [IMP] sale_,hr_(project,timesheet): generic improvements for project
Purpose of this PR to improve generic usage of project app.

So in this commit did the following changes:
 - Changed recurrence conformation messgae
 - Changed Burger menu actions  in
   project.project kanban view
 - Added quick search Description in project.task search view
 - In product form view hide button based on condition
 - Added sample data in project_milestone_views
 - switch the state and the author fields from place and add author
   label underneath it's value
 - switch the date and the progress fields from place
 - Added table-stripes class
 - Changed label sprint summary to summary in project_update_default_description
 - In project.project form view and project.update right-side panel hide
   'collaborators' button on condition

task-2895388

closes odoo/odoo#95245

Related: odoo/enterprise#29089
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-03 20:47:50 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Panagiotis Kyriakou 4b34897416 [IMP] project: add access info on project visibility settings
This commit introduces some information/instructions regarding the access
to the project/tasks depending on what the user has selected for the project visibility.
This should reduce confusion and thus increase productivity on the user side by
making the task of granting access rights more straightforward to the user.

closes odoo/odoo#95947

Task: 2917471
Related: odoo/enterprise#29455
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-22 18:53:52 +02:00
hieu 19549afdfc [FIX] project: fix access error when internal user access to project
form

Before this commit, when the internal user without any access rights to
the Project app and has a link to access to the form view of a "public"
project, an access error is occurred when that user when to access to
the
project form view. The reason is the `project.collaborator` is only
accessible to the user with an access right to the Project App and since
the number of collaborators displayed in a stat button is computed with
the access rights of the current user, the compute cannot be done for
the
internal user.

This commit executes the compute is superuser to prevent the user having
access error and to correctly access to the project form view as before.

Steps to reproduce the bug:
--------------------------
1) Create a Project P and add *Marc Demo* in the followers of that
project
   if the Privacy Visibility is "Invited internal users".
2) Remove the access rights to the Project app for *Marc Demo* user.
3) Copy the link to the form view of project P.
4) Log in as *Marc Demo*.
5) Paste the link copied in step 3 to access to the form view of project
P.

Actual Behavior:
---------------
An access error is occurred because the user without any access to the
Project app cannot access to the `project.collaborator` model.

Expected Behavior:
-----------------
The internal user without any access rights to the Project App should
access
to the form view of the project P.

closes odoo/odoo#96497

X-original-commit: c725c3fbb29eff49eff3794aff9d407175599e63
Signed-off-by: Xavier <xbo@odoo.com>
2022-07-21 12:29:47 +02:00
Vincent Larcin 55d8da526d [IMP] project: adjust portal visibility followers behavior
Currently, portal followers of a project and its tasks are removed when
the project visibility is changed to something else than portal.
=> We want to keep the behavior, but only when changing the visibility
from portal to something else.

When the project visibility is changed to portal, we currently add
its customer to its followers.
=> In that case, we also want to add the customer of the tasks to the
followers of the corresponding task.

When the customer of a project in portal visibility is changed, the
new customer is added to the followers of the project.
=> We want to remove this behavior.

When a project is created with a customer and the portal visibility,
the customer is added to the followers of the project.
=> We want to remove this behavior to avoid mistakenly showing a project
that is not ready yet to the customer.

This commit implements those changes, and also adds a warning when
changing the visibility of the project if that change will automatically
add/remove followers to the project and its tasks.

Related: https://github.com/odoo/enterprise/pull/25800

Task-2812551

closes odoo/odoo#87747

Related: odoo/enterprise#25800
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-21 13:22:32 +02:00
Barad Mahendra b5f8f2133b [IMP] project: unarchive tasks when unarchiving stages
Currently, all of the tasks contained in a stage are archived
when the stage is archived. However, the tasks remained archived
when the stage is unarchived.

So in this commit, If the user unarchives a stage, ask the user to
unarchive the tasks it contains in the process.

task-2835624

closes odoo/odoo#94008

Related: odoo/enterprise#28301
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-21 12:20:53 +02:00
Adesh Jolhe (adjo) 8f192a9b57 [IMP] project(_sms),hr_timesheet: generic improvements for project
Purpose of this PR to improve generic UI of project app.

So, in this PR done following changes:
  - Added group by assigned to under reporting -> customer ratings
  - In quick search, changed "rated rated" operator to "assigned to" under
    project.project search view
  - Removed rating_status field from project > configuration > settings > customer
    ratings
  - Switched the 'timesheets' and 'planning' features from place from
    project > configuration > settings
  - In project.task  extra info notebook:
     - Added the 'parent task' field above the 'analytic account' field
     - Added the 'company' field above the 'sequence' field
  - Added send mail and sms action in project.project and project.task
    list view.

task-2806292

closes odoo/odoo#88446

Related: odoo/upgrade#3459
Related: odoo/enterprise#26207
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-20 12:16:04 +02:00
Fabio Barbero dc66b7aec3 [IMP] mail, various: use overridden method in message_notify
Purpose
=======

In message_notify, when called on a recordset, call model methods instead of
base one defined on MailThread. This allows to use internal methods overrides.

Also perform some linting on calls to ``message_notify`` in order to better
spot calls, parameters, ...

Task-2852908

closes odoo/odoo#92868

Related: odoo/enterprise#28038
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-18 10:23:03 +02:00
Vincent Larcin 8d6960a706 [FIX] project: fix project privacy_visibility tooltip
The project privacy_visibility tooltip doesn't reflect the actual behavior
for the "Invited portal users and all internal users" selection.

This commit rephrases the tooltip of that field in order to correctly match its behavior.
It also slightly changes the name of the options to match the new tooltip.

Task-2871771

closes odoo/odoo#93911

X-original-commit: 9ef7030e3346eda267bc27b47a8a168acdc4a7b9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-17 14:14:52 +02:00
Vincent Larcin d9342a9c4d [FIX] project: disable basic features on all projects
Steps to reproduce
------------------

1. Install project and fsm.
2. Enable a basic project feature (sub-tasks/task dependencies) in the settings.
3. Enable the same feature on the fsm project.
4. Disable the feature in the settings.
5. The feature is still enabled on the fsm project
	- This can be hard to see since the field will be hidden on the settings of the project, but you can see that the "Sub-tasks" tab is still visible on tasks if you enabled sub-tasks.
	- Also, when re-enabling the feature globally, it should be disabled for the fsm project, but won't be.

Expected behavior
-----------------

The feature should be disabled on all projects, including fsm ones, when disabling it globally

---

This commit fixes this bug by selecting all projects, and not just basic ones,
when disabling a basic feature globally, to disable that feature on all projects.

Related: https://github.com/odoo/enterprise/pull/28036

Task-2871448

closes odoo/odoo#93820

X-original-commit: 84f8957533e85672d3b17d1a9004193b091f9fea
Related: odoo/enterprise#28488
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
2022-06-16 17:27:16 +02:00
Prakash Prajapati afe41c4e88 [IMP] project: always assign current user to private task
This commit ensures that, when creating a private task, the current user
is always part of the assignees.

This commit also adds tests on the different `project.task` creation scenari
to ensure it gets not broken in the future.

task-2818486

closes odoo/odoo#89041

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-15 19:17:01 +02:00
Prakash Prajapati 47f453c1d4 [IMP] project: prevent assigning non-personal stages to private tasks
Before this commit, it was possible to assign a non-personal stage on a private task,
which is a nonsense as the task does not belong to a project. Only personal stages
should be set to a private task.

After this commit, if a non-personal stage is set on a private task, a UserError is raised.

task-2818486

Part-of: odoo/odoo#89041
2022-06-15 19:17:00 +02:00
Florian Charlier dae28c4b46 [IMP] base: add _is_internal method to res.users
No method was readily available to know if a user is `internal` (has
group `base.group_user`), which was inconsistent with other base groups.

_is_internal is now used in the codebase where it is clear that
`.has_group('base.group_user')` is called on a single record.

Part-of: odoo/odoo#85703
2022-06-14 09:35:57 +02:00
Thibault Francois a84f6965ee [FIX] project: Fix random access error on task creation with public
Use case:
---------

Create a task with public user

At the end of the transaction sometimes the flush
is done with an env where su is False.

This cause the public user enable to read data needed
for the recomputation of is_closed field which is related_sudo=False

Why is this random ?
--------------------
The flush in transaction select the first env in the set of
env with a user. Since the order in the set is not deterministic
Sometimes an env with su=True is choosen and everything is fine
but sometimes it's not and we get an access error

It happened in 3 acts

this commit f98470e6cf add
related_sudo=False for perf improvement pre v13.0

this commit 42c430a539 introduce
a new related field is_closed that copy paste the related_sudo=False

this commit cf8bb933ac3a9fd6344ca79617a2f7317fbc20af stored the field
and stored computed field should always be compute_sudo=True

Solution
--------
Remove all the related_sudo=False, they don't make sense since v13.0

closes odoo/odoo#93349

X-original-commit: e0fe5c5a1c6932f02ca0822c5c26618c91fd50b3
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2022-06-10 19:46:41 +02:00
Vincent Larcin 26cbec91cd [IMP] project: rework documents management
This commit gives a name to the Analytics section in the settings
to allow us to change its name easily with an xpath.

It also extracts the attachments domain in tasks so that it can be
overriden in documents_project to exclude attachements linked
to a document.

Related: https://github.com/odoo/enterprise/pull/26696
Related: https://github.com/odoo/upgrade/pull/3557

Task-2802803

Part-of: odoo/odoo#92044
2022-06-03 16:40:49 +02:00
Raouf 83760b9f10 [IMP] project: improve ux
Before this committ:
- Stats buttons were hidden when records are zero
- Some wordings were insignificant
- Existing filters don't allow us to check blocked, blocking and tasks soon in overtime and some other information
- Product form fields need some changes in their order

After this commit:
- All stats button are displayed when records are zero
- Wordings fixed
- New filters added to check blocked, blocking tasks and tasks in overtime soon
- Fields were rearanged

task-2726465

closes odoo/odoo#82253

Related: odoo/enterprise#23257
Related: odoo/upgrade#3185
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-02 18:58:14 +02:00
Xavier BOL (xbo) 3f263f1eae [IMP] project: display milestone field in the tasks in Project Sharing
Before this commit, the external collaborator cannot see in which
milestone the tasks in the project are linked in the Project Sharing
feature.

This commit adds the milestone field in the Project Sharing to show the
milestone linked to a task in the project shared.

task-2829542
2022-05-31 10:29:09 +02:00
Xavier BOL (xbo) e058472d21 [IMP] project: display wizard to reach milestone if all tasks linked are done
Before this commit, when the user changes the stage of a task linked to
a milestone, he cannot know if after that task, there is another one
before reaching the milestone related.

This commit displays a wizard to allow the current user to directly
mark as reached the milestone when the user changes the stage of a
task linked to a milestone to a closed stage and all tasks linked to
that milestone are done too. However, if the milestone is already
reached, no wizard will be displayed.

task-2829542
2022-05-31 10:29:08 +02:00
Xavier BOL (xbo) 41b72e0398 [IMP] project: display in green milestone if all tasks linked are done
Before this commit, when all tasks linked to the milestone are done, it
means all tasks are in a closed stage. Then, the user has no visual
feedback to know if all tasks linked to the milestone are done to be
sure he can mark the milestone has reached without missing a task to
complete.

This commit checks if all tasks of unreached milestones shown in the
project update are done or not. If it is the case the milestone is
greened to show to the user that milestone can be marked as reached.

task-2829542
2022-05-31 10:29:08 +02:00
Xavier BOL (xbo) d128a7683b [IMP] project: add 'Late Milestone' filter in tasks
Before this commit, the milestone is displayed in red in project update
when its deadline is in the past. To display the tasks containing a late
milestone, a filter need to be added.

This commit adds this filter to display the tasks containing a milestone
with a deadline in the past. This filter is also added in the `Tasks
Analysis` and the `Burndown Chart` reports.

task-2829542
2022-05-31 10:29:08 +02:00
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
Manisha Tulsiyani d2daaf95b4 [FIX] project: fix the traceback when clicking on blocking stat button
Currently, clicking on the blocking stat button throws an error when
there is more the 1 task in blocking stat.

So this commit, fixes the issue by removing the extra comma so that
clicking on blocking stat button doesn't throws an error.

task-2834743

closes odoo/odoo#92257

X-original-commit: cd7b7b02523e0982366f4ca60b6df2448d7e9cb5
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-25 14:38:11 +02:00
William Braeckman 46efe7df1b [IMP] project: allow modification of personal stages
This commit allows project users to create and modify their own personal
stages.
A lot of overrides have been done on the kanban view to handle our
multiple cases.

Project user will now only see the options to create columns/edit stages
when grouping by personal stage.
This is hardcoded and does not follow possible custom access rules
however.

Any stage created while grouping by personal stage will directly be
assigned to the user and will be seen in the 'My Tasks' menu.

A special method has been added to delete a personal stage.
Upon deletion any task assigned to this personal stage will move to a
lower sequence stage if possible otherwise the next in line.

TaskId-2858445

closes odoo/odoo#92103

X-original-commit: 7b3acbc0b0c21ab106b1b34d9f5c8bc1ceb2fe58
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-23 18:36:14 +02:00
std-odoo 9c1cdd330e [IMP] mail: avoid email loops when Odoo reply automatically
Purpose
=======
In this commit, we will fix the loops that occur when you send an email
to an alias (to create a ticket e.g.). In that case Odoo can reply
"Your ticket has been created" and then the auto-replier of the user
can reply to this email and the loop occurs.

Specifications
==============
To solve this issues, we add 2 system parameters
- <mail.gateway.loop.minutes>, 120 minutes by default
- <mail.gateway.loop.threshold>, 20 by default

When an email is sent to an alias, we look on the last records created
<mail.gateway.loop.minutes> minutes ago. If we overcome the limit
<mail.gateway.loop.threshold> the email is ignored.

Alias creation detection
========================
To detect the number of records created by a specific email address we
use the `_primary_email` attribute set on the model.

Task-2294034

closes odoo/odoo#78597

Related: odoo/enterprise#21772
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-20 13:14:56 +02:00
Rohitkumar (roku) 4a8f31e25f [IMP] project,sale_timesheet: generic UX improvement for project
Purpose of this commit to improve generic usage of project
app.

So, in this commit done following changes:
  - change the placeholder of the name to 'e.g. Monthly review' in
    project_update_view_form
  - set the 'analytic account' of the project on the tasks by default
  - change the placeholder to 'e.g. Product Launch' in project_milestone_view_form
  - the 'cabinets' milestone should be linked to a milestone service,
    not a manual one so change data to milestone in demo data
  - rename the 'rating' stat button into 'last rating' in view_task_form2
  - set another employee than Mitchell for the 'customer care (prepaid hours)'
    SOL field in sale_service_demo_data
  - display a separator on the right of the stat button so remove unwanted
    properties in project_rightpanel.scss
  - add the 'name' field to the 'fields to export' when 'i want to update data'
    is set to true
  - remove the 'Getting Things Done (GTD)' example from kanban examples wizard
  - add a 'tasks due today' filter that should return tasks whose deadline falls on
    today's date in view_task_search_form

task-2809188

closes odoo/odoo#88271

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-19 18:06:09 +02:00
Manisha Tulsiyani 849c5e128b [FIX] project: fix tags filtering based project for mobile view
Before this commit, when we click on the tag field in mobile view
it will display all the tags because in mobile view it will open
the kanban view on click of m2m field so 'search_read' called
instead of '_name_search'.

So in this commit, fixes the issue by applying the same filter
domain in search_read.

task-2790019

closes odoo/odoo#91670

X-original-commit: f23089f1fc14852fdd67916d38881746b15ebd19
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-18 17:09:36 +02:00
kais-odoo 60faa91ab1 [IMP] project: add the creator of task as default follower on task
Before this commit, if user does not follow the project then
while creating the task the creator(current user) is not added as
a follower of the task.

So in this commit, add the user creator of a task as follower
by default, even if (s)he is not following the project.

task-2784885

closes odoo/odoo#91170

X-original-commit: bc62557cc3bdcf792f6d3e19d0f0c87e34057f00
Related: odoo/enterprise#27234
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-12 13:43:26 +02:00
Vincent Larcin 9daa5c023d [IMP] project: add project.project calendar and activity views
This commit adds new calendar and activity views for projects.

Task-2741733

closes odoo/odoo#86008

Related: odoo/enterprise#25080
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-05 15:14:35 +02:00
Vincent Larcin 689ebe4a1c [IMP] project: link private tasks to personal stages in form view
This commits adds a status bar with the user's personal stages
in a private task form view.

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:34 +02:00
Vincent Larcin 483a4358a8 [IMP] project: move rating warning in task stage form view
This commit moves the 'Customer Ratings' warning to be right under the
Rating Email Template field in the task stages settings view.

It also slightly reorders other fields and fixes a typo.

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:33 +02:00
Vincent Larcin 1d2adbd8c9 [IMP] project: add project color in task calendar filter
This commit colors the project filter checkboxes on the right side panel
of the task calendar view with the color of the corresponding project.

It also changes the color of the events in the tasks in the calendar so it
uses the color in the project in the view "All Tasks", and the color of
the tasks in a calendar view of a specific project.

Finally, it adds some colors to tasks in demo data to better showcase
that feature.

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:32 +02:00
Kartik Chavda c0da9d934c [IMP] (sale_,)project,hr_timesheet: improve generic ux of project
Purpose of this commit to improve generic usage of project
app.

So, in this commit done following changes:

- add 'my department' filter in project search view.
- add 'my department's tasks' and 'my department's projects filter
  in task search view.
- add quick search, filter and groupby in task analysis report search view
  to make task analysis report search view same as task's search view.
- improve portal template of my/tasks page.
- project.task form view > timesheets: display the employee avatar
  on mobile.
- make 'Task: Rating Request' template auto_delete false.
- settings: make following features disabled by default: sub-tasks,
  task dependencies, recurring tasks.
- project.update kanban list: align the stat buttons with the kanban
  list cards.
- add sample data to the project stages > list view.
- project.task quickcreate: enable the creation of new users on the
  fly.
- move tags quick search below project.
- add title to show  project full name on hover of project name in kanban
  view of project.
- copy user_ids for task in recurrence.
- improve UI visibility of planned_hours and subtask_planned_hours field in
  timesheet page of task form view.
- improve project sharing wizard and project.collaborator tree
  view.
- add grid,kanban,pivot and graph views to 'hours spent on
  sub-tasks' button's action.

closes: #83482
task-2742725

Related: odoo/enterprise#23788
Related: odoo/upgrade#3480
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-03 17:53:45 +02:00
Florian Damhaut bbfb8cb099 [FIX] project: Copy task dependency on project copy
Step to reproduce:
- Create a project with 2 task A and B
- Set task A blocked by task B
- Duplicate Project

Current behaviour:
- Duplicate project is also blocked by original project's task
- Original project's tasks are blocked by new duplicate project's
 task

Behaviour after PR:
- Original project's tasks are not changed
- Duplicate project's tasks are blocked by duplicate project's task
 if they were blocked by the original project.
- Tasks are still blocked by tasks not linked to the original
 project

opw-2818476

closes odoo/odoo#90256

X-original-commit: 5c184628b2278814d2b28366587c8e4b813d0374
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-30 11:43:52 +02:00