Commit Graph
142 Commits
Author SHA1 Message Date
Yannick Tivisse 7ebafb1eb7 [IMP] base: Remove manager rights to user demo
closes odoo/odoo#139731

Related: odoo/enterprise#49562
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-25 20:56:11 +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
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 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
Thibault Delavallée e147d35590 [REF] mail: rename 'field' to 'field_id' on tracking value
PURPOSE

Simplify 'mail.tracking.value' model and code. Remove unnecessary fields and
computation. Make code easier to handle and more batch-enabled.

SPECIFICATIONS

Rename 'field' to 'field_id' on tracking model. It better indicates it is a
many2one and not a char field holding a field name for example.

Task-3345979 (Mail: Simplify tracking model)

Part-of: odoo/odoo#124182
2023-10-06 06:13:55 +00:00
Thibault Delavallée 6aa0a25df7 [REF] mail: remove 'field_{desc/type}' from tracking value
PURPOSE

Simplify 'mail.tracking.value' model and code. Remove unnecessary fields and
computation. Make code easier to handle and more batch-enabled.

SPECIFICATIONS

Remove 'field_desc' and 'field_type' from 'mail.tracking.value' model. Those
can be retrieved when necessary, as it is mainly used for frontend display
in Chatter.

Task-3345979 (Mail: Simplify tracking model)

Part-of: odoo/odoo#124182
2023-10-06 06:13:55 +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
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
Prakash Prajapati 6be8aeb376 [FIX] project: set correct company in project
steps:
   - install account module
   - Create company Odoo IN
   - Got to account > Configuration > analytic Plan
   - Open Project and set company as Odoo IN
   - install project module

issue-
   Analytical plan and project both have different company so traceback come up.
Fix:
   We have set company of analytic plan in project company.

task-3138082

closes odoo/odoo#130318

X-original-commit: d6171eb1c0e94cb1a22241dd250bc23247de3481
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-02 05:10:41 +02:00
damr 16a07ed1bf [IMP] project: make the field company_id of projects non required
This commit's purpose is to allow the user to set the company_id of a project to False, meaning the project is no longer restricted for the user who does not have access to the company of the project. This change induces a lot of other small behavior changes/approximation. Since some fields (currency_id, resource_calendar_id, etc) were company dependent, we had to updates some use cases.

task-3084819

closes odoo/odoo#122144

Related: odoo/enterprise#41363
Related: odoo/upgrade#4947
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-19 23:17:53 +02:00
Yash Vaishnav 917d71b9b4 [IMP] project,sale_timesheet: fix task created message notification date
Issue: In the project task's chatter message, the demo data was used to
create messages such as comments and stage changes, which included a specified
date but 'Task Created' message has current date instead of its creation date.

Cause: The notification for 'Task created' includes the current date because
it was not generated by demo data. This has led to a conflict with the dates of
other messages that were generated using the demo.

Fix: The 'write' method is called on all 'Task Created' messages,
resetting their data to the 'create_date' of the tasks.

task-3289941

closes odoo/odoo#120636

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-26 20:00:42 +02:00
Dhrumil Shah a3a05a5a89 [IMP] project: set project as analytic plan in the project config setting
In this commit we change following points:
  - changed string of analytic_plan_id field in res setting.
  - project set as default in the analytic plan of the project setting

task-3251642

closes odoo/odoo#120522

Related: odoo/enterprise#40702
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-20 19:09:03 +02:00
Yash Vaishnav 9df284792c [IMP] project: improve the rating template
In this commit, I have updated the rating request email template by making
grammatical changes and including company information such as phone number,
email, and website and also added a 'Best regards'.

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:44 +02:00
Bastien (bvdn) 1a44b84997 [IMP] project: improve various mark as done features
New features developed in this PR:

- Write Javascript tests for the project.task.state widget
  - Tests are in the project_task_state_selection.js
- rewrite Research & Development demo data
- Created a digest tip for task state selection (in Settings > technical > digest tips)
  - Tip: Use task state to keep track of the task progression
