Commit Graph
845 Commits
Author SHA1 Message Date
Victor Piryns (pivi) 36cd3ec68c [PERF] project,*: download smaller avatars in portal view
Description:
Portal routes `/my/tickets` or `/my/tasks` were reported slow to
load with many items.

Analysis:
The avatars that are loaded are of too large sizes (encoded in base64)
compared to their rendering size. `img.o_avatar` limits the
dimensions to `1.7145em` (roughly `27px` on desktop), so it's
useless to load `avatar_1024` for those image sources. This has a
significant impact when the user has a slow connection, the server
is hosted far away from the user, or the images used are of badly
compressed (so each images takes a quite a few MiB).

Fix:
Scan for all instances of the usage of `avatar_1024` on an `<img>`
with the class `o_avatar` and reduce it to `avatar_128`.

Reference:
opw-3470171

closes odoo/odoo#142103

Related: odoo/enterprise#50678
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-16 11:44:55 +00:00
Ritika Rathore b34c04a7c1 [FIX] project: fix hover on the assignees of a task portal
Steps:
- Install Project & Website
- Go to Website Module
- Click on Tasks
- Now on hover multiple assignees

Issue:
- On the hover of the mouse, this problem appears when we are viewing multiple assignees .

Cause:
- There is list in which we mapped assignees & reading from the 1st index.

Fix:
- List execute from 0th index in assignees list.

Task-3495253

closes odoo/odoo#141430

X-original-commit: 61ac7a392eca48b978c9aeb8575c3509607366b1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-10 10:18:10 +00:00
Xavier Bol (xbo) 349915dfc3 [FIX] project: hide name field in project list view
The name field has been to be able to order on it but it is added
and just invisible instead of completely hide the column.

This commit changes `invisible` attribute to `column_invisible` to
completely hide that field in the project list view.

closes odoo/odoo#141455

X-original-commit: 62f49331ba
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-08 04:09:50 +00:00
Ritika Rathore d5b40f0007 [FIX] hr_timesheet,project: fix visibility of fields in portal
Steps:
- Install project, timesheet & website
- Open project module
- Select any task
- Set Allocated Hours
- Go to the task corresponding project & disable the timesheet
- Then appear in portal form view

Issue:
- In portal form view of project's task the 'allocated time' and the 'progress' fields shouldn't be visible if the 'timesheets' feature is disabled on the project.

Cause:
- There is no any condition for allocated time  and progress field.

Fix:
- Added condition for both field in hr_timesheet & project respectively.

Task-3495253

closes odoo/odoo#141357

X-original-commit: 58040fed8b075b40cf6d2be73de53b600bf9f94d
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-07 08:01:01 +00:00
Pierre-Yves Dufays 9ce9d69788 [IMP] project: allow to create project plan directly from project module
The new plan form view in project module now allows to choose between project
and task as target model.

Task-3558929

Part-of: odoo/odoo#138998
2023-11-06 15:36:45 +00:00
MerlinGuillaume 62f49331ba [FIX] project: add name field in project list view for order
When we add a many2many field related to Project, an error is thrown
when we add 2 or more projects

Steps to reproduce:
1. Install CRM, Project and Studio
2. Go to CRM and open any quotation
3. Trigger Studio
4. Add a many2many field related to the Project model
5. Close Studio
6. On the CRM form, click on Add a line and select 2 projects, the 2
   projects must have the same sequence (new projects will have a
   sequence of 10)
7. An error is thrown

Problem:
The "name" field used in the order of the list view for project was not
present in the view so there was an error when trying to sort the list
by this field

opw-3526101

closes odoo/odoo#140950

X-original-commit: 334e6fc41725fe0bd7e6bae8e2153c6abedc71cf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-11-04 06:43:14 +00:00
Elisabeth Dickinson 89082fbd56 [IMP] web, *: fix favorite alignment
*: account, hr_recruitment, project, lunch, mrp

By removing the absolute positioning on ".o_favorite" inside kanban
views, we allow it to align naturally with the rest of the elements,
thus removing the custom code that was needed for padding.

By doing so however the icon - which is now only visible on hovering the
card in the Project's kanban view - should remain visible at all times.
The behaviour would be the same as in other kanban views: an outlined
star when not active and a full yellow star when it is.

