Commit Graph
5934 Commits
Author SHA1 Message Date
Kartik Chavda e62320f0c6 [FIX] project: fix copy functionality of project
Purpose of this commit to do not copy progress of the project
update when coping project.

So, In this commit make last_update_id field copy false
so default progress of the project update will be 0%.

task-2664773

closes odoo/odoo#79283

X-original-commit: 69dab41858ea737929591123e85f2f982f58589c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-02 15:06:57 +00:00
Ipsita Borisagar 706247a605 [IMP] project: private task visibility for users
PURPOSE

In project, private tasks (with no project) are visible to other users even if
they have project admin rights.

SPECIFICATION

Private tasks will not be visible to other users even if they have project admin
rights.

Task-2656512

closes odoo/odoo#78601

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-29 13:22:41 +00:00
William Braeckman 3d10c7c708 [IMP] project,*: improve project UX
* = hr_timesheet, sale_project, test_main_flows

Smaller changes:
 - Projects created on the fly (through `name_create`) will now come with a
   default `new` stage in order for them to not be empty.
 - Removed task auto assign upon creation besides in FSM's 'My tasks' menu.
 - Allow the reordering of projects without needing to group by
   anything.
 - Make `project.task`.`description` and `project.tags`.`name`
   translatable.
 - Disable the creation of records in the view when clicking on `Tasks
   in recurrence` stat button.
 - Track the planned date of the task in the chatter
 - Disable the creation of records in the view when clicking on
   'invoices' stat button and add the kanban view to that action.
 - Make milestones completely available to regular project users.
 - Remove the 'Documents' button in the project's kanban settings menu.
 - Add kanban, pivot and graph views to the 'Hours Recorded' stat button
   on projects
 - Add the calendar view on the 'Hours Forecast' stat button on projects
 - The 'Sales Orders' stat button on the `project.project`'s form view
   will now display the amount of sales order linked to the whole
   project. So the one linked to the project itself if it exists + all
   the tasks. It will also open them, form view if 1 else list view.
 - Fix a typo in the settings 'projets' => 'projects'
 - The analytic account  of the project will now be assigned to the
   sales order when a task is created through the 'Create a task in an
   existing project' option.

Changed the portal task view to include a sidebar similar to sales
orders, with a simple menu leading to different parts of the screen.

Changed the `project.task` 'rating' stat button:
 - The icon will now represent the latest review.
 - The action will directly lead to the record's form view if there is
   only 1 rating.
 - Make some fields readonly in the form view.
 - Display the % of satisfaction instead of the number of ratings.

Reorder all stat buttons on the `project.task` form view in this order:
 - Products, Worksheet, Sales Order(s), Invoices, Ratings, Hours
   Forecast, Parent Task, Tasks in recurrence, Tickets, Quotations and
   lastly Customer Preview

Make the status of the project editable directly through the kanban
view. A new widget has been added to handle that properly. When editing
the status through that means, a `project.update` will be created with
the current date and the appropriate status. In addition to that a new
status has been added (only on `project.task`, not `project.status`)
namely `to_define` in order to differentiate new and running projects.
Projects now start with the `to_define` status.

The `project.project`'s  rating stat button has been changed in the
following ways:
 - The icon will now change in function of the satisfaction percentage,
   smile above 66%, meh between 33% and 66% and frown below 33%.
 - The color will also change depending on the rate, smile is green, meh
   is orange and frown is red.
 - The ratings will now be in function of the last 30 days instead of
   all time and the action will also filter on those 30 days.
 - Change the action name from 'Rating' to 'Ratings'.

`project.project` ticket stat button:
 - Will now open the form view when there is only one record.
 - Added the activity view.
 - Disable the creation of new records.
 - Rename the action to 'Tickets'.

Closes: odoo/odoo#75269

See: odoo/enterprise#20334

Task ID: 2611006

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-28 15:27:36 +00:00
Laurent Stukkens (LTU) fd2a6c904d [IMP] project: add task dependencies in demo data
This commit adds task dependencies data in the demo data.

