Commit Graph
369 Commits
Author SHA1 Message Date
Martin Trigaux 91d5aef00c [FIX] project: translate panel data
Give the language in the context

closes odoo/odoo#79594

X-original-commit: 9939a0cbfae814f6b4d66c0ca45e0a84d3f57836
Related: odoo/enterprise#22205
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-10 07:45:53 +00:00
Xavier BOL (xbo) 708861ed3d [IMP] project: manage column_invisible in project sharing list
Before this commit, it was impossible to to hide a column when the
timesheets or subtasks features are not enabled to the project shared.

This commit manages the column_invisible for the list view in project
sharing to compute the domain in this modifiers. We assume all tasks
displayed in project sharing are linked to a project shared.

task-2633229

closes #77156

X-original-commit: ab2b5d1fd1f09d804ab410bc326cfebf26d5a7c6
2021-11-05 17:16:13 +01:00
Xavier BOL (xbo) d3b8d1fd31 [FIX] project: remove 'Share with all users' checkbox in project sharing
Before this commit, the portal user could see the checkbox in search
view to share his favorite item with all users. This action is not
authorize in project sharing feature and should be removed.

This commit removes this checkbox to avoid the portal user to share his
favorite item with others users.

task-2633229

closes #77156

X-original-commit: 19b38074dd8bfe4d8347db31f946beeb2850d453
2021-11-05 17:16:05 +01:00
Xavier BOL (xbo) 95c0fe5729 [FIX] project: favorite menu in project sharing
Before this commit, when the collaborator clicks on the favorite menu,
he has a traceback because the 'spreadsheet' service is not available.

Since we don't want to use this service and we just want the menu item
to save the current as favorite. This commit override the favorite menu
to remove the registry items to add the menu item and we just add the
one we want.

task-2633229

closes #77156

X-original-commit: d970c13494db2c3e085155b7855b656fbbe26467
2021-11-05 17:15:54 +01:00
Xavier BOL (xbo) 8f84155337 [FIX] project: not set by default the height of the chatter
Before this commit, the border left displayed when the chatter is aside
the task form view is not from the top to the bottom of the page in
project sharing feature.

This commit removes the fit-content set to the height in css to have the
border left displayed from the top to the bottom as expected in project
sharing feature.

task-2633229

closes #77156

X-original-commit: 886bc7577b2d6f437c28ea18e5786b36930a7cc2
2021-11-05 17:13:24 +01:00
Xavier BOL (xbo) 4c12d0410d [FIX] project: remove checkboxes in list view for project sharing
Before this commit, the portal user can select multiple tasks in the
list view with the checkboxes but no action is available.

For this reason, this commit removes these checkboxes.

task-2633229

closes #77156

X-original-commit: cef79697a014c6443c1d1dfdcf498c18fcb27fb9
2021-11-05 17:13:19 +01:00
Vincent Larcin f4373cd034 [IMP] project: indicate private tasks in multiple views
This commit will indicate 'fa-lock private' for the 'Project' field for private tasks in the following views: list, calendar popover, kanban, activity.

Previously, this field was left blank.

Task-2657697

Closes #77870
2021-11-05 11:00: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
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
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
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
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
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) 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
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
d1e227b07b [IMP] web,*: new PivotView component
Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-09-07 10:04:38 +00:00
242b1caa65 [IMP] web,*: new GraphView component
*hr_timesheet,project,stock

Part-of: odoo/odoo#73311
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
2021-09-07 10:04:38 +00:00
Mathieu Duckerts-Antoine 23e84c1750 [IMP] project: new ProjectControlPanel class
The reporting views are going to be converted to OWL so that their extensions
(like the project_graph and project_pivot views) have to be converted too.
We thus need an owl version of the ProjectControlPanel class.

Here we introduce that control panel and refactor a bit the legacy code.

Part-of: odoo/odoo#73311
2021-09-07 10:04:38 +00:00
Cedric Prieels (cpr) 1ec2b3c0b0 [IMP] project: improve project updates
This commit improves the project updates panel and the data reported
in the update description.

This commit prepares the removal of the project overview feature.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Priyanka KakadiyaandXavier BOL ebf163c6a4 [IMP] hr_timesheet, portal, {sale_}project: few improvements for portal
PURPOSE

Generic UX improvements for the portal

SPECIFICATIONS

For projects list view,

- clicking on the project should open the list view of tasks with groupby stage
- the number of tasks should not be clickable

For tasks list view,

- display the fa-star of the priority field on the left of the name of the task
- add the following fields on the right of the name:
  user_id, time spent, kanban_state