The margin on the kanban heading in the Manufacturing orders has been
removed to realign the top elements.

task-3462098

closes odoo/odoo#131559

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-11-02 12:03:40 +00:00
Hugo Carlier (Huca) 2236e5c97c [REF] project, project_todo: refactor personal stages
Personal stages of project.stage records are based on two main field:
- personal_stage_type_ids: the list of all personal stages linked to a
  task (M2M)
- personal_stage_type_id: a computed field (not stored) indicating the
  personal stage of a task for the current user.

When reading a set of project.task records grouped by personal stages,
two options are possible:
- Group the records by personal_stage_type_id (approach used in former
app Notes): in which case the read_group method has to ne rewritten as
it can be used on a non-stored field.
- Group the records by personal_stage_type_ids (approach used in app
Project) in which case, the kanban view has to be overriden to be able
to drag and drop a task between personal stages (which is not possible
by default, when grouping according to a M2M field).

The main evolution proposed by this refactor is to use an hybrid
approach that would:
1. Group the project.task records by personal_stage_type_id
2. Use the read_group with groupby set to 'personal_stage_type_ids' as
this should give the same result.

This would allow to:
- Avoid a complex and costly (performance wise) read_group override
- Avoid an override of the kanban view that is costly to maintain
- Simplify the implementation (and thus readability) of personal stage
management (among which, removal of the model
project.task.stage.personal).

task-3345132

Part-of: odoo/odoo#140050
2023-10-27 14:22:12 +00:00
Maryam Kia 9c8d39d1a8 [IMP] account, helpdesk,...: same title for all portal chatters
By this commit, all portal chatters have a same title as `Communication history`

closes odoo/odoo#139735

Related: odoo/enterprise#49566
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-27 13:02:10 +00:00
williamandh4818 dc696c8ed4 [IMP] analytic: allow cross analytics
Purpose
=======

Make it possible to compare analytic values between plans by inputting
up to one account per plan on each line.
For instance, if we have 2 plans: "Country" and "Product Type", with the
following accounts

| Country | Product Type |
| ------- | ------------ |
| BE      | Drinks       |
| LU      | Food         |

And the following invoices:
* 1000€ of drinks in Belgium
* 2000€ of food in Belgium
* 3000€ of food in Luxemburg

We want to be able to display the following pivot tables:

|     | Drinks | Food | Total |
| --- | ------ | ---- | ----- |
| BE  |   1000 | 2000 |  3000 |
| LU  |      0 | 3000 |  3000 |
| Tot |   1000 | 5000 |  6000 |

|        | Total |
| ------ | ----- |
| Food   |  5000 |
| * BE   |  2000 |
| * LU   |  3000 |
| Drinks |  1000 |
| * BE   |  1000 |
| Total  |  6000 |

Implementation
==============

* `ir.fields` are added/removed dynamically on `account.analytic.line`
* Each analytic plan corresponds to one field on `account.analytic.line`
* The fields are added dynamically in the views.
* `account.analytic.plan` doesn't have a `company_id` field anymore,
  meaning that all the companies have access to all the plans. This
  means that the applicability fields and lines are now company
  dependent, and those can be used to know which fields/plans to display
  for which company.
* There can no longer be one "Project" plan per company, even if the
  accounts of that project can still be owned by only one company.
* There is now only one method to get the default (or "Project" plan),
  which is `_get_plan_columns`

task-3497653

closes odoo/odoo#139225

Related: odoo/upgrade#5306
Related: odoo/enterprise#49226
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: william <wan@odoo.com>
Co-authored-by: h4818 <ayh@odoo.com>
2023-10-25 18:10:57 +00:00
Chrysanthe (chgo) df8535fbd4 [REF] portal, *: portal redesign
*: base, account, account_payment, auth_top_portal, hr_timesheet, loyalty,
   mrp_subcontracting, payment, project, purchase, sale, sale_stock,
   sale_timesheet, website_crm_partner_assign, website_sale,
   website_slides

Portal general redesign. Increase visual consistencies with the backend
[1] and adapt to the new default website design [2].

[1] https://github.com/odoo/odoo/pull/116641
[2] https://github.com/odoo/odoo/pull/120302

task-3046004