task-2647340
Related PR: odoo/enterprise#21391

closes odoo/odoo#79103

X-original-commit: d7c2a7eb5b6ee77772b0f104515125f3f31eb50d
Related: odoo/enterprise#21933
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-27 19:24:01 +00:00
Kartik Chavda 9e0621db01 [IMP] project: improve follow and unfollow functionality for project
Currently, unfollowing a project removes the user from all the tasks he was
following. Conversely, following a project or updating your notification
preferences makes the user a follower of all the tasks of the project without
distinction. These consequences are a bit extreme in case the user misclicked,
or simply decided he no longer wanted to be a follower of every newly created
task.

In this commit, when unfollowing a project should not remove the user from
the followers of all the tasks, and following a project should not add the user
to the followers of all the existing active tasks, neither should updating the
user's notification preferences But if the user explicitly update the user's
notification preferences for the project then its propagated to all the tasks
that the user is currently following.

closes odoo/odoo#67142

Task-id: 2440659
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-26 20:25:04 +00:00
Laurent Stukkens (LTU) 3384e4aee2 [IMP] project: add task dependency test
This commit adds a python test for the task dependencies.

task-2663173

closes odoo/odoo#78980

X-original-commit: a71862fb86e6eef801093add300c2668458aa964
Related: odoo/enterprise#21887
Signed-off-by: Xavier <xbo@odoo.com>
2021-10-26 19:40:46 +00:00
Vincent Larcin a06a99fb12 [FIX] project: remove a traceback when moving a project to a stage with a with an email template
Steps to reproduce:
==============
1) Go to Project app and create a project A if you don't have any project.
2) Go to Project > Configuration > Settings.
3) Enable the "Project Stages" feature.
4) Go to Project > Configuration > Project Stages.
5) Show the Email template field in the list view and set a template on a stage. (create a stage before this step if none exists)
6) Go to the main view of Project App.
7) Move Project A to the stage with the template set.

Expected Behavior:
==============
The system should use the template for the mail tracking.

Current Behavior:
============
Traceback because the method `xmlid_to_res_id` does not exist in `ir.model.data`.

Task-2677199

closes odoo/odoo#78947

X-original-commit: 1d1eaad402dac523404296024f44d3c852ee1daf
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-26 07:47:55 +00:00
Xavier BOL (xbo) 83fc2139a2 [IMP] base_setup,project: remove module_pad field in settings
Since the etherpad is removed from #76467, the module_pad field is
useless in the settings for Notes and Project apps.

This commit removes this field.

task-2643861

closes odoo/odoo#78830

Related: odoo/upgrade#2958
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-22 17:34:36 +00:00
Nidhi Patel f5db920f0b [FIX] project,web: fix project status color in kanban progress bar
Currently, projects that are 'on hold'  stage are represented in grey in
the kanban progress bar while the colored dot on their card is in blue.

In this commit, we change the color of the 'on hold' stage into 'info'
instead of 'muted'. After this projects that are 'on hold' are display
blue in the kanban progress bar as well.

Task-Id:2633273

closes odoo/odoo#78761

X-original-commit: 0886c10d5f276aca2539060ffaa047780a408354
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-21 15:47:14 +00:00
Hardik Prajapati 11228a2c7c [FIX] project: align the project and task name to the right in the activity view
purpose of this commit is to display the project name and task
to the right of the div in the activity view.

before this commit, the project name and task displays next to
the many2many_tags div in the activity view.

closes odoo/odoo#78738

Taskid: 2646204
X-original-commit: bb9734fbf761c3c11be0226cbe4da9d764ccbf74
Related: odoo/enterprise#21817
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-21 11:09:04 +00:00
5652e7ee91 [FIX] project: Fix user_ids access issues on project sharing
Both developments 6c4910a and 7563b44 have been introduced nearly
at the same time in the saas-14.5 version, but the later one is
introducing a side effect that breaks the project sharing feature.