- for the kanban_state,
  only display the colored dot and indicate the name of the state on hover
- for the time spent:
  indicate the nb of hours recorded / nb of planned hours(or days(as per unit))
  (if the nb of planned hours = 0, only display the nb of hours recorded)

For tasks search view,

- add a group by priority and status and reorder accordingly
- add a quick search on status and priority and reorder accordingly
- add a sort by priority, assigned to and status and reorder accordingly

For task form view,

- display the fa-star icon of the priority field on the left of the name of task
- add the kanban state in the top right corner

the kanban_state field should be editable by portal users
increase nb of items displayed in the list view to 80 items per page(generic)

Task-2613330

closes odoo/odoo#74996

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
2021-09-03 15:45:24 +00:00
Kevin Baptiste d9e47e23ef [IMP] project: UX improvements
- Align colors of Project Update bubble's to kanban colors
- Allow Project User to manage Project Updates

TaskID: 2615316
Related: odoo/enterprise#20426
Related: odoo/upgrade#2773
2021-09-01 14:22:38 +02:00
William Braeckman 7563b448da [IMP] project: add personal task stages and multiple assignments
Adds personal stages to tasks.
Users assigned to tasks will be able to have their own pipeline to
handle their tasks independently of the project's pipeline.

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

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

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

Closes odoo/odoo#74087

Task ID: 2398734
2021-09-01 07:17:40 +00:00
Laurent Stukkens (LTU) 2b9584101f [IMP] project: improve milestones design
closes odoo/odoo#75734

Related: odoo/enterprise#18045
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-30 21:05:04 +00:00
Xavier BOL (xbo) a28cc6333a [REV] project: select access rights in project sharing
This reverts commit fc7778f8c512202dc3361d6b87be8c28b299c3c8 because of
a change in the spec.
The access mode are removed and replaced by this access mode for portal
user:
- read: the user goes to the classic portal view
- edit: the user is added as collaborator of the shared project and can
access to project sharing views.

To do this, the portal share is inherited by the project share wizard.
This new wizard can be open to share in readonly and open to share in
edit mode via 2 buttons in the form view of the shared project.
A new stat button is added to form view of project to see the
collaborators of this project. That is, the ones can access to the
project sharing views. The project manager will can remove or also add
new collaborators via the views in this stat button.

task-2379518

closes #73341
2021-08-26 16:57:23 +02:00
Xavier BOL (xbo)andYannick Tivisse 5ea5ddafea [IMP] project: select access rights in project sharing
Before this commit, when the portal user can access to project sharing
views, he can just read. If we just add ir.rule to allow the edition,
the portal could create/edit. We have to allow the project manager to
define the access rights of portal users when he want to share them a
project with the project sharing feature.

This commit adds 3 access modes portal users in project sharing views.
1. **Readonly**: the portal can only see the tasks in the different views.
2. **Comment**: the portal can use the chatter in task form view.
3. **Edit**: the portal user can create and edit tasks.

task-2379518

closes #73341

Co-Authored-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) bad706d34c [IMP] project: check if the chatter is visible before mounting it
Before this commit, if we put an invisible in attrs of div tag for the
chatter, the attrs is not taken into account because when the chatter
is mounting this div is replaced.

This commit changes the class for the chatter in project sharing and
check if the div is visible before mounting the chatter.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) d3ecc4962e [IMP] project: update chatter when create/change task
Before this commit, when the user changes the task, the chatter is not
updated so we keep the messages of the previous task. Same thing when
the portal user wants to create a new task.

This commit updates the chatter to allow to fetch the messages when the
user changes the task and also disables the chatter when the user is
creating a new task.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) 0c7b99987a [IMP] project,portal: allow portal user not follow task to use chatter
Before this commit, if the portal user is a follower of the project he
can use the chatter of new tasks in the project sharing feature since
the follower of the project is automatically the follower of new tasks.
But if he is not a follower of the task (for instance, old task in the
project) then we have to check if the
access token is the one of the shared project to give the access to
the chatter.

This commit checks the `access_token` of the project when we are in the
project sharing form view to allow the portal user to use the chatter.

task-2379518

closes #73341

Co-authored: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) 60e97e4ffb [IMP] project: add chatter in project sharing form view
Before this commit, the chatter is not available in form view of project
sharing even for portal user. Since the portal views, we have a chatter
for the portal users, we need a chatter for those users in project
sharing.

This commit integrates the portal chatter in the form view for only the
portal users.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) 36f5982e18 [IMP] project: remove the action contextual menu in project sharing
Before this commit, the user in the project sharing views can
Archive/Unarchive the record via the action menu. He can also click on
the share button in the action menu.