Part-of: odoo/odoo#138077
2023-10-25 15:50:36 +00:00
Thibault Delavallée c68ddce1b9 [IMP] various: update alias management in views
PURPOSE

Allow alias domains to be multiple, notably to be used in a multi company
environment where each company has its own alias domain.

SPECIFICATIONS

Update fields used in form views. Use 'alias_domain_id' instead of domain
that is now simply a related on 'alias_domain_id.name'. To ease UI we add
a placeholder on this field as it is now writable e.g. in multi domains
environment. Avoid unwanted configuration change by making it generally
no_open / no_create_edit.

In project, remove an unnecessary field adding complexity for few real use
case now that aliases are more open to configuration.

Task-36879 (Mail: Support Multi Domains Aliases)

Part-of: odoo/odoo#76734
2023-10-24 19:24:50 +00:00
Adrien Dieudonne a2016359d0 [REF] web, *: avoid extend on h5 for kanban card title
´extends´ generates a lot of css rules.

So in this commit, we remove it by replacing it by the ´h5´ html tag.

closes odoo/odoo#139484

Related: odoo/enterprise#49408
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-10-24 13:55:30 +00:00
Adrien Schoffeniels 31af631607 [IMP] *: add properties fields to various models
Purpose:
--------
This commit adds properties (and related properties definitions) on the
following models:
- hr.employee (hr.department)
- hr_recruitment.hr_applicant (hr_recruitment.hr_job)
- product.product (product.category)
- stock.picking (stock.picking_type)

These have been added to the related form, kanban and calendar views when
applicable.

Properties have also been added to kanban and calendar views of
- crm.lead
- event.event
- project.task
(Properties had already been added on these models and form views)

Task-3458627

Part-of: odoo/odoo#132578
2023-10-20 11:21:56 +00:00
Adrien Schoffeniels b8b450544c [IMP] web: remove hideKanbanOption from properties field
Purpose:
--------
This commit removes the "hideKanbanOption" from the properties field.
This option allowed to prevent users to make properties visible on cards
(kanban cards and calendar popovers).
The rationale being that there is no reason to prevent users of adding
properties on cards now that they have been redesigned (see commit [1]).

Task-3458627

[1]: https://github.com/odoo/odoo/commit/25e8fbe0a1327c289df826cf6eb7882098a4c325

Part-of: odoo/odoo#132578
2023-10-20 11:21:56 +00:00
Pierre-Yves Dufays 725e7ffae3 [IMP] various: improve custom activity views
The following summary view of the record in the activity views have been
improved:
- project_task: task state added
- project_project: project manager added
- event_event: responsible and the dates (date_begin_located and
date_end_located) added
- account_move: total amount, customer and state added
- sale_order: total amount and the state added
- purchase_order: total amount and the state added
- crm_lead: customer and stage added
- hr_applicant (hr_recruitment): recruiter added
- survey_survey: responsible added
- maintenance.request: added equipment and responsible
- stock.picking: added scheduled_date
- repair.order: responsible, schedule_date and product_id added
- mrp.production: added responsible
- hr_leave (hr_holidays): status is added and default deadline modified see
below

Ensures that "Schedule activity" is in one line by adding a colspan.

hr_leave activity: When a time off approval activity is created as a
consequence of the creation of a hr.leave, the deadline of the activity is set
to the date_from of the hr.leave minus activity type delay_count (default 15)
except if it leads to a date anterior to today. In that case it is set to
today. That way, in the activity view, the time off approval activities are
more or less sorted by related hr.leave date_from and the cell date is an
indication of when the time off is planned.

Technical note: on most activity view, the activity record was not occupying
all the horizontal space. To solve that problem the css has been modified and
the max-width (200) that was imposed on the sub div has been removed. And as
it was impossible to impose a max-width for a flex div (which is the common
case for the activity record), the max width is imposed on each text that might
be too long using the class o_text_block. That class has been modified to
impose a max-width. That's why that class has been added in most view.
Alternativly, we could have modified the activity compiler to add that class
when the attribute full was set (not done because not sure of the consequence).

Task-3300854

Part-of: odoo/odoo#138135
2023-10-19 19:08:12 +00:00
Aman Patel d382b20135 [IMP] project: disable /image for portal user
Steps:
- Install project.
- Create a project and it's task.
- Share this project to portal user with editable rights.
- Open that project from portal user.
- In task description, using `/image`, add one image.