Indeed, before there was one assignee per task (user_id), and now
we can assign several collaborators (user_ids).

As the read on a M2O is just calling the name_get method, it wasn't
an issue.

Now, as it implies to read the res.users (and the res.partner) model,
the assigned users were filtered according to a specific ir.rule
for the portal users:

    <record id="res_partner_rule" model="ir.rule">
        <field name="name">openerp.portal.res.partner</field>
        <field name="model_id" ref="base.model_res_partner"/>
        <field name="groups" eval="[(6,0,[ref('group_openerp_portal')])]"/>
        <field name="domain_force">[('id','child_of',user.commercial_partner_id.id)]</field>
    </record>

This commit creates a new compute non-stored field called
`portal_user_names` to display the name of all assignees in each task in
the project sharing feature. Thus, the portal user can see all assignees
via this char field. The `user_ids` field is removed in the views of
project sharing since the portal cannot see all assignees with this
field.
By doing this, a collaborator cannot edit the field to assign or unassign
himself to a task. To keep this behaviour, two buttons are added in the
form view of task. One called 'Assign To Me', the current collaborator
will be able to assign himself to the task when he will click on this
button. The other button called 'Unassign Me' is to allow the
collaborator to unassign himself to the task.

part of task-2633229

closes odoo/odoo#78538

X-original-commit: 3b5a657df086b54def0bc0bdae89c19c89cb39f5
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-10-18 14:01:36 +00:00
Thibault Libioulle bf6b2ae590 [FIX] project,hr_timesheet: fix hr timesheet graph extension
This commit fixes the broken inheritence between project and
hr_timesheet modules regarding the GraphView.

Hr Timesheet module extends GraphView rather than ProjectGraphView which
makes the view unaware it should use the ProjectControlPanel.

This commit adds project tour steps to ensure every view contains the
project update breadcrumb.

task-2642872

closes odoo/odoo#78503

X-original-commit: aa59771d3a4ffd2f7372c58bf56ca8dcc1183d2e
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: Thibault Libioulle (tle) <tlibioulle@users.noreply.github.com>
2021-10-18 07:56:34 +00:00
Kamlesh Pathekar f922df6af6 [FIX] project: remove the description field border
Currently there is border visible under only the 'description' notebook.
So in this commit we removed that border.

closes odoo/odoo#78240
task-2648148

X-original-commit: 43f2ae777d59430acfc3973cb57f8a76cb29129b
Part-of: odoo/odoo#78444
2021-10-15 16:13:57 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
Nasreddin Boulif (bon) ea7c954cce [FIX] project: Use task object instead of self
Issue: Getting recurrence start date from self instead
of current task.

commit ref.: https://github.com/odoo/odoo/commit/b50f5f17ee7140160e72bd37241efb14e14a9484

opw-2628777

closes odoo/odoo#77985

X-original-commit: 864ae7d307dd192ada6f34b2685b5554b77a3756
Related: odoo/enterprise#21514
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-06 22:12:28 +00:00
Martin Trigaux e132c36ee6 [I18N] *: export 15.0 source terms
closes odoo/odoo#77898

X-original-commit: ad5afb1d18661784bfcf51bca66e576de1f6c49b
Related: odoo/enterprise#21478
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-05 16:54:21 +00:00
Thibault Libioulle 2d15f586fd [IMP] project: add test on recurring subtasks
This commit adds a test in order to strengthen the behaviour of
recurring subtasks.

This test asserts that child with depth > 3 are not copied in a
recurrence, that recurrent subtask are well copied with the recurrence
correctly set.

This commit prepares the recurrence refactoring.

task-2660756

closes odoo/odoo#77632

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-04 09:16:13 +00:00
Cedric Prieels (cpr) 56ef461f44 [FIX] project: follow-up the project overview removal
-- This is a follow-up of odoo/enterprise#72736 --

The project overview is a significant technical debt
as it is a custom qweb view. It is quite limited:

It is not possible to group the data, to filter on dates,
SOs or Field Service projects.
Improving this is very difficult and would require weeks
of development that are not worth it.
In any case, all the information provided by the project overview
can be found elsewhere. The stat buttons of the report are basically
duplicates of the ones from the project form view.
Therefore, we are removing this report and its twin,
the Project Costs and Revenues.
In addition, analytic items lack context for the user to understand
what generated a certain cost or revenue:

there is no link to the source document;
the entries are not categorized (e.g. it is not easy to understand
if a cost comes from a timesheet cost, a purchase order or an expense);
the billable type group by works fine for timesheets but then all
the other entries are flagged as Undefined, which is not very helpful;
there is no option to easily isolate costs from revenues.

task-2637495
See odoo/enterprise#20740

closes odoo/odoo#77547

X-original-commit: 9bbfd3c8f948a3a947cbc0eb73ffc5d89c23d4ca
Related: odoo/enterprise#21324
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-30 20:56:12 +00:00
Julien Mougenot 53f9b5f235 [REF] *: adapt modules to action and view contexts
This commit handles the adaptation of any component using the search
model's 'action' and/or 'view' key, now replaced by the environment
keys 'actionContext' and 'viewContext'.

Affected modules are:
- base_import
- board
- crm
- google_spreadsheet
- project

X-original-commit: 40f1ae87e1436192a70a8a7432eb72d379cfa6dc
Part-of: odoo/odoo#77463
2021-09-30 10:38:30 +00:00
Nicolas Bayet 4813f42997 [IMP] mail,*: replace jinja with qweb
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment

By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).

There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).

We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.

To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.