This commit removes the default action buttons defined in the action
menu for form and kanban views.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) 45c96edae7 [IMP] project: remove the longpolling for project sharing views
Before this commit, the longpolling is active in the project sharing
views but it is not necessary for these views, since the chat is
disabled and the goal of these views is to give access to external
users to `project.task` views.

This commit removes the files about the longpolling for the bundle used
for project sharing.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) e50bc12002 [IMP] project: add Project Sharing feature
Purpose:
=======

This commit adds the project sharing feature. This feature consists to
share the backend views about project.task to portal users.

About the access rights:
- The project manager can share a project with project sharing feature.
  To do this, he need to give access to portal users that we want their access in project sharing views.
  He can choose between 3 differents accesses:
    1. Readonly: the portal with this access right will only have read access to the project
        sharing views of the project shared.
    2. Comment: the portal with this access right will can use the chatter in task form view.
    3. Edit: the portal with this access right will can edit some fields of `project.task` model.

The difference between the classic backend views and the project sharing
views is in the project sharing views, we list the fields that the user
can read/write, so the portal users can see only the fields in
our list.
Moreover, the actions and the contextual menu (actions dropdown) are not
available in the project sharing views and the stat buttons are visible
but the click on these buttons are disabled.

Implementation details:
======================

This commit is realized in many steps:

- create the webclient and routes.
- create own qweb bundle.
- add project sharing views.
- use the session to define the action and active_id
- create public fields for project sharing: in this step, we lists all field
names of the `project.task` model that we want to display for the
portal user. Two lists are created, one for only readable field names
and the other one for the writable field names.
Moreover, two properties are defined in the `project.task` model to use the
both lists.
- use `access_token` and check model in project sharing route: in this
step we check if the model is `project.project` and the `access_token`
is the one set in the project since we have the id of the project in the
params url.
- allow only `GET` method to enter project_sharing routes: the
`/my/project/<int:project_id>/project_sharing` route must only be
called with a `GET` method because this route is only used to have the template
to render the project sharing webclient.

task-2379518

closes #73341
2021-08-26 14:59:32 +02:00
Thibault Libioulle 4968cc3444 [IMP] project,sale_timesheet: improve update views implememtation
This commit add various information in views, like name attribute, to
better handle extension.

It improves also the way the FormViewDialog is rendered in the project
right side panel, we no longer have to call willStart at each insertion
of the Form in the DOM since the form is rerendered automatically by
owl once the state changes.

Some click handlers now prevent propagation to ease the addition of
handlers for further needs.

task-2555323
2021-08-23 13:21:24 +00:00
William Braeckman 729e00da1e [FIX] project: prevent setting pane overflow
Previously if one of the text in the project's kanban view's setting
pane was too long, the setting pane would overflow and display a
horizontal scrollbar in order to fit everything.

Closes: odoo/odoo#74822