Issue:
- There comes an Access error:
 Sorry, you are not allowed to access this document.

Solution:
We are passing `'allowCommandImage': false, 'allowCommandVideo': false,
'allowCommandFile': false}` so that portal user can't have the /image and
related options.

task-3463461

closes odoo/odoo#136799

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-16 07:58:40 +00:00
Himanshu Rohit 157c8b6493 [IMP] project: improve ux for project
The purpose of this commit is to do generic improvements to the project.

In Commit, made the following changes:

   - replace the rating % by the value out of 5 in the project kanban card.
   - replace the rating % by the value out of 5 and satisfaction by average rating in the
     project update right-side panel.
   - add the placeholder in project stages and project task type.

task-2962386

closes odoo/odoo#99474

Co-author-by: Manisha Tulsiyani <matu@odoo.com>
Related: odoo/enterprise#31013
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-13 21:11:45 +00:00
Pierre-Yves Dufays 35d5342887 [IMP] {test_}mail, various: generalize activity plan + activity batch schedule
Generalize the hr.employee activity plan to any model, allowing to create
activity plan that can be launched on any model.

The activity can now be created in batch by selecting multiple record in the
list view and then clicking on a "clock" icon in a row similarly to the batch
records update (selecting multiple records allows to change for example their
name in batch in the list view). We implement also that functionality for the
plan, allowing to launch a plan on multiple records at once.

We also centralize the launching of activity or activity plan through either
the  "Activities" button in the chatter or the "clock" button in the view list.

Scheduling activity is now taken in charge by a wizard that can schedule a
single activity as well as a plan. We add/update tests for checking that the
wizard is launched with the right record selection (on a single record or a
batch) and add tests for checking the wizard itself.

The plan can be defined through an added menu in the technical admin menu but
also through configuration menu added in the module crm, project.

Technical notes:
In the added wizard, to determine that there is a error, we introduce the
has_error field because we cannot use easily the error field for that. Indeed,
to determine that there is no error, we have to compare it to "<p><br></p>"
(more precisely &lt;p&gt;&lt;br&gt;&lt;/p&gt;) which is not handy and may
change in the future. This is because when we write False on field error and
read it after, we get "<p><br></p>". Instead, we centralize this weird
comparison in the model in the compute method of has_error.

The ActivityListPopover still displays the activity of the record on which it
has been triggered but the button to schedule activity will launch a wizard
that create activities in batch for the selected records if more than one was
selected. For that, the ActivityListPopover component receives now an
additional prop: resIds (selected records) on top of the resId prop (record on
which the popup has been triggered). Note that when the line that trigger the
popup is not selected, the batch mode is disabled to avoid confusion.

Test are updated because the wizard is opened instead of the activity form to
schedule a new activity and as the form view is only used to edit already
existing activities, default_res_id and default_res_model are no longer passed.

We defines date_deadline and date_plan_deadline in the schedule wizard because
those date are managed differently (default value, required or not, ...).

Task-3390865

Part-of: odoo/odoo#137969
2023-10-12 16:12:09 +00:00
Michael (mcm) 7ebd785764 [IMP] *: rename quick_add into quick_create
This commit renames calendar's attribute quick_add to quick_create
to be more consistent with other views.

closes odoo/odoo#138042

Related: odoo/enterprise#48677
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-11 17:02:07 +00:00
Adrien Schoffeniels 2d7a49dab1 [IMP] web: move properties field's "add a property" btn in the cog menu
Purpose:
--------
When the property field is added into a form view, the "add a property"
button is shown by default.
However, most of the time the users won't add properties when opening a
form view, making this button take up space for nothing.

To alleviate this issue, commit [1] added an option that allows to hide
this button, and added actions to allow adding properties from the cog
menu instead.

Now that properties are being added into several views, one would like
this "add properties" button to be hidden by default, and show an entry
in the cogmenu allowing add properties by default, without needing to
create an action for every view using a property field.
Therefore, a new static action "Add Properties" has been added in the form
controller that is available if a properties field has been encountered
during the parsing of the form view's arch.

The "hideAddButton" has been changed into "showAddButton" and now allows
to show the "Add a Property" by default.

Task-3458627