- Fix Sharingview (Readonly) icons for the project.task.state widget, previously only the color bubble were displayed in readonly sharing views, now all of the icons are displayed
- Display state in the Calendar view
  - Display the same widget as in the kanban/list views
- Remove is_closed References
- Adapt Kanban stages Exemples
  - Kanban exemples are available when creating a new stage in kanban view
- improve Progressbar colors (different color for approved/done, in_progress/waiting)

Task-3213526

closes odoo/odoo#117968

Related: odoo/enterprise#39714
Related: odoo/upgrade#4548
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-13 18:20:44 +02:00
Yashkumar Vaishnav 9add589857 [FIX] project: fix line break issue in user assigneed mail template
In your inbox, when you are assigned to a task then you receive mail from
the project. In that mail, the mail subject and body are shown in one line.

In this commit, The mail template's "assignee_name" field currently has a 'span'
tag, which may cause inline subject and body issues. To prevent this, it is
recommended to use a 'div' tag instead.

task-3274690

closes odoo/odoo#118576

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-05 10:29:42 +02:00
std-odoo 1f80810e39 [IMP] web,crm,project: add an option to hide the "Add a Property" button
Purpose
=======
When this option is enabled, the button to create new properties
is invisible. We create a client action instead, and when the user
executes client action for the first time, the button becomes visible
until the user refreshes the page.

This is useful because most of the time, the user will create the
properties and then won't change them. So this button uses space
unnecessarily in the form view (for the most of the use cases).

Task-3188915

Part-of: odoo/odoo#119811
2023-05-03 10:11:53 +02:00
Kartik Chavda b4ac7f54fa [REM] project: remove task dependency sub-type feature
Before this commit there is a sub-type to notify parent
if child stage change but with new to-do state feature
we don't to unnecessory notification on parent which is
more problemation then informative.

This commit remove task dependency sub-type and it's related
code.

task-3252755

closes odoo/odoo#118418

Related: odoo/enterprise#39972
Related: odoo/upgrade#4542
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-21 18:46:48 +02:00
Yashkumar Vaishnav e64a458fcc [FIX] project: fix customer rating issue in project
Before this commit, even if customer rating is disabled from setting user can
get subscription of task rating.

This commit ensures that only when the customer rating field is enabled, the user can
get a subscription to task rating.

task-323170

closes odoo/odoo#117577

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-06 18:17:54 +02:00
Vincent Larcin a116225e18 [IMP] hr_timesheet,project: take away Marc Demo's admin rights
Since 16.0, the demo user Marc Demo has gained admin access to all the apps.
To facilitate testing access rights, this commit restores his access rights
as they were before for the Services apps.

Enterprise: https://github.com/odoo/enterprise/pull/38055

Task-3229247

closes odoo/odoo#115026

Related: odoo/enterprise#38055
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-04 13:34:54 +02:00
Kartik Chavda 6e03d2bd26 [IMP] {sale_}project{_mrp}: improve some generic UX of project app.
Purpose:
 - Improve some generic UX of project app.

Specification:
 - make milestone field option hide in task tree view.
 - set default 'Tasks' to label_tasks field on creation when
   label_tasks field is empty.
 - order stat buttons of project update right side panel
   according to user usage.
 - hide project field for list, calendar, graph and activity
   view of act_project_project_2_project_task_all action.
 - archive task ratings template when ratings is disabled and
   unarchive that template when its not.

task-3083855

closes odoo/odoo#107467

Related: odoo/enterprise#34778
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-31 15:52:14 +02:00
Audric Onockx (auon) 85e9290711 [IMP] *: simplify recurrence
*=hr_timesheet,project,sale_project,sale_timesheet

Currently, the configuration of the recurrence is quite complete
and allows a lot of flexibility, but it is costly
in terms of implementation as it requires a lot of fields.
The goal of this task is thus to simplify this implementation.

In addition, a lot of people are complaining
that tasks are only generated when the recurrence date is reached,
as it doesn't allow to anticipate the planning of field service tasks.
In this task, we are thus going to immediately generate a new task
once the previous one is marked as done.