This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
  (for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
  in order to see only one at once
- a floating select input to switch visibility of a particular logical
  branching

Task-27033

X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
2021-09-28 23:42:54 +00:00
Odoo's Mergebot 2e18b2a07b [FW][MERGE] project: re-allow recurring sub tasks
Previously, only the direct children of a recurrent tasks were copied
during a recurrence. Also, the child tasks which had a recurrence were
copied with the recurrence_id of the initial subtask, which lead the new
subtask to be linked with the recurrence of the initial subtask.

With this PR we copy the children until the 3rd layer. Also,
we hard copy the recurrence of the initial subtask and link this new
recurrence with the new subtask, to make it decoupled from the initial
subtask recurrence. Furthermore, if several initial subtasks has been
created with a same recurrence, only the first subtask is copied.

PR: #77126

task-2522076

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#77198

Forward-port-of: odoo/odoo#77126
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-28 18:27:20 +02:00
Thibault Libioulle 987023f3b5 [FIX] project: fix recurrence for child tasks
Previously, only the direct children of a recurrent tasks were copied
during a recurrence. Also, the child tasks which had a recurrence were
copied with the recurrence_id of the initial subtask, which lead the new
subtask to be linked with the recurrence of the initial subtask.

With this commit we copy the children until the 3rd layer. Also,
we hard copy the recurrence of the initial subtask and link this new
recurrence with the new subtask, to make it decoupled from the initial
subtask recurrence. Furthermore, if several initial subtasks has been
created with a same recurrence, only the first subtask is copied.

PR: #77126

task-2522076

X-original-commit: 808a965b4171a386f3987071c19cc27783ba0119
2021-09-28 15:40:16 +02:00
Mitali Patel 564504ef13 [FIX] project: fix project updates colors in kanban list
Purpose of this commit is to update the kanban card color
same as the state color of project update

closes odoo/odoo#77179

Taskid: 2638993
X-original-commit: 67fec40ab38999f0926297b57eb09d3cc44ebec8
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-28 09:28:54 +00:00
Thibault Libioulle 3b426db10a [REV] project: re-allow recurring sub tasks
With the modification introducted in the PR #62577, create recurring
subtask was no more allowed.

This commits reverts this limitation and adds tests to verify this
behaviour.

PR : #77126

task-2522076

X-original-commit: f6b12588757bd7f2d7802264fc7cd1aaae4c6c57
2021-09-24 20:23:49 +02:00
Sébastien Geelen (sge) e3a0a62622 [FIX] note, project, hr: collaboration opt-in on html fields
Activate the new opt-in option for the collaboration
on some html fields.

closes odoo/odoo#77160

X-original-commit: 504bbafc1d6183e7e8e0a326d1e90eddce6410d7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-24 14:00:45 +00:00
Prakash Prajapati e67ea6afb1 [FIX] project: disable opening form view from list view
Deleting record from tasks analysis report tree view has been stopped.

Issue:
If the record is opened from the list view, auto-generated from view is opened,
so the list view is restricted.

Closes #76465

task-2645891

closes odoo/odoo#77094

X-original-commit: e9ad8994c2836fcec41565c40e36784bd6152943
Related: odoo/enterprise#21136
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-24 12:34:57 +00:00
Prakash Prajapati 4217e58a89 [FIX] project: rename the 'assigned to' into 'assignees'
Closes #76465

task-2645891

X-original-commit: 493a185b83eafef40beac9c6c3f51d4c16c64d50
Part-of: odoo/odoo#77094
2021-09-24 12:34:56 +00:00
Priyanka Kakadiya 6a6f2f83d1 [FIX] project: show current project stages for burndown chart
Currently when move the task from one project(A) to another project(B)
and open the burndown chart of second project(B) it shows the stages
of first project(A). which is wrong.

so in this commit, include the tracking values of the current project
only, do not include the tracking value of the older projects.

Task-2616736

closes odoo/odoo#76964

X-original-commit: 9a6624f5f743677a233489932840e3a739330452
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-24 11:08:40 +00:00
Thibault Libioulle 1455e34cd5 [FIX] project: remove default group by user
This commit removes the default group by User for the Tasks Analysis
report, which was active once one clicked on "Open Tasks" in the Project
Update Kanban view.

This commit also removes the default group by user in the graph view
(which is induced by the field in the graph arch, through graph view
init function).

Issue :
The graph view of report.project.task.user is not able to render the
project_id>user_id groupby since the number of rows to display is to
high.

After considering improvements client-side (e.g. drop last groupby
when there are too many datasets to render), we concluded that the case
of report.project.task.user is rather isolated. The real issue is that
this 'complex' two-level groupby is forced in the view itself, making
it unusable on larger databases (e.g. next.odoo.com).

On top of that, project_id and user_id are usually dependent dimensions
(users are usually working in the same few projects).

PR: #73299

task-2588087

closes odoo/odoo#77013

X-original-commit: 605b4e109afabaff0876ca92cecfce9a6c615977
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-23 06:03:06 +00:00
Bonis Modi cb0b0a006c [FIX] project: fix the project_id field invisible on sub-task form view
Purpose of this commit is to hide the project_id field on
form view of sub_task

Taskid: 2645909
Closes: odoo#76555
X-original-commit: 403fbccfffcebb77b4c8bfdfcc48c4e08efe1da3
Part-of: odoo/odoo#77006
2021-09-22 20:39:13 +00:00
Mitali Patel b55f81aa30 [FIX] project: fix seprators in Task analysis report's filter
Purpose of this commit is to add the separators before and
after the 'unassigned tasks' filter on Task analysis report.

Taskid: 2645909
Closes: odoo#76555
X-original-commit: 388b58cd86d3fdc71c1d5e27a471febae9bd8dd5
Part-of: odoo/odoo#77006
2021-09-22 20:39:12 +00:00
Barad Mahendra bda930b602 [FIX] project: fix the visibility of assign to me button
Currently the 'Assign to me' button is never visible on form view
of the task.

So in this commit visible the button only when user_ids is Fasle on
task.

closes odoo/odoo#76967

Taskid: 2642872
Closes: #76312
X-original-commit: 6f96898160bb219427d5c5b23195ef8563e732a8
Related: odoo/enterprise#21072
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-22 15:08:55 +00:00
Aaron Bohy 5f19d41d32 [REF] web,project: graph: use renderer props convention
By convention, views pass the model instance in props to the
renderer. Moreover, when the renderer needs to perform actions
outside of its natural scope, those callbacks have to be given in
props as well, s.t. the renderer can call them directly (instead
of triggering an event, listened by the parent).

This commit also adds the props validation on the PivotRenderer.

X-original-commit: 0ca538eba780aacca44ab4e34c56d8eed22fa333
Part-of: odoo/odoo#76918
2021-09-22 06:50:54 +00: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
Francois (fge) e0e4d38cdd [MOV] web: move /commands to /core
We move /commands to /core because DebugMenu depends
on /command/command_hook. All the files in /commands depend only
on /core or /commands except for menu_providers which we will move to /menus

X-original-commit: eca8cd478b72d81b2293c22d2c9c41d1f94be16a
Part-of: odoo/odoo#76777
2021-09-17 23:59:19 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Laurent Stukkens (LTU) 4ed77405e4 [FIX] project: change user_id into user_ids in various view and reports
The `user_id` field was replaced in odoo/odoo#74087 by `user_ids`.
The field change was forgotten in various reports and the a wizard.

This commit fixes those.

task-2638359
closes #76166

X-original-commit: f584485f0c69eda002491ca9b63bc3d228e95001
2021-09-14 21:25:00 +02:00
Cedric Prieels (cpr) 942c64df67 [MOV] project,sale_timesheet: move sale project tour steps
Elements referring to the sales order from the project module have been
removed from the project update js tour and moved to sale_timesheet
tour.

task-2638359
closes #76166

X-original-commit: 0b9d5b4a9c5552e22bb6a8f89b0e492330a034fd
2021-09-14 21:24:59 +02:00
Xavier BOL (xbo) 5b51f369aa [IMP] project: change the analytic account name when project one changes
Before this commit, when the user changes the project name, we don't
change the one in analytic account linked even if the analytic account
is only linked to one project.

This commit also changes the name of the analytic account when the
project name changes and the analytic account is linked to only one
project.

task-2638359
closes #76166

X-original-commit: de9fbbd4228a35c4fecef8be42477416cfcbdd8d
2021-09-14 21:24:59 +02:00
Thibault Libioulle 9ed5f1e64d [IMP] project: sort updates by date
With this commit, project updates are sorted depending on their date
rather than the create date.

task-2638359
closes #76166

X-original-commit: b65edac046bb7fea649474d2282e0afa2d6f5703
2021-09-14 21:24:59 +02:00
Thibault Libioulle bf6f91eab9 [IMP] project: add dependent tasks stat button
This commit adds a stat button representing the number of dependent
tasks, the current task is blocking.

This is the inverse relation of "Blocked by".

task-2638359
closes #76166

X-original-commit: d841e4a7e25fd56c49c0cd3b51994a7fda4cbc8b
2021-09-14 21:24:58 +02:00
Xavier BOL (xbo) 0302a262c8 [IMP] project: rename the See more button into Edit project in kanban
Before this commit, we rename the 'Edit' button into 'See more' but we
prefer to directly edit the project when we click on this button
So, it is to have 'Edit' as name and directly enter in the form view of
the project in edit mode.

This commit renames the button into 'Edit'.

task-2638359
closes #76166

X-original-commit: e960b2966bdd16f369df9fbd8e4cf372c37bd37a
2021-09-14 21:24:57 +02:00
Cedric Prieels (cpr) 828d5157a5 [FIX] project{,_mrp}: fix project update stat buttons
We are copying 3 stats buttons from the project
view form (manufacturing orders, work orders and bills of materials)
 and we add them to the project update page.

See task-2638359

closes odoo/odoo#76421

X-original-commit: 4572e710a5e755c0c75c95a6d033e44f0a2799f8
Related: odoo/enterprise#20811
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-14 12:07:39 +00:00
Cedric Prieels (cpr) 0976a92076 [FIX] poject,sale_timesheet: group by modified, hover lighten
In this commit, the hover color of the elements in the right panel
has been revised. Furthermore, we now group by task by default when
using the billable time stat button

task-2638359

closes #76167

closes odoo/odoo#76263

X-original-commit: a641d8e4820c4196d41e5f5b661ddef22f940477
Related: odoo/enterprise#20747
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: Xavier <xavierbol@users.noreply.github.com>
2021-09-10 13:41:52 +00:00
Xavier BOL (xbo) 58195290cc [FIX] project: count all active tasks instead of open tasks in project
Before this commit, the task_count field displayed in the 'Tasks'
stat button shows the number of open tasks, that is all tasks with
either no stage linked or stage not folded or not closed.
The problem is when the user clicks on this stat button (displayed in
project form view or in project update), he sees all active tasks in
the project.

This commit changes the count to display the number of active tasks
instead of the number of open tasks in the project.

task-2633229

closes #76167

X-original-commit: f6ace36d7f61c005f324559d02436f7ff69eb40a
Part-of: odoo/odoo#76263
2021-09-10 13:41:51 +00:00
Thibault DelavalléeandVictor Feyens d875bcd79d [IMP] gamification, google_drive, project: limit usage of search on ir.model
Purpose of this commit is to globally improve code performance by limiting
search impact by using cache when accessing ir.model.

Note that tests are left untouched as they are generally done using admin
(or at least data preparation is done as admin). Diff is kept small currently.

Task-2638444
PR odoo/odoo#76005

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
2021-09-08 07:56:03 +00:00
Xavier BOL (xbo) d8a76aef55 [IMP] project: update the project sharing webclient and assets
Before this commit, we add the DebugMenu component in the project
sharing webclient but this one is displayed in the menu bar in backend.
In project sharing views, we don't display this menu. So, this component
is useless in project sharing.

This commit removes this component and also the menu_provider file in
the assets of project sharing.

Related PR: #73341

Part of task-2633229

closes #76098

Related: odoo/enterprise#20662
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-07 17:03:06 +00:00
Xavier BOL (xbo) 1e71ba3995 [FIX] project: access error when internal user is in project sharing form view
Before this commit, when the internal user is not follower of the
project and enter in the project sharing feature. If he wants to see the
form view of a task, he cannot and have a Session expired error.
This issue arrives because in the chatter we check is the user is a
follower of the project shared.

This commit fixes this issue by just using the _document_check_access
method to check if the user can access to the document. Indeed, we don't
need to check if user is a follower because the _document_check_access
does it with the `ir.rules`.

Related PR: #73341

Part of task-2633229

closes #76098
2021-09-07 17:03:05 +00:00
Nasreddin Boulif (bon) dfc853aaad [FIX] project: Calculate the right task next occurrences dates
Steps to reproduce:

  - Install "Field Service" module
  - Go to settings and activate "Recurring Tasks"
  - Go to Field Service -> All tasks and create new one
  - Set for Planned Date : 10/01/2021 14:00 -> 10/02/2021 14:30
  - Check Recurrent and go to Recurrence tab
  - Select repeat every 1 weeks
  - Select Monday

Issue:

  Wrong date for next occurrences (first occurrence is 09/06 instead
  of 10/04).

Cause:

  Calculation based on today date.

Solution:

  Calculate next occurrences based on planned_start_date if set.

opw-2628777

closes odoo/odoo#76092

X-original-commit: 86060f9426eef6516db6dda7829ae17050f0fcc3
Related: odoo/enterprise#20659
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-09-07 15:50:28 +00:00
Mathieu Duckerts-Antoine acf222be06 [FIX] project: project_graph and project_pivot components
During the refactoring of the project_graph and project_pivot views,
their static key "components" were incorectly set making impossible for
OWL to render them. This is now fixed.

closes odoo/odoo#76065

Related: odoo/enterprise#20647
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-07 15:50:14 +00:00