[1]: https://github.com/odoo/odoo/commit/1f80810e39f811122a65e11cd8cac99aa39a7960

Part-of: odoo/odoo#137589
2023-10-11 17:02:02 +00:00
kais-odoo ed268f81f4 [IMP] mail,portal,project: add preview to portal link
Before this commit, when the user shares a portal link, the receiver
has to click on the link to understand what it is about.

This commit uses new key called `preview_object` inside
`portal.frontend_layout` template.
When it is defined, it will add some useful information for the
preview link.
This commit also defines `preview_object` in portal view of project
and task to be able to have the preview link to prevent the user
from having to click on the link to understand what it is about.

task-3186692

closes odoo/odoo#113622

Related: odoo/enterprise#37514
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-10 11:07:44 +00:00
Prakash Prajapati 506e779261 [FIX] project: hide empty stages when user perform subtask action
Step:
  - Install project app
  - Activated  Task Dependencies
  - Create project and task
  - Add sub-task
  - Click sub-task action

issue:
    In the commit below we have passed the default_project reference so we get the
   current project stage.
Fix:
   we pass 'subtask_action' context to subtask action and we checked that context
   in _read_group_stage_ids method if subtask_action context is found then we will not
   fetch project's stages.

Side effect of this commit-https://github.com/odoo/odoo/commit/23cf9318084c8a00f37ffcefefa3e056583d2d77

task-3390279

closes odoo/odoo#138024

X-original-commit: 82c29c03cbaa351600b782082554378b4a320b73
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-10 08:19:34 +00:00
Aaron Bohy daf05d48ac [IMP] *: views: deprecate active_* keys from evalContext
This commit aims to simplify the evaluation context used to
evaluate expressions used in views (invisible, required, readonly,
domain and context attributes). For now, the evaluation context is
typically the current record (there's a key for each field in the
view). In addition to that, there're static keys (that may conflict
with field names): uid, allowed_company_ids, current_company_id,
active_id, active_ids and active_model.

The motivation of this commit is at some point to get rid of the
3 active_* keys, because they are misleading and basically useless.

The notion of active_* exists, but it is something else: when you
are in a form view (let's say the form of a partner) and you open
its opportunities (by clicking on the stat button), the list view
of opportunies shows up and in the context, there're 3 keys
active_*, referring to the record from which we came. One can
easily access those information with context.get("active_*"), in
python or in view archs.

However, almost all `active_id` found in archs were actually used
to refer to the id of the current record. Indeed, for now, in the
evaluation context of a record, the value of the `active_id` key is
always the id of the record. So this commit adapts them to
directly use `id` instead. There was no use of active_ids, and
a single use of active_model which was removed (active_model is
the res_model of the view, so it isn't really necessary).

This commit doesn't drop the support of those keys, it deprecates
them. They will be removed for v18. A warning will be displayed if
they are used.

closes odoo/odoo#136665

Related: odoo/enterprise#47917
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-10-10 00:54:04 +00:00
Abderraouf Ghrissi (abgh) 56073896a6 [IMP] project: merge date_deadline and planned_date_end
Before this commit:
- The existing of two dates behaving as and end date for project_task
(date_deadline and planned_date_end) is confusing.

In this commit:
- The main goal is to simplify the interface by having one field/widget
that acts as both the deadline and the end date, instead of having two separate fields.
So we removed planned_date_end (changes can be seen in the enterprise related pr (link at
the end) and changed the date_deadline type from date to datetime in project_task and
report_project_task_user

Related PRs:
Enterprise: odoo/enterprise#40866

task-3084978

closes odoo/odoo#120953

Related: odoo/upgrade#4654
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-06 08:25:14 +00:00
Gurupreet Singh 81567bcf6a [FIX] project: set the default color in the project app
Description of the issue/feature this PR addresses:

-In the project module when the calendar view of a task is open click on any
  schedule, and popover is open.
-In popover tags colors are not visible

Current behavior before PR:
In the popover, tag field colors are not visible

Desired behavior after PR is merged:
tags colors are visible when opening the popover

Fix:
  we add options attribute in the many2many_tags widget.

task-3269548

closes odoo/odoo#136910

X-original-commit: 64cbac9b3d4c686368195a44a45566c9278376b4
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-28 13:21:02 +00:00
Audric Onockx (auon) 0baaa4b654 [IMP] project,hr_timesheet: improve project update
Add a new column, after tasks that shows the following information :

Tasks: Total done tasks /  Total tasks (ratio in percentage)
Timesheet: Hours spent/ allocated hours (ratio in percentage) 
\> visibility: only show if the timesheet setting is activated.

Right side panel  :

Add the Done icon before Tasks 
Add hours spent/allocated hours information under the Timesheet
Extra time: Add a new stat button that shows
the overall extra time used for the project. 
visible if hours spent > allocated hours.
By clicking on this it will redirect to the same view
as we have for the timesheet stat button.

task-3432102

closes odoo/odoo#129177

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-28 07:50:02 +00:00
Manushi Shah (mash) 2257c295e1 [FIX] project: display title instead of empty block
Steps:
- Open Website > My Account > Projects
- Open the project in which the customer is not set
- Now perform 'group by customer' on that project.

Issue:
- A blank line is shown below the header line.

Cause:
- No condition is applied to it when we do not have a customer set.

Fix:
- Adding condition to display 'No Customer' instead of an empty block.

closes odoo/odoo#136734

Task: 3461563
X-original-commit: 0649a1d12ef9ecd5ff680679eb2c6151287cc22e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-28 03:19:12 +00:00
Yash Vaishnav 811d48d5de [FIX] project: fix burger menu layout of the project kanban view
Steps to Reproduce:

1) install the project module
2) give a user access to the Marc Demo and log in with the Marc demo
3) through the Kanban view of the project open burger menu
4) You can see that the view section is not styled properly and adding a
scrollbar to the view