Concretely, we:
- describe a recurrence in terms of
"once every n day/week/month/year for ever/until a date"
and delete all fields that don't fit into it.

- remove the cron. The new occurrence is created when
marking the last task as done, and copied from the latter.
Deleting the last task deletes the recurrence.
The recurrence fields stay useful, as they form a delta t
that will be added to deadline/planned dates fields to get the new
values.

- use an boolean icon button to activate recurrence,
and place it at the end of deadline field's line.
The recurrence fields appear on the next line.

- delete in the form: the div explaining when the next tasks will be
created and the header to choose how to save the changes in the
recurrence.

task-3084945

closes odoo/odoo#112764

Related: odoo/upgrade#4343
Related: odoo/enterprise#37114
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-13 17:45:21 +01:00
Bastien (bvdn) 2e78356f82 [IMP] project,*: create new task.state Selection field
Before this PR the task state was fixed by the kanban_state field which was useful when you use the stage of the project as parts of a pipeline,
but not relevant when users are using stages as bucket lists. (specific examples at the end of the specs)

The goal of this PR is to provide users a way to mark their tasks as done with a simple button press,
while keeping the option to label a task as Approved, Canceled or Requesting changes like in the old kanban_state field.

The kanban_state of a task had no impact whatsoever on other tasks of the pipe, we would like to change that and make the task state have an influence on its dependent tasks.

