Commit Graph
607 Commits
Author SHA1 Message Date
Aaron Bohy 4f984568e1 [REF] *: adapt code to new kanban view
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).

It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...

Part-of: odoo/odoo#92475
2022-06-30 09:29:45 +02:00
Sébastien Theys 9de429e747 [IMP] mail, project: move chatter container setup code in init
Setup was conditionally done in render lifecycle methods, but it could be moved
to init instead, allowing to simplify the code and remove unnecessary methods
and overrides.

Part of task-2871070

closes odoo/odoo#94307

Related: odoo/enterprise#28893
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-27 15:11:13 +02:00
Xavier BOL (xbo) 84e17847fe [FIX] project: stringify the domain list before using Domain.and
Before this commit, when we use a domain list made by the old
implementation of the Domain in js and in this domain we have a date in
a right leaf then this date is an object of Date class. However, with
the new implementation of the Domain, the date will be converted into a
PyDate/PyDatetine object and so when we create a domain with the new
implementation by giving a list containing the result of the old
implementation. The date will be converted as a plain object instead of
a date formatted or instead of a date object.

This commit converts the list in string before using `Domain.and` with
the new implementation to having a date formatted as a string to avoid
the issue.

for instance, when the user choose a filter containing a date in the
right of a leaf in the domain. The old implementation of domain class
will return `[['date', '=', new Date(1970, 1, 1)]]`
```js
new Domain([['date', '=', new Date(1970, 1, 1)]]).toList()
// result: [['date', '=', {day: 1, month: 1, year: 1970}]]
```
if the list is converted as a string before passing the result will be:
```js
new Domain(JSON.stringify([['date', '=', new Date(1970, 1, 1)]])).toList()
// result: [['date', '=', '1970-01-01']]
```

closes odoo/odoo#93884

X-original-commit: 44d4a44dc4695b40a52c7d4cfccf0e9238d39b19
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-06-16 22:34:33 +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) 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
Audric Onockx (auon) fd521e8d39 [FIX] project : allow to continue recurrence
This fix corrects the error committed in a previous fix :
https://github.com/odoo/odoo/pull/85209

closes odoo/odoo#92381

X-original-commit: d6bff1a9ccfc52adf98dbbf5c9c56c4a1a4fb3e8
Signed-off-by: Xavier <xbo@odoo.com>
2022-05-31 09:06:18 +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
Laurent Stukkens (LTU) 53ed5d54cb [FIX] project: remove unnecessary condition in _onDeleteColumn
This commit removes the unnecessary condition on modelName as the code
stands in `ProjectTaskKanbanColumn` which is only used in the
`project.task` kanban view.

closes odoo/odoo#91965

X-original-commit: cb55586bd3da19a6fbbb22728f9d2961830e1592
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-20 17:53:14 +02:00
William Braeckman 8c32ed3fb2 [FIX] project: fix deletion of column in task kanban
Upon deleting a column in the project task view a popup will be
displayed warning the user that the stage will not be deleted but
instead archived.
Prior to this commit that popup would be displayed regardless of the
group by option that is selected. However this could lead to issues when
opening the archive wizard with an id from another record.

closes odoo/odoo#91872

X-original-commit: 24d307716cbd9e05a32dde108838e16d04309116
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-05-20 07:12:08 +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
Adesh Jolhe (adjo) 6324db6838 [FIX] project: fixed portal chatter avatar icon size
Currently, when we go to the project sharing and task chatter in
the portal view the avatar icon of portal chatter
contains more size than the avatar icon size of normal chatter

so this commit fixes the issue by applying a CSS property so that the icon
has the same size in the portal chatter.

task-2720976

X-original-commit: 220565b56493fe13d0c1757da8a0554295ebae19
Part-of: odoo/odoo#90897
2022-05-09 17:05:55 +02:00
Adesh Jolhe (adjo) c836013826 [FIX] project: fix the green and red icons visibility on example wizard
Before this commit, when we go to project.task > kanban examples wizard:
the kanban state icons are missing in the description.

This commit fixes the issue by adding the d-inline-block class.

task-2720976