Cause:
View section is assigned the 'row' bootstrap class, which causes a scrollbar to
appear.

Fix:
To eliminate the scrollbar, the 'row' class should be removed from the Kanban
View section.

task-3282942

closes odoo/odoo#136706

X-original-commit: 1ac61703bcb71c4a43de6d561e0d1da682e4eb1f
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-28 03:19:05 +00:00
Audric Onockx (auon) 527dda8ada [IMP] project: make partner non-clickable in task tree view
task-3514409

closes odoo/odoo#136001

Related: odoo/enterprise#47652
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-27 09:11:42 +00:00
Bastien PIERRE 38460e3039 [FIX] project: Fix portal view conditional assets tests
The iframe doesn't need assets tests because they are loaded outside of the iframe.
The tour didn't crash because the content of the iframe was present (below the traceback message)

closes odoo/odoo#135492

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-09-25 13:09:02 +00:00
dise 95e31691a7 [IMP] project: add company specific stages
Adding a company_id field in project.project.stage will allow companies
to have their own individual stages, which was not possible before since
all the stages were shared between all companies.

task-3330285

closes odoo/odoo#122597

Signed-off-by: Vincent Larcin (vila) <vila@odoo.com>
2023-09-20 13:03:03 +00:00
std-odoo 2943106d87 [IMP] project, crm: group by properties
Purpose
=======
Allow to group records per properties.

Task-3032464

Part-of: odoo/odoo#103510
2023-09-08 09:46:56 +00:00
luve-odoo 66a9262009 [IMP] project: sub-tasks/task convertion action
Before this commit, the conversion from a subtask to a standalone task
or the opposite was possible in debug mode. In order to provide for
users a way to convert task to subtask or the opposite without polluting
the interface, a action is added. Also, when the user clicks on search
more on a many2one field pointing on `project.task`, if the active_model
and the active_id are defined then if we will try to load the last
update status by using `active_id` even if `active_model` is not the
`project.project` model.

This commit adds a action that opens a form dialog. The user
can choose to put a parent task or not. If not, the task becomes a
standalone task. Otherwise, the selected parent task becomes the parent.
This commit adds also an additional check before loading and displaying
the last update status of the project active to be sure the `active_id`
is the id of a project, that is, `active_model` has to be equal to
`project.project` to be able to load the last project update status.

Moreover, a UI change in the stat button showing the number of subtask
is modified in order to display also the number of closed sub tasks.

task-3251617

closes odoo/odoo#120911

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-06 14:42:13 +00:00
Vincent Larcin 71705e4ea3 [IMP] project: add date_last_stage_update to task list view
This commit adds the "Last Stage Update" field to the task list view