The state will also have influence over the 'recurrent' tasks (to be implemented in Task #3084945)

If you want a better description of those changes with screenshot and colors check specs of:

Task-3084930

PRs:

See odoo/enterprise#35359
See odoo/upgrade#4367

-----------------------------------------

Interaction with blocking tasks:
the closed values which mark the task as closed or finished:
- Done
- Canceled

The Open values when the task isn't finished yet:
- In progress
- Changes Requested
- Approved
- Waiting (which is not selectable)

Where to change the state of a task:
- For kanban and form views: same place as kanban_state (bottom right of kanban card, top right of form view)
- For list view:  left of list (after task priority)
more details about the state widget in state field widgets part

Interaction with existing fields
- is_closed: which was determined by the task.stage_id.fold, now a task is closed when in one of the following stages
 - Done
 - Canceled
a closed task is considered as finished, the time of the closing will be stored in the date_last_stage_update field

- is_blocked: a task is considered blocked if ANY of its blocking task is in one of the blocking states (more details about this in the following part Interaction with blocking tasks):
 - in Progress
 - Changes Requested
 - Approved
 - Waiting

!! important !! is_closed and is_blocked are not mutually exclusive, you can have a task that blocked and is closed at the same time, the reason why will be explained late

date_last_stage_update: this field is updated everytime the task goes into a closing state OR when the task changes stage.
We need to check that the value is updated in each case (using the already available filter)

Interaction with blocking tasks
the state of a task can now be changed by its blocking tasks following the logic:

if ANY of the blocking tasks is NOT closed (so its state is in one of the open values) the task is considered as blocked

- if a task is blocked and NOT closed its state will switch to Waiting
 - the Waiting state will display an unclickable hourglass icon on the task kanban/list views, once in the waiting state you can't change the state of the taskfrom the kanban/list views
 - a blocked task state can be changed through the form view, so you can override the 'block' by choosing a closed state (only done or canceled)
  - once overriden, the task will change to the closed state the user wants, but the task is still blocked so in case where the user comes back to an open state, the task will automatically switch back to the waiting state (according to the state before the block)
- if the blocking task switches to a non-blocking state, the task will not be considered as blocked anymore and its state will switch back to In Progress

Default values
the default value is always in progress

Special cases
when a task is moved from a stage to another one
- if the state was in one of the open states (approved, changes requested, in progress ) the state goes back to In Progress
- if not, the state stays the same
when a task is moved from a project to another one
- the state goes back to In Progress
when a task is duplicated
- if the state was in one of the open states (approved, changes requested, in progress ) the state goes back to In Progress
- if not, the state stays the same

closes odoo/odoo#107593

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-08 21:33:03 +01:00
Audric Onockx (auon) aa250d3245 [IMP] project: improve and create task template for recurrence
The goal of this task is to ease the deletion/archiving of recurrent
tasks by giving the user the option to either continue
or stop the recurrence. The two main use-cases are:

\- You have a recurring task for a weekly meeting.
Next week, the user will be on time off. You are thus deleting the task.
However, you would still like tasks generated for the following meetings
and to keep track of the previous meetings.

\- You have a recurring task for a weekly meeting with an employee
that has just been fired. You are thus deleting the task and
you won't need this recurrence anymore.
(You may or may not want to keep track of the previous meetings.)

The main issue we are currently facing is that we need a task that acts
as a template for the recurrence to continue. This means that a user
cannot delete all of his tasks without breaking their recurrence.

Consequently, we will be using a "task template" for each recurrence,
which will only serve technical purposes and be invisible to the users.
When the recurrence is stopped, the task template is deleted.
This simplifies the technical and functional implementation as the user
won't be able to modify the template themselves.

\- Added task templates to recurrences in the data.
\- Deleted "all tasks" option form recurence update and changed "this
and following tasks" to "this and future tasks". Most of the time, the
user is going to update the most recent task, and it doesn't make
any functional sense to update past ones.
\- Same options for delete and archive.
\- No recurrent subtasks allowed anymore.
\- `date_deadline` is copied. We compute it by adding the delta between
the create date and the `date_deadline` of the template to the next
recurrence date.
\- Added filter to several view not to display task templates.

task-2937565

closes odoo/odoo#98088

Related: odoo/upgrade#4232
Related: odoo/enterprise#30416
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-02-14 17:08:49 +01:00
Rohitkumar (roku) bf1c60847b [IMP] rating,project,sale_timesheet: improve the UX for project
Purpose of this commit to improve generic usage of project app.
So in this commit done the following changes:
 - Project tags should be vertically centered
 - Rename share readonly for project.project form view
 - add demo data while add tasks in a folded stage to the sub-tasks and blocked
   by notebooks
 - add demo data for archived tasks to the archived project
 - change the name of the 'rating page done' webpage to 'Thanks for your Feedback'
 - use the avatar widget for the employee

task-2976074

closes odoo/odoo#105904

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-23 16:01:18 +01:00
Rohitkumar (roku) f7f3d9610b [IMP] sale_(project): improve the UX for project app
Purpose of this commit to improve generic usage of project app.

So in this commit done the following changes:
 - switch the id and the priority fields from place for task list view
 - add a 'view sales order' button that should open the form view of the SO
   linked to the SOL set on the milestone for milestone list view
 - add a 'sales order' stat button that should open the form view of the SO
   linked to the SOL set on the milestone for milestone form view
 - add a 'done' option; represent it in purple in status field
 - if there is only 1 assignee, display its name on the card instead of
   1 assignee for project sharing kanban view
 - add an 'all tasks' menu on the right of the 'my tasks' one

task-2917086

closes odoo/odoo#97669

Related: odoo/upgrade#3893
Related: odoo/enterprise#30195
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-25 17:55:56 +01:00
Dossogne Bertrand 7c4da16b59 [IMP] mail, various: improve mail template usability
Allow our users to modify mail template more easily

- make the list accessible from the settings
- give them a link to update relevant views to update header/footer
- make the list and form of templates more readable
- add a description on templates, allowing to describe their usage

In order to better filter templates, a new category field is added that
is computed based on active flag, description being set and the template
having an xml ID. Master templates are active, with a description and an
xml ID.

Update master data to add description on some templates.

task-2944770

closes odoo/odoo#101730

X-original-commit: dfa867343ee8842f3f127ac62584fd471b41dde1
Related: odoo/enterprise#32079
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-04 09:55:46 +02:00
gawa-odooandHabib 7e3403068f [REF] *: Analytic Apocalypse
The goal of this commit is to get rid of the analytic tags as they were confusing, serving tag purposes as well as distribution on analytic accounts.

Everywhere analytic tags were used as a distribution have been replaced with a new widget that will dispatch distribution on analytic accounts. If there was an analytic account field next to the tags, it has been included in the distribution.

Analytic tags that were used simply as information tags have been removed.

To fill the new widget, there are now 2 kind of rules that will help fill and prefill it.
The first are applicability: previous groups have been removed, and have by replaced by plans. Each account is required to have a plan. These plans define when they are available in the widget: a default applicability per plan and applicability lines that can specify rules following the context of the widget.

The second one are distribution models, that will replace previous default rules but follow the same principles. The accounts (and so the plans) that will be given by the distribution model can override the applicability rules from before.

closes odoo/odoo#98914

Related: odoo/upgrade#3885
Related: odoo/enterprise#30743
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: Habib (ayh) <ayh@odoo.com>
2022-09-20 12:36:01 +02:00
Pierre-Yves Dufays bee4a2659d [IMP] {test_}mail: merge notif email template layout to keep only one
Make mail_notification_layout as the default mail template and remove
message_notification_email. We now only have 2 main notification mail layout
templates (outside of a light one): the default one and one that inherits from
it to only change the signature to the responsible instead of the author one.

In this operation the layout of message_notification_email has been integrated
in mail_notification_layout to support outlook mail client for which
message_notification_email has just been reworked (odoo/odoo#92847).

Technical note: we have integrated the "internal communication" banner from
"message_notification_email" into the new default template
"mail_notification_layout" which cause one added query in the test for querying
the flag internal from mail.message.subtype.

Task-2801600

Part-of: odoo/odoo#88466
2022-09-14 19:13:45 +02:00
Pierre-Yves Dufays a577afc75e [IMP] account,crm,project,purchase,sale,[test_]mail: improves activity notif
Ease the understanding of the notifications sent when users are assigned to an
activity or a model (task, lead, ...).

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

Task-2801600

Part-of: odoo/odoo#88466
2022-09-14 19:13:44 +02:00
Panagiotis Kyriakou 73b6284213 [IMP] project: add gateway tip in digest
This commit introduces a new digest tip which
informs the user about the possibility to create
tasks in a project by receiving an email in its
email alias.

If a project with an email alias is set up it will
show it as an example. Otherwise the tip will be a
generic message.

This introduction will further help explain odoo
capabilities to its users.

Task-2973540

closes odoo/odoo#99740

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-08 01:08:11 +02:00
Thibault DelavalléeandAdrien Dieudonné 22c3cc51ed [FIX] rating: fix bootstrap and styling of rating email and pages
Rating page is broken since migration to bootstrap5. This commit fixes various
issues linked to btn-group, display and usage of group checkboxes. Overall
html structure is cleaned and bootstrap 5 rules are applied.

Some small display improvements are also applied to the rating email.

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

Part-of: odoo/odoo#95623
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2022-08-25 19:57:17 +02:00
Thibault Delavallée d13d251a2f [MOV] various: move and split mail data
Just doing the summer file cleaning. Move mail data into files named based on
their model, easing maintenance and searching for those data.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
Kartik Chavda 02d485779f [IMP] *_: add the analytic tag on projects, tasks, and timesheets in demo data
*_ = project, hr_timesheet

Currently, the analytic tag is not added to the project, task, and timesheet.
In this commit, we have inserted analytic tags in some projects, tasks, and
timesheets. If an analytic tag is inserted in the project, it will be automatically
added to the task and timesheet.

task-2861376

Part-of: odoo/odoo#94144
2022-08-04 18:35:11 +02:00
Hardik Prajapati c5fa2e7e29 [IMP] project: improve user experience
This commit brings some user experience improvement:
- Add a line break between the content of the email and the
  'this customer survey has been sent...' indication in mail template
- Move the project_ids field out of the debug mode

task-2792027

closes odoo/odoo#92048

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

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

task-2806292

closes odoo/odoo#88446

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

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

task-2829542
2022-05-31 10:29:09 +02:00
Xavier BOL (xbo) 50ffc33999 [IMP] sale_{project,timesheet}: remove 'delivered_milestone' in invoice_policy
Before this commit, when the `Milestones` feature is disable, the user
can always defined a service product with invoice policy equals to
'Based on Milestones' but since the feature is disabled he cannot add
this product on a milestone and so this configuratiom is useless without
the feature.

This commit removes the item into the invoice_policy field Selection
when the feature is disabled. Moreover, when the feature is disabled,
the existing products with this setting should be updated to be a
service product with `invoice_policy='delivered_manual'`. The quantity
delivered method of the existing SOLs containing those products should
also be updated to allow the user to manually edit the quantity
delivered of those SOLs when the `Milestones` feature is disabled.
However, when the `Milestones` feature is enabled again, only the
products contained in SOL linked to a milestone will be updated because
we cannot assume all service products with
`invoice_policy='delivered_manual'` were a service products with invoice
policy based on Milestones. Also the existing SOLs containing the
products updated will not be updated too to not impact the quantity
delivered.

task-2829542
2022-05-31 10:29:09 +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) 70604fefbc [FIX] project : apply project notification preferences to task
Steps :
Go to a Project's settings.
In your 'Following' preferences, uncheck 'Task Rating'.
Create a new Task in this Project and see your preferences.

Issue :
Task Rating is checked.

Cause :
The default value of project's task rating notification is True.
The value of its task's is supposed to be inheritted from there.
Yet, this inherittance only happen when default is False.

Fix :
Set default to False.

opw-282497

closes odoo/odoo#90816

X-original-commit: acb3b4dc9d93dad5850fe4bfa00770b0b8026d22
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-09 09:20:57 +02:00
Vincent Larcin 1d2adbd8c9 [IMP] project: add project color in task calendar filter
This commit colors the project filter checkboxes on the right side panel
of the task calendar view with the color of the corresponding project.

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

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

Task-2741733

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

So, in this commit done following changes:

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

closes: #83482
task-2742725

Related: odoo/enterprise#23788
Related: odoo/upgrade#3480
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-03 17:53:45 +02:00
Thibault Delavallée 05c7e84239 [IMP] rating: make methods private
Purpose is to lessen access to internal methods and make them private. No
need to expose internal computation.

Task-2812665 (Rating: Cleanup rating flow code)

Part-of: odoo/odoo#80707
2022-04-04 17:48:23 +02:00
Thibault Delavallée cce67a0a4d [REF] rating, various: cleanup rating from routes
PURPOSE

Cleanup code and flow of customer rating: routes, rating_apply, rating and
message creation and update.

SPECIFICATIONS

Cleanup code about rating controllers and rating_apply. Notably correctly
link a message to a rating once a feedback is posted, whatever the flow.

Update ``rating_apply`` to use either a token, either an existing rating to
udpate it and post a message. Always link the message and the rating to
be sure DB data are coherent.

This requires an update in several demo data to correctly set tokens on
ratings and use it in calls to ``rating_apply`` done in xml files.

Extract default subtype computation of rating_apply in a sub-method to allow
setting this parameter without having to deal with ``rating_apply`` details.

CODE CLEANUP

Split behavior that is generic but actually used only in project about stage
update based on rating. Move it directly in project. As it is used only once
and as generic approach is hardcoded based on fields names better keep it
localized.

Task-2812665 (Rating: Cleanup rating flow code)

Part-of: odoo/odoo#80707
2022-04-04 17:48:23 +02:00
Fabio Barbero 1356a490e1 [IMP] digest, *: show pictures stored on Odoo
Purpose
=======
Pictures from the digest emails are currently stored on the database
itself, meaning that if the database expires (e.g. after trial expires) all
pictures from previously sent emails won't be visible.
This is an issue since digest tips are meant as a marketing tool to bring
people to Odoo after trying a database.

Digest pictures are now taken from Odoo's server
(https://download.odoocdn.com/digests) so that the pictures will still
be visible after the database has expired.

From this commit onwards, it should not be allowed to change a digest
picture with the same name (to display a gif of a newer version), since
all databases with previous versions would receive pictures of a version
that does not correspond to theirs.

This also means that everyone client's Odoo  server will contain pictures
that are never used. This could be fixed if Odoo stored them somewhere
else and didn't make them dependent from the git repository.

Task-2372195

closes odoo/odoo#87343

X-original-commit: 35157677a2a63a2559a72aff21e62e23a3c671a2
Related: odoo/enterprise#25654
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-29 00:08:59 +02:00
Kartik Chavda c9e10cb888 [IMP] project, **: improve generic ux for project
** = hr_timesheet,rating,sale_timesheet,sale_project

Purpose of this commit to improve generic UX of project app.

So, In this commit done the following  point:
- change the label for 'planned_hours' field in project task form view.
- change demo user access right to project user instead project admin.
- display the rating_status and rating_status_period fields under the 'customer
  ratings' feature in the settings.
- add 'project_id', 'mail_template_id', 'rating_template_id' fields in project
  task search view.
- add open and closed filter in project search view.
- display 'assign to me' button secondary when user set on task.
- add tooltip for 'date_deadline' field in  project form view.
- replace create_date field by write_date in rating views.
- change context of billable time stat button action.
- improve search view of project task.
- hide rating stat btn when satisfaction is 0%.
- change name of task create when SO confirmation.
- change name of project create when SO confirmed when there is only one SO
  line contain service_tracking is 'only_project'.
- add id field in tree view of project task as option hide

task-2710539
closes: #81630
2022-01-31 19:25:47 +00:00
Vincent Larcin 0f0ff26375 [IMP] project,{hr,sale}_timesheet: reorder and rename demo tasks
This commit reorder and renames the tasks in demo data by project.
This is done in order to make it easier to parse, modify or add data in those files.

Closes #80102
Task 2669762

Related: odoo/enterprise#22399
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-04 17:03:11 +00:00
Vincent Larcin 6ec64c6307 [IMP] project: add and rework demo data
This commit adds plenty of new demo data showcasing some features that weren't before, and also reworks existing demo data to make is more consistent.

Closes #80102
Task 2669762
2022-01-04 17:03:10 +00:00
Xavier BOL (xbo) 581056425f [FIX] projet: fix duplicate id in project demo data
Before this commit, 3 xmlid are duplicated, so the result is not
expected.

This commit changes the duplicated xmlid to create the 6 tasks as
expected.

Part of task-2671848

closes odoo/odoo#80661

X-original-commit: 12e848cb200d4b763563e0b110c963aeb71d706e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-12-01 11:05:09 +00:00
Bonis ModiandKartik Chavda f4c054e473 [IMP] project, hr_timesheet, *: improve generic ux
Purpose of this commit to improve generic UX for the project app.

So, In this commit done following changes:

- add 'subtask_effective_hours' and 'total_hours_spent' fields in the page of
subtask in task form view.
- change invisible attrs to column_invisible attrs for block_by page in task
form view.
- add 'task in progress' subtype for project.task and move 'stage changed'
subtype above 'task blocked'.
- remove the 'is_close' field and all its references from project.task.type.
- unarchive all of its tasks when the user unarchives the task stage.
- sort projects on 'is_favorite'.
- internal users following the project automatically follow its updates and
their notification preferences propagated accordingly.
- duplicating a task will duplicate all of its subtasks.
- move parent task field in extra info page of task form view.
- change the label of 'edit' to 'view' in the burger menu of project kanban view.
- user can delete task without sale_order validation error.
- add constraints for 'seller_ids' field.
- add remaining_hours_so field in task tree view.
- add unusual_days in task calendar view.
- add 'no content helper' in action of burndown chart.

task-2536044

closes odoo/odoo#74018

Related: odoo/enterprise#19880
Related: odoo/upgrade#2801
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Kartik Chavda <kcv@odoo.com>
2021-11-23 12:04:00 +00:00
Cedric Prieels (cpr) ea038c6b19 [IMP] project: follow up the project overview removal
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-2646234
See odoo/enterprise#20936

closes odoo/odoo#76553

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-23 11:12:14 +00:00