X-original-commit: 2593fb1e51354096c1aa6107023e05a199b49593
Part-of: odoo/odoo#90897
2022-05-09 17:05:54 +02:00
Vincent Larcin 93bde9cafd [IMP] project: append "Tasks by Deadline" to tasks calendar view title
To make it more clear that the calendar view of the project tasks
only shows the deadline of the tasks, this commits appends
" - Tasks by Deadline" to the title of the view

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:30 +02:00
Vincent Larcin 7b26f01129 [IMP] project: remove project status label in list view
This commit changes the project status column in list view to copy
the behavior of the kanban status column for tasks, by removing
the column label and show the status text on hover.

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:28 +02:00
Vincent Larcin 4497d0c4ff [IMP] project: add star icon to toggle a project as favorite in form and list views
This commit adds a star icon to toggle a project as favorite in form and list views.

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:28 +02:00
Vincent Larcin 2df9e08eff [IMP] project: disable task resizing in planning view
In the fullcalendar library, you can by default resize events with the mouse
to alter the start and end dates. However, since for project tasks, we use
the calendar to show deadlines, it wouldn't make sense to resize them.

This commit therefore disables the ability to resize tasks.

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:27 +02:00
Vincent Larcin 52b621e8bc [IMP] project: display parent task name on hover of the stat button
This commit adds the parent task name as hover text for the "parent task"
button in the task form view

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:26 +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
Géry Debongnie b828cfc72c [REF] web, *: improve the way views are defined, reintroduce controllers
Earlier in Odoo, JS views were defined by defining 4 elements: View,
Controller, Model, Renderer.  This was complex in some way, because we
wanted to inherit behaviour as well, so it was necessary to think along
multiple dimensions to understand how the code was running.

Then, with Owl, we rewrote some views, and simplified them: views were
now just a Component. Most of the common behaviour now came from the
generic View component that instantiated the concrete view with the
proper informations.  In practice, views were still split in views
(which was the equivalent of the Controller of earlier views), Model and
Renderer

Now, this commit reintroduce the Controller, and change the way views
are defined: by an object with multiple metadata, and an (optional)
props function to compute the actual props used by the view.

As a result, views are now much easier to extend/modify.

closes odoo/odoo#89889

Related: odoo/enterprise#26728
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-05-02 22:38:02 +02:00
Cedric Prieels (cpr) 75c4468b9a [IMP] project: rename starred field and other generic improvements
- The starred field was renamed as priority.
- The assigned date is now set back to False when the user is unassigned from the task
- An action helper was added to the collaborators view
- The year mode was added to the calendar view of tasks

task-2802506

closes odoo/odoo#87139

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-25 14:42:04 +02:00
Kartik Chavda c8deb68d84 [FIX] project: hide sub-task count in kanban view of task
before this commit,
in kanban view of task sub-task count of task is visible when
sub-task feature is disable from setting.

after this commit,
sub-task count of task will not be visible in kanban view of
task when sub-task feature is disable from setting.

task-2758779

X-original-commit: 1e45586c16443c3a19ae16f604882087dea3cc4e
Part-of: odoo/odoo#89329
2022-04-22 10:58:49 +02:00
Vincent Larcin b893695bf9 [IMP] project: merge identical measures in burndown chart
In a project burndown chart, we currently have two measures, "Count" and "# of tasks".
Those measures are identical, but the default "Count" one is less explicit.

We only want to keep "# of tasks", but rather than discarding the default measure,
we could rename it and remove the other one.

This commit removes the "# of tasks" measure, and renames the default "Count"
into "# of tasks".

Task-2734458

closes odoo/odoo#86110

Related: odoo/upgrade#3357
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-20 10:32:57 +02:00
Xavier BOL (xbo) c48e54fb3c [IMP] project: put in bold the text in table column when text-bold class
This commit add a css style when a td (= table column) has the class
`text-bold` to put in bold the text in that column.

task-2814466

Part-of: odoo/odoo#88219
2022-04-08 17:13:31 +02:00
Xavier BOL (xbo) 153f35ef7f [IMP] project: grey the row when the user hovers it.
Before this commit, the user could having a bit difficult to read a
row in Sales or Profitability section shown in right side panel of
project update view since there is not much space between 2 rows.
The idea is to add a color when the user hover a row to correctly see
the row that he sees.