Task-3455177

closes odoo/odoo#130880

Signed-off-by: Vincent Larcin (vila) <vila@odoo.com>
2023-09-05 18:44:23 +00:00
mano-odoo 0cc569004d [FIX] web: o_quick_assign same color as the clock
As the Activity button (clock icon) is the same kind of action
it make sense to apply the text-muted on the quick assign.

To make the hover clearer we apply a text-dark on hover using the
btn-link + contextual classes function. We apply the same to the
`subtask_list_button` and milestones for consistency.

task-3382159

closes odoo/odoo#134196

X-original-commit: 4b8b6e2155eca66652b4a57dfff27b0e81d62573
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-09-05 07:19:47 +00:00
Dhrumil Shah caa9a235a2 [FIX] project: fix group user access right
Before this commit when we login as a user having project rights and open the
form view then 'project status' stat button isn't clickable. So in this commit
we have fixed that issue by giving group project user groups to stat button .

task-3432384

closes odoo/odoo#133927

X-original-commit: 0672824fb21e0a15dc951c46e317cb8cfc162ef2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Dhrumil Shah (dhrs) <dhrs@odoo.com>
2023-09-04 05:49:51 +00:00
Pierre Rousseau 234a5e6245 [IMP] account, project: open form view from editable list view
This commit uses the new options of the editable list view to open a
form view when clicking on a line.

Task-id 3063425

Part-of: odoo/odoo#116989
2023-08-29 11:10:42 +00:00
Bastien (bvdn) 1e181b6dd0 [IMP] project: add new controller for project model calendar view
Needed a new view just to be able to change the default display text in the calendar

Task-3251698

closes odoo/odoo#126358

Related: odoo/enterprise#41304
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-29 09:11:52 +00:00
Kamlesh Pathekar 74aad3e19c [IMP] project: display project color in calendar
In this commit, we have implemented the functionality to show the color
of the project in the left side panel of the calendar and calendar entries.

task-3251766

closes odoo/odoo#130700

Related: odoo/enterprise#41569
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-28 23:13:53 +00:00
Kartik Chavda a844f37aac [IMP] hr_timesheet,project: refactor 'planned_hours' field
Before this commit 'project.task' model 'planned_hours' field
is inconsistent to the 'allocated_hours' field.

After this commit rename the 'planned_hours' to 'allocated_hours'
and related string change to 'Allocated Time'.

task-3231680

closes odoo/odoo#120405

Related: odoo/upgrade#4617
Related: odoo/enterprise#40643
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-24 18:36:33 +02:00
Samuel Degueldre 6f95be6884 [REF] *: remove web.assets_common
*: auth_password_policy, bus, event, im_livechat, mail, mass_mailing,
mrp_subcontracting, point_of_sale, pos_self_order, project, stock,
survey, web, web_editor, web_tour, website, website_event,
website_forum, website_sale, website_slides, base

Historically, the web.assets_common bundle was used to contain assets
that were needed by both the frontend and the backend. In practice, this
caused a bunch of issues where people would add things in assets common
that were not needed by both, and it was also abused as a way to get
bootstrap working in unrelated places by only using that bundle's css.

Because of this, as a first step, the assets_common stop being used in
the frontend, but was left everywhere else.

This commit removes the bundle completely, and moves the files that used
to be in that bundle in the other bundles that need them, this will
allow those bundles to evolve independently going forward.

in im_livechat and mail, some of the unneeded legacy code was removed, this
allows us to avoind including all of the legacy code from web in the
livechat embed bundle and in the dicuss public bundle respectively.

closes odoo/odoo#132190

Related: odoo/enterprise#45884
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-24 15:11:05 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Gorash 1e12f68a1d [REF] base,all: Update modifier syntax: prepare view migration
These changes are made as a result of simplifying attrs and 'states' in
views.

Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.

Part-of: odoo/odoo#104741
2023-08-18 09:49:12 +02:00
Pratik Awasthi 496c0a275a [IMP] project: improve the list view by adding personal stage
This will improve the following generic UX

-  rename 'personal user stage' into 'personal stage' for private task
- added the 'personal stage' field to the right of the stage optional=hide
- earlier gantt view open with the user now it will open with groupby  project
- removed groupby stage in pivot view
- rename 'undefined' into 'private' for graph view of private task