Task ID: 2618321

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-09 10:32:29 +00:00
William Braeckman d793ff5493 [FIX] project: prevent settings pane toggle from disappearing
Previously the settings pane toggle (on the project's kanban view) would
disappear when the cursor would not be hovering the kanban record.

Closes: odoo/odoo#74822

Task ID: 2618321
2021-08-09 10:32:22 +00:00
William Braeckman 7c23d3b247 [REF] project: refactor project_kanban.js
Replaces multiple .includes in favor of .extend for cleaner code.

Closes: odoo/odoo#74822

Task ID: 2618321
2021-08-09 10:31:35 +00:00
William Braeckman 296e3cc15f [FIX] project: fix project status bubble form display
This commit fixes the display of the status bubble inside of the status
button on the project form view. It wasn't visible since the recent css
changes.

Closes: odoo/odoo#74610

Task ID: 2615293

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-03 09:24:30 +00:00
Mathieu Duckerts-Antoine dd8bf39d2a [REF] web: legacy template name
We prepare the rewritting of the search components for the new weclient:
we rename some legacy templates to allow the new components to use the
natural template names.
2021-08-16 12:53:50 +00:00
Cedric Prieels (cpr) 6ed20e3489 [IMP] project: improve the UX of the app
Generic UX improvements for the project app.

task-2501760
See odoo/enterprise#18819

closes odoo/odoo#71232

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-07-23 06:45:50 +00:00
stefanorigano (SRI) 468b38472c [FIX] project: adjust project's control-panel status message design
Fix vertical alignment and style the message as a badge (clickable for
project managers).

task-2579123

closes odoo/odoo#73210

Related: odoo/enterprise#19437
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-23 06:54:18 +00:00
Xavier Morel 0e552b96da [FIX] *: convert tip contents to t-out
Requires markup every markup-using tip content as Markup. Would be a
nice occasion to migrate everything to a markup-safe markdown I think,
especially if we could migrate the translations so we don't lose them.
2021-07-20 05:40:55 +00:00
Xavier Morel 5e987137a2 [FIX] web, project: remove t-raw from kanban example description
Descriptions which need to use markup should be explicitly marked as
such. Update examples test to check that both Markup and String
descriptions work fine.

`escFormat` had to be modified quite a bit and ended up requiring
being its own Markup-adjacent type: if the `sprintf()` result is wrapped
in a `Markup`, then what happens is we first decide to escape because
the object returned by `escFormat` only has a `toString()`, then that
blows up because `toString` returns a non-primitive object and the
regex used to implement `_.escape` is very very unhappy.

`escFormat` could return a `Markup` object but then it wouldn't be
lazy anymore which would rather miss the point.

Therefore implement `[_.escapeMethod]` on the thing, such that it
doesn't get escaped, because it's safe (ish).

Also as a result the icons probably don't need to be markup-ed. Oh
well shouldn't really matter.
2021-07-20 05:40:55 +00:00
Cedric Prieels (cpr) 0ed38652a4 [IMP] project: improve globally the UX
The UX of the 4 main views (kanban, form, list, portal) of the project app has been globally improved.
In particular, different icons color/style were changed along with several strings, and the order of a few elements was revised to improve readability.

task-2508723
See odoo/enterprise#18387

closes odoo/odoo#71011

Related: odoo/upgrade#2506
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-28 12:58:25 +00:00
stefanorigano (SRI) f0ee615290 [FIX] project: scope '.badge' css rules
Prior to this commit these rules were affecting the entire view.

closes odoo-dev/odoo#949

Related: odoo-dev/enterprise#176
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-18 21:31:33 +02:00
Aaron Bohy 84a4859570 [REF] web,*: move legacy files
To prepare the rewriting of the webclient in owl, we move all
current js files of web in a legacy/ folder. This folder will
eventually be removed, as soon as each file it contains will be
converted to owl and moved to the proper place in the new file
structure.
2021-06-18 21:31:27 +02:00
Thibault Libioulle e48be257e1 [IMP] project: add rightpanel in project update view
This commit adds a right panel in the project update view.

This is done by extending each View and Controller by mixins handling
the RightPanel functionnality.
In the RightPanelControllerMixin, we use the component Adapter to launch
the Owl RightPanel Component from a Legacy Controller.
This solution is based on SearchPanel and ControlPanel implementation.
In the RendererMixin we handle some styling just as it's done for the
SearchPanel.
In the ViewMixin, we add the handling of a RightSidePanel config
parameter which is passed to the Controller via params.

The Project RightPanel Component gets information about the active
project in the context through a rpc call and render the resulting data
in a owl template. This template doen't have the ambition to be generic
but only specific to this view.

Serverside, the data are collected in a dict through few methods in
order to be easily extended.

Mixins are used in kanban and list views, each time a project update
view is added, the developper will have to extend the dedicated View,
Renderer and Controller.

PR: #68899

task-2393768
2021-06-01 12:03:55 +02:00
Thibault Libioulle c92673c10e [IMP] project: add control panel button for project updates
This commit aims to add a button in the control panel to easily display
the current project update status.

This is done by extending ControlPanel Component and template.

We must add a context value `show_project_update` to enable the
button in the breadcrumb and it's done only once; e.g. when we click to
see all project tasks of an active project.

The button redirects to a kanban list view of the project_updates.

The activity rng is modified in order to accept js_class definition.

Following commits will add behaviour to handle those updates and
milestones in the various views. See PR for further information.

PR : #68899

task-2393768
2021-06-01 12:02:57 +02:00
Thibault Libioulle c5cac92280 [IMP] project: add project updates and milestones
This commit adds project updates in project to take in stock the current
status of the project : which task or milestone changed in the past 30
days.

The project manager is able to add a status on the project update, and
edit the description of the update. There is also a chatter in which
he/she can discuss some points with other project users.

The description is build with informations retrieved from mail tracking
values or from project.* models. Those informations are collected in a
dict and rendered in a template to ease the inheritence in further
modules needs.

Following commits will add behaviour to handle those updates and
milestones in the various views. See PR for further information.

PR : #68899

task-2393768
2021-06-01 12:01:37 +02:00