This commit greys a row when the user hovers a row like we did for the
line in the milestone section in the right side panel.

task-2814466

Part-of: odoo/odoo#88219
2022-04-08 17:13:28 +02:00
Xavier BOL (xbo) 44bc52724a [IMP] project: add no line break in formatMonetary for right panel
Before this commit, when the amount is big the monetary symbol is
displayed either above or below the amount associated.

This commit replaces the basic space by a no line break space to keep
the symbol at the same line than the amount.

task-2814466

Part-of: odoo/odoo#88219
2022-04-08 17:13:28 +02:00
Xavier BOL (xbo) d1d00c0e4c [IMP] project,sale_{project{_stock},timesheet}: display form view if one record
Before this commit, when the user clicks on a row in Sales section
displayed in the right side panel of project update, the action display
the list view even if there is only one record to display.

This commit passes the `res_id` with the action to the frontend to
call the action and directly display the form view when we are sure
there is only one record to show.

task-2814466

Part-of: odoo/odoo#88219
2022-04-08 17:13:27 +02:00
Xavier BOL (xbo) c9b8b5b0eb [FIX] project: parse the context given by the backend
Before this commit, the context retrieves when the user clicks on a
Profitability section is not parse, and since this context is a string
containing the JS object with the context added, the context is not
correctly added with the existing context.

This commit parses the added context to correctly append it with the
initial one.

task-2814466

Part-of: odoo/odoo#88219
2022-04-08 17:13:27 +02:00
Achraf (abz) cfccd028b3 [FIX] board, project: Allow user to add project_graph to dashboard
If we add the graph view of project in the dashboard
And we access the dashboard a traceback appears

Cause: Unable to evaluate the context because the following information
is missing: "active_id" which is used in the domain

https://github.com/odoo/odoo/blob/4d864c05dfa8f9be25d41bbae318f75a61d0cde2/addons/board/static/src/legacy/js/board_view.js#L254

the solution is to add `globalContext` to the `contextToSave`

https://github.com/odoo/odoo/blob/7e77bb74bfa1bfef92c6d385dedc2d89e0040780/addons/board/static/src/add_to_board/add_to_board.js#L37-L43

`View` is `undefined` because the `project_graph` view is made with OWL
and board is still in legacy

https://github.com/odoo/odoo/blob/4d864c05dfa8f9be25d41bbae318f75a61d0cde2/addons/board/static/src/legacy/js/board_view.js#L274

Since https://github.com/odoo/odoo/pull/84864

The solution is to add a legacy version of the `project_graph`

Apply the same fix for `project_pivot`

opw-2791672

closes odoo/odoo#87883

X-original-commit: 8999277e668f666bc650d508384c4a07ea6c711e
Signed-off-by: Achraf <abz@odoo.com>
2022-04-04 14:45:26 +02:00
Xavier BOL (xbo) 7df8cf0496 [IMP] project: refactor to easily create right side panel components
Before this commit, the components created and used in the right side
panel are components for the `project.milestone` and we cannot reused
some components for another context.

This commit refactors a little bit to create a parent component with the
common code useful for another components than `project.milestone` ones.

task-2710808
2022-04-01 15:33:00 +02:00
Xavier BOL (xbo) 31b2ddc42f [IMP] project*,sale_timesheet: add profitability label
Before this commit, the label is giving with the data computed for the
project profitability.

This commit separes the label with the data to avoid translating many
times the same things.

task-2710808
2022-04-01 15:33:00 +02:00
Xavier BOL (xbo) b4abfd9ad3 [IMP] project: allow clicking on Name of each row in profitability 2022-04-01 15:33:00 +02:00
Xavier BOL (xbo) 4006d6c9fb [IMP] project: avoid displaying section if no data
Before this commit, the profitability section is shown even if data is
found. That is, no cost and/or revenue are found to display the project
profitability.

This commit hides this section in the case where no data is found.