task-3251648

closes odoo/odoo#120094

Related: odoo/upgrade#4607
Related: odoo/enterprise#40515
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-17 19:50:59 +02:00
adjo-odoo 1ebc6c0044 [IMP] project(_sms),rating,hr_timesheet: improve the UI for project
The purpose of this PR is to improve the generic usage of the project app.

So in this PR done following changes:
 - In reporting > tasks analysis measures:
   - removed the # of tasks and average rating measures
   - Changed rating value (/5) to rating (/5)
 - In task analysis reporting formatted overtime as hh: mm
 - In the project  burndown chart added tip to action helper
 - In project.task search view > quick searches:
   - changed sale order to sales order
   - under the SO one, a 'sales order item' has been added to the quick search
 - Added many2one_avatar_employee widget in project sharing-> timesheets notebook
 - In project.project form view > share editable added text in muted
 - Added tip in the project.project form view > invoicing notebook under
   employee/SOL o2m
 - A placeholder has been added to the rating email template field in the project
   task stages: 'Task: Rating Request'
 - now rating submission page is editable
 - In task stages list view :
   - moved the project field on the right of the name
    - switched the 'SMS template' and 'email template' fields from the place
 - In project.task > recurrence notebook:
   - moved the 'next tasks' list to the right of the recurrence
      configuration fields
 - In project.task > sub-tasks notebook > optional fields >
   renamed 'initially planned hours' into 'allocated hours'
 - In project.task portal form view: renamed
   'history' into 'Message and communication history'
 - Added 'open' filter in my tasks menu search view
 - Added 'schedule an activity' status in the kanban activity widget

task-2903637

closes odoo/odoo#95971

Related: odoo/enterprise#29467
Related: odoo/upgrade#4095
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-16 16:04:09 +02:00
Thibault Delavallée 638e0f658d [REF] mail, various: cleanup alias usage
Cleanup alias usage and definition. Prepare code to ease future changes and
improvements. Notably

  * add a 'alias_email' computed field on the mixin allowing to have the
    complete alias email when set, and False in case it is inactive or linked
    to an inactive alias domain;
  * remove unnecessary alias_id field definition when just the help differs
    from the standard definition coming from the 'mail.alias.mixin';
  * use fields coming from 'inherits' instead of using alias_id and its sub-
    fields; notably use 'alias_display_name' and 'alias_email' fields;
  * remove useless custom code and management;
  * improve alias parameters support code in configuration parameters;

Task-3453343 (Mail: Cleanup Alias Usage)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130632
2023-08-09 17:04:26 +02:00
Xavier Bol (xbo) 9045c52c7a [FIX] project: use directly the daterange picker in planned dates
Before this commit, when the user defines a planned date for a project
in the form view, he has to click on `Add end date` button to be able
to select the start and end dates directly in the date picker.

This commit allows to directly select the both dates in the date picker
instead of having the planned date end optional in the form and list
views of project.

X-original-commit: e4f11e7a694c26e23ecf1437f3a98b2d3dd3bd7d
Part-of: odoo/odoo#130651
2023-08-03 19:31:48 +02:00
Hugo Carlier (Huca) ebfb7112c5 [IMP] project: modify the behavior of parent tasks deletion
Before this commit, when deleting a task with subtasks, only the parent
task was deleted. As child tasks are the required to have the same
project_id as their parent, they could end up views of another project
with no clear link to it. Generally speaking, keeping child task, when
their container (parent task) is removed does not make sense.

Therefore, this commit changes the default behavior for task
deletion. When a parent task is removed, all its child tasks are removed
as well. To avoid such a behavior in exceptional situation where child
task can make sense without their parents, the user first need to remove
this link before unlinking the parent task.

A warning is added in all the views where a task can be deleted (form,
calendar and list) to warn the user of this new behavior when he deletes
a task.

task-3044991

closes odoo/odoo#121260

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-02 15:59:20 +02:00
Damien Bouvy 5662aa7c7f [FIX] project: contrast issue in milestone stat button
X-original-commit: 17cde615a6e632bca59c3606028fe7bd84832599
Part-of: odoo/odoo#129679
2023-07-26 09:22:23 +02:00