task-2710808
2022-04-01 15:33:00 +02:00
Xavier BOL (xbo) 3e721c28c4 [IMP] project: add format monetary in project update components 2022-04-01 15:33:00 +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
Xavier BOL (xbo) 08501fa130 [IMP] project,sale_{project,timesheet}: review 'Sales' section in project update
This commit completly reviews the Sales section. This section will
display all Sales Order Items linked to the current project shown
instead of displaying the sold section with the total sold section.
This section will shown the name and ordered, delivered and
invoiced quantities for each Sales Order Item related.

The name displayed in this section will be clickable if the product linked to
the Sales Order Item is a service one and if there is at least one
timesheet linked.
Finally, this commit also moves the Sales section initially defined in
sale_timesheet module into the `sale_project` one.

task-2710808
2022-04-01 15:32:59 +02:00
stefanorigano (SRI) c9d58ecca4 [IMP] web,*: o_cursor_default utility-class
This commit is part of v16 overall restyle, task-2704984.

task-2797245

closes odoo/odoo#86626

Related: odoo/enterprise#25365
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-03-21 14:01:03 +01:00
Audric Onockx (auon) 8bd94f422f [FIX] project : keep one task as model for recurrence
Steps :
Create a recurrent task.
Delete it.
Run the cron "Create Recurring Tasks".

Issue :
IndexError: tuple index out of range.

Cause :
The cron calls a method which takes the last task of the recurrence
as a model. As there is no such task, an python error is thrown.

Fix :
Do not display the "Continue Recurrence" button when deleting the last
task of it.

opw-2743788

closes odoo/odoo#86309

X-original-commit: 9cfe0042dd6846cf8b52aebeb9dd6e7432b32322
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-03-11 19:46:17 +00:00
Aaron Bohy e1e6c42d99 [REF] web,*: make action scrolling helpers stop using comp.el
*crm, project

With owl2, the `el` of components is no longer available. It still
works in Odoo on LegacyComponent, which has been introduced to ease
the switch from owl1 to owl2, and we're now incrementally removing
it.

With this commit, the action scrolling helpers no longer rely on
component.el, meaning that views using them (through the hook
`useSetupAction`) no longer need to extend LegacyComponent.

More specifically, we move the action scrolling helpers from core/
to webclient/actions, as those helpers make no sense outside the
context of actions (and thus are unnecessary in the frontend).

Tests have been adapted as well.

closes odoo/odoo#85631

Related: odoo/enterprise#24902
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-03 07:36:55 +00:00
Jorge Pinna Puissant bc20eb4790 [IMP] test_lint, *: enable no-unused-vars rule
Part-of: odoo/odoo#85569
2022-03-02 13:05:42 +00:00
Michael (mcm) b81861233d [REF] *: use LegacyComponent
This commit replaces Component by LegacyComponent when the component
uses removed features from owl 1 like getting its `el` or `trigger` an event.
It also adds `useService("rpc")` when component needs it.

closes odoo/odoo#85389

Related: odoo/enterprise#24745
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-03-01 09:57:39 +00:00
Audric Onockx (auon) 43196c9ec0 [FIX] project : keep one task as model for recurrence
Steps :
Create a recurrent task.
Delete it.
Run the cron "Create Recurring Tasks".

Issue :
IndexError: tuple index out of range.

Cause :
The cron calls a method which takes the last task of the recurrence
as a model. As there is no such task, an python error is thrown.

Fix :
Do not display the "Continue Recurrence" button when deleting the last
task of it.

opw-2743788

closes odoo/odoo#85176

X-original-commit: 4f143131a1722e87b7dbb6b54a76b81ce2ba40cd
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-03-01 08:06:44 +00:00
abderraouf f87d0d5226 [IMP] project : Add project Tree view, improve some wordings and hide uom conversion when default and selected are the same
Before this commit, In the product form, when the selected uom is Hours and as Hours is the default uom, we display this conversion (1.0 Hours = 1.0 Hours) which is useless
Before this commit, Kanban is the only view available for projects. With this view, we can't select a batch of projects and display optional fields
Before this commit, Some wordings didn't have a significant meaning.

This commit hides uom conversion when selected and default uom are the same.
This commit adds the projects tree view.
This commit improves some wordings according to what was mentionned in the task.

task-2724965

closes odoo/odoo#82135

Related: odoo/enterprise#23206
Related: odoo/upgrade#3207
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-28 20:23:53 +00:00
Vincent Larcin d161d28782 [IMP] sale_timesheet: link milestones to SOLs
Currently, a service can be configured to be invoiced on milestones.
This means that the user has to manually update the delivered quantity on the SO in order to invoice it.

We now also have the notion of milestones in the project module.
It would be nice to have a link in between the milestone and the corresponding SOL, so that the delivered quantity is automatically updated when the milestone is reached.
This would help the users save time, limit the risk of error and reduce the confusion of having unrelated milestones at two different places.

To this end, this commit adds a new "milestones" invoice policy that computes the delivered quantity of a SOL based on the milestones that have been reached, and renames the previous "milestones" policy into "manual".

Task-2558889

Closes https://github.com/odoo/odoo/pull/81684

closes odoo/odoo#81684

Related: odoo/upgrade#3265
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-28 13:52:41 +00:00
Géry Debongnie d90f481448 [REF] web, project: remove the component NotUpdatable
With the new fine-grained reactivity in owl 2, this component is not
necessary any more.

Part-of: odoo/odoo#84314
2022-02-25 12:35:43 +00:00
Florian Damhaut 22211ec6c2 [FIX]project: traceback on project update notif
Step to reproduce:
- Schedule activity on a project update
- Access the activity

Current Behaviour:
- On Project.update, we try to compute the info related to the project_update's project
due to the project update view showing information about the project.
In case of notification, we can show multiple project and thus no project_id can be
provided.
- Traceback

Behaviour after the PR:
- If there is no set project_id when opening the project update kanban view
We do not show the RightPanel related to the project and do not compute

related PR in enterprise odoo/enterprise#24427

opw-2755473

closes odoo/odoo#85060

X-original-commit: 9e30888195db0d01f06dffa9d59ae652fe6de5f0
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-21 19:22:04 +00:00
Achraf (abz) 6353fbaa06 [FIX] web: Allow user to groupby nonstored field
For the moment we cannot groupby an inherited field (which is therefore related) in a graph view, so it is counted as being non-stored.
Because in the `_normalize` function we do not process fields that are not stored, whereas like here

https://github.com/odoo/odoo/blob/d679cd0d8ba9a2420e81a42a698763e9be2327e1/addons/web/static/src/legacy/js /control_panel/groupby_menu.js#L45-L49.

Typically when a field has store=False but sortable=True it is inherited from a stored field, so it can be sortable
So we have to use `sortable` instead of `sort` to make it consistent.

opw-2733133

closes odoo/odoo#84612

X-original-commit: ce2a538e2988aef572171f783891cd6ee644ad14
Related: odoo/enterprise#24351
Signed-off-by: Achraf <abz@odoo.com>
2022-02-15 15:51:42 +00:00
Xavier BOL (xbo) 78d3387a76 [IMP] project: update webclient in project sharing to OWL 2
task-2633229

Closes #82379
2022-02-14 13:24:11 +01:00
Xavier BOL (xbo) 94153e9765 [REF] project: refactor tour js for project sharing feature
Before this commit, we duplicate some steps of the tour js launched
with internal user to the tour js launched with portal user.

This commit avoid duplicating the steps. To do this, a list variable
stores the common steps of both tours and use this  list in both tour
js to avoid duplicating the steps in both tour js.

task-2648955

Closes #82379
2022-02-14 13:22:52 +01:00
Xavier BOL (xbo) 70e5f6ccbb [IMP] project: get parent task of another project in project sharing
Before this commit, the portal user can see the parent stat button in
project sharing form view of task if the parent is in the same project.
This button can be clicked and it redirects the user to the parent task
form view in the project sharing.

This commit improves this button and its visibility in project sharing
feature. The button is visible only if the current user has access to
the project of the parent task. That is the privacy visibility of the
project should be set to 'portal'. If the portal user has access to the
project of the parent task and he is not a collaborator of this project,
then the current user will be redirected to the classic portal view of
the parent task. If it is a collaborator then we display the parent task
in the project sharing feature.

task-2648955

Closes #82379
2022-02-14 13:22:36 +01:00