Bug
===
The unlink of the <mail.mail> in the CRON is problematic because we
accumulate a lot of records, and the CRON timeout.
In particular, when we sent a mailing, we receive the "opened" event
(blank image in the email), and so we need to update the mailing trace.
But, if we unlink the mail at the same time, it locked the mailing trace
table and we couldn't write the new value.
The reason for that is that before, the unlink took more queries, but
it was done one record at a time, so we could commit the change and
release the lock between each unlink.
Task-3179157
See odoo/odoo/pull/73271
closesodoo/odoo#112703
X-original-commit: 57ae1b9b8b61f5f4719a8a81e9d0d21fab58cfda
Related: odoo/enterprise#37069
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
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
closesodoo/odoo#98088
Related: odoo/upgrade#4232
Related: odoo/enterprise#30416
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps:
Enable recurrence feature.
Go to Project > Office Design > Customer Review.
Enable recurrence on this task > Change month to year.
Issue:
Crash.
Cause:
`_get_next_recurring_dates` is called without a `repeat_month` arg.
Is is supposed to be a string which is going to be found in MONTHS keys.
Except it is False and so it is not in the list.
Fix:
If we don't receive it, deduce it from `date_start` arg.
closesodoo/odoo#112506
X-original-commit: 566c4904129dc7e81458871656d9b20b19b36246
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
This commit add a mechanism to ensure that someone could never save
changes from an history that diverge (in case there is a partition in
the RTC network or a person A was disconnected while another person B
saved changes that were not transmitted to person A).
task-3002163
closesodoo/odoo#112099
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
On SO confirmation:
- If all of the following conditions are met,
set the end_date of the Subscription
as the repeat_until date of the Task:
The Product is recurrent and creates a Task,
The Task Template is recurrent,
The end_date field is set on the Subscription.
- If all of the following conditions are met,
apply the Subscription's recurrence to the Task's:
The Product is recurrent and creates a Task,
There is no Task Template on the Product.
- If the Subscription is closed, set the recurring_task
field of the related Task to false.
task-2868306
closesodoo/odoo#92696
Related: odoo/enterprise#27953
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Current behaviour:
You cannot set the Default Analytic Plan for projects in the settings.
Expected behaviour:
You should be able to set the default plan, like any other settings.
Steps to reproduce:
- Install Accounting, Project, (Timesheets if you want to test
project creation with an auto-created analytic account)
- Settings > Check Analytic Accounts
- Try to change the Default Plan in Settings > Project
- Upon saving, the change is lost
Reason for the problem:
The `analytic_plan_id` in the project's `res.config.settings` is
related to the same field on the `res.company` model.
The `analytic_plan_id` that is set on the company upon installing the
project module is a non-stored computed field, which makes a call to a
`_get_default` -> the field cannot be set. It will always return
the first default plan in the sequence.
Fix:
Since the field isn't stored (which would have worked if it was),
we use `ir.config_parameter` to write and read to it, per company.
In master we should just add a `store=True` and write a migration
for it?
Affected versions:
- 16.0
- saas-16.1
- master
opw-3127638
closesodoo/odoo#111635
X-original-commit: 11b0e2556ce824048bb4c760893b05e98537d171
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Add a constraint preventing the user from switching the project from company
if the partner doesn't belong to that company, and vice versa.
task-3126301
closesodoo/odoo#109464
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
In a previous commit https://github.com/odoo/odoo/pull/98660,
we implemented `_search` method to search by `is_favorite`.
Unfortunately, this method looks for any order item starting with
'is_favorite' and so it could include 'is_favorite_gnagnagna'.
closesodoo/odoo#110745
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps:
- Install project app.
- Active Sub-tasks feature in config settings
- Create task with parent task
- Green the kanban state
- Modify the parent task
Issue:
The kanban state changes when we change the parent task in the task.
Fix:
We avoid the recomputing kanban state.
Why issue occurred:
When we change the parent task _compute_project_id is called and sets the project.
the _compute_kanban_state method depends on the project. So reset the kanban state.
task-3141855
closesodoo/odoo#110492
X-original-commit: 0393cffa71821ba32af8e9ba54225275647c4e70
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
RATIONALE
Improve usage of composer in comment or email mode: support batch-posting in
comment, support more configuration from templates, improve global model.
SPECIFICATIONS
Change 'auto_delete_message' into 'auto_delete_keep_log' that has the inverse
meaning. Indeed it is unclear what 'auto_delete_message' really does. It is
used when automatically removing emails sent through mass mailing, to know
if message created through inherits are kept or not. Purpose of keeping them
is to have a log on the document. Deleting the message therefore removes the
log.
In this commit we change the meaning to something positive, keeping logs being
clearer when choosing which option to activate. Functional usage of the field
itself does not change with this commit.
Task-3035101 (Mail: Support batch-posting from composer)
Part-of: odoo/odoo#99482
When a message is processed through the mail gateway, the partner should
never be set as the assignee of that task.
This commit allow to correctly let pass `{'default_user_ids': False}`
context from `message_new()` down to `create()`
closesodoo/odoo#110124
X-original-commit: 08e24d683bf19a77982a7ffba6c64b5fc6fdf85a
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
*=hr_timesheet,sale_project,sale_timesheet,spreadsheet_dashboard_hr_timesheet
The main goal of this PR is to minimize code duplication for the search and list views for tasks and projects.
Task search views
-----------------
The most important change was to merge the search views used in the task reports with the "normal" corresponding search view. The reporting search view should now be almost identical to the normal one in both project and fsm.
The `project.task`/`project.task.user` search views are now following this inheritance diagram:
```
┌─┐
┌─┤1├─┐
│ └─┘ │
│ │
┌▼┐ ┌▼┐
│2│ ┌─┤3├─┐
└─┘ │ └─┘ │
│ │
┌▼┐ ┌▼┐
┌──┤4│ │7├──┐
│ └┬┘ └┬┘ │
│ │ │ │
┌▼┐ ┌▼┐ ┌▼┐ ┌▼┐
│5│ │6│ │8│ │9│
└─┘ └─┘ └─┘ └─┘
```
1. `view_task_search_form_base`: Base search view containing all the fields/filters common to project, project sharing and fsm
2. `project_sharing_project_task_view_search`: Search view for project sharing.
3. `view_task_search_form_project_fsm_base`: Base search view containing all the fields/filters common to project and fsm (not project sharing).
4. `view_task_search_form_project_base`: Base search view for project only, with fields/filter common to the normal search view and the one used in reporting.
5. `view_task_search_form`: Search view for project.
6. `view_task_project_user_search`: Search view for the project report.
7. `project_task_view_search_fsm_base`: Base search view for fsm only, with fields/filter common to the normal search view and the one used in reporting.
8. `project_task_view_search_fsm`: Search view for fsm.
9. `report_project_task_user_fsm_view_search`: Search view for the project report.
With this organization, we can easily add a field to both fsm and project at once, and even to project sharing at the same time. Since the goal is to keep the reproting search views identical to the normal ones, it'll also add the field to both of them.
Task list views
---------------
Similarly to the search views, the task list views were also refactored to minimize code duplication, following this inheritance diagram:
```
┌─┐
┌─┤1├─┐
│ └─┘ │
│ │
┌▼┐ ┌▼┐
│2│ ┌─┤3├─┐
└─┘ │ └─┘ │
│ │
┌▼┐ ┌▼┐
│4│ │5│
└─┘ └─┘
```
1. `project_task_view_tree_main_base`: Base list view containing all the fields/filters common to project, project sharing and fsm.
2. `project_sharing_project_task_view_tree`: List view for project sharing.
3. `project_task_view_tree_base`: Base list view containing all the fields/filters common to project and fsm (not project sharing).
4. `view_task_tree2`: List view for project
5. `project_task_view_list_fsm`: List view for fsm.
Project views
-----------------
The search and list views for projects in fsm now inherit the ones from project, since our goal moving forward will be to keep those as similar as possible.
Other changes
-----------------
- Merged and removed many filters/fields from the task search views.
- Changed `total_hours_spent` and ` subtask_effective_hours` labels in `project.task` model to avoid changing them manually in many views.
- Renamed `state` into `kanban_state`, `hours_planned` into `planned_hours` and `hours_effective` into `effective_hours` in `report.project.task.user` to make it consistent with `project.task` (so we can keep the same views for both of those models).
- Moved the sale line filed in the "Settings" tab in the project form view (so that the `sale_line_employee_ids` field in "Invoicing" takes the full width).
---
Enterprise: https://github.com/odoo/enterprise/pull/34106
Upgrade: https://github.com/odoo/upgrade/pull/4216
Task-2746370
closesodoo/odoo#106015
Related: odoo/upgrade#4216
Related: odoo/enterprise#34106
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit when user creates a private task user
still able to customer and sol field which no use for
private task.
This commit hide customer and sol field for private task
and reset customer field when user make non private task
to private task.
task-3084850
Part-of: odoo/odoo#109281
Current behaviour:
When sending an email with an inlined image to an alias of a project,
the image is broken in the task description.
Expected behaviour:
The image should be rendered correctly.
Steps to reproduce:
- Install Project
- In Settings add a custom email server and set a domain alias
- Create a new Project and in it's settings create an email alias
- Send an email with an *inlined* image. (not attachment)\
- Image is not rendered correctly in the newly created task.
Reason for the problem:
Email with an embedded/inlined images are multipart, one is containing
the base64 encoded image and has a `content-id`, another one is the
html body that has an `<img/>` which source is a `cid` that references
the `content-id` of the encoded image. When parsing the email when
creating the task, we only take into account the `html` part of the email,
which becomes the `message.body` which is used to fill in the description.
Therefor we have an `<img src="cid:..."/>` that references nothing.
Fix:
Use the already parsed and sanitized `message.body` from the message's thread,
which converts the `content-ids` into relative links to web images.
We fill with that the description's body.
Affected versions:
- saas-15.2
- saas-15.3
- 16.0
- master
opw-3062444
closesodoo/odoo#109354
X-original-commit: 3c805400045f2ccc8ad4228eb5718af0e22a8027
Related: odoo/enterprise#35543
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Before this commit, when the user cannot write on a certain field
an error is occurred to notice the user, he cannot write on that field.
The problem is the `on` is never translated.
This commit fixes the issue to be sure the whole error message is
translated.
closesodoo/odoo#109288
X-original-commit: 5098c59cc6d1a853210f8c4f5340f0d4ee8dd883
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Description of the features in this PR:
add the date deadline to the order of tasks (sort priority)
add the day of the week (only the first 3 letters) for the recurrence message in recurrent tasks
display the name of the project in the action instead of 'Project Sharing'
By changing the sorting order of the Project.Task model
some indexations in the tests didn't point to the right tasks
Now each task that has a deadline will be placed in front of other tasks (except for the high priority task)
Task-3034635
closesodoo/odoo#105701
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Currently, when a db is loaded without demo data, or that a user has no
task assigned and no personnal stage, the view 'My tasks' is empty. The
purpose of this commit is to assign default personnal stage to a user in
these case to ease the understanding of new user of what the view can be
used for.
This commit :
- add default personnal stage to user the first time he clicks on the
'My tasks' menu if the user has no personnal stage and no task are assigned
to him.
task-3047496
closesodoo/odoo#105940
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Computing the recurrences of a task repeating every X months until a
certain date generates too much dates
Steps to reproduce:
1. Install Project
2. Go to Settings > Project > Tasks Management and enable Recurring
Tasks
3. Open any project in the Project app and create a new task then edit
it
4. Enable the Recurrent field of the task
5. In the Recurrence tab, edit:
- Repeat Every: 6 Months
- Until: End Date: one year from now
6. The recurrence message says there are 11 tasks but there should only
be 2
Solution:
Generate the recurrences until the `repeat_until` date is reached if the
`repeat_type` is 'until', otherwise generate as much recurrences as the
count
Also relax the constraint on the `repeat_day` and `repeat_until` to not
raise an error if `repeat_until` is the last day of the month
Problem:
The recurrence of a task with `repeat_unit` month and `repeat_interval`
different than 1 with a `repeat_type` until creates too much tasks,
exceeding the `repeat_until`
opw-3076593
closesodoo/odoo#107910
X-original-commit: 236b383fd9d1ad6a5d39d8c4232b49864ec19b37
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Steps to reproduce:
- activate "Recurring Tasks" option inside Project settings;
- go to "Field Service" app;
- create a task;
- check recurrence box;
- make the following configuration in the recurrence tab:
* Repeat Every 6 Months
* Repeat On Date of the Month 1
* Until End Date [your choice]
Issue:
The dates calculated for the recurrence are not correct.
Cause:
When we select an interval other than 1 for a frequency in months, we do not divide the number of months between the start and end date.
And therefore the loop that calculates the recurrence dates goes too far into the dates.
Solution:
Divide the number of months between the start date and the end date by the interval.
opw-3078084
closesodoo/odoo#107320
X-original-commit: 5d44d7d595dab866695945e5a6d2091ddd9df342
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
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
closesodoo/odoo#97669
Related: odoo/upgrade#3893
Related: odoo/enterprise#30195
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
The goal of this revision is to add a group
`mail.group_mail_notification_type_inbox` which is granted
automatically when the user `notification_type` is set to `Inbox`
to be able to easily hide the filter `Unread messages` when
the user uses the `Email` notification type,
by simply adding `groups="mail.group_mail_notification_type_inbox"`
on the filter rather than overriding `_get_view` in every model.
The code overriding `_get_view` of `project.task`
to hide the filter "Unread messages" replaced
in this revision initially comes from
odoo/odoo@da868d28e2
> - In project.task search View:
> - the filter for unread messages should be visible only if the current user
> managing his notifications in Odoo
The above revision was part of the task 2844212
closesodoo/odoo#104328
Related: odoo/enterprise#33338
Related: odoo/upgrade#3996
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Before this commit:
When task project is changed in through the view the kanban_state remain the same
until the record is saved.
After this commit:
When changing project, kanban_state is changed to 'normal' direclty.
task-2849291
closesodoo/odoo#91174
Related: odoo/upgrade#3523
Related: odoo/enterprise#27287
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
After this commit:
- When duplicating project or task, assignment notifications and emails on stages are not sent
task-2849291
Part-of: odoo/odoo#91174
Before this commit:
- Task followers are not copied when creating subtasks
After this commit:
- Created subtasks have the same followers as their parent task with the same subtype_ids
task-2849291
Part-of: odoo/odoo#91174
Purpose of the commit is to do the generic improvements for project app.
So in this commit did the following changes:
- add the 'creation date', 'last stage update', 'SOL', 'my deadline' fields in
project task list view.
- add the 'my deadline', 'next activity' fields in project list view.
- crop the label of the stage after x characters in task portal form view.
- remove the 'collaborators' stat button from project update right-side panel.
- renamed sold->sales, services->sales order items, effective->delivered,
remove the totals, include non-service SOLs, increase the size of the SOL
column
task-2928100
closesodoo/odoo#97870
Related: odoo/enterprise#30268
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit, when the user uses the `Late Milestones`
filter in the project views, all the projects in the views
are used, but some projects could have the feature disabled
and so those ones should be ignored in the filtered.
This commit filters the projects to only apply the filter
on those projects and not also the ones without the feature
enabled.
task-3033041
closesodoo/odoo#105709
X-original-commit: e8ee1e370ec3c6b4bc13d0d5da6b242af1e9b9c3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit introduces the following improvements:
- In `My Tasks` list view: the personal stage is displayed instead of the stage for private tasks
- When copying a stage, the new stage name is appended with `(copy)`
- A default filter 'open task' is added in the subtask notebook search
- A default filter on the project is set on the search of the `parent_id` task field
task-3024152
closesodoo/odoo#103318
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit, some error messages and others messages are
not translated.
This commit uses the translation function to be able to translate
those messages.
task-3006627
closesodoo/odoo#105192
X-original-commit: 85ef44cd66474bf5dcda4d7478d566e462d1a550
Related: odoo/enterprise#33717
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, when we create a new task in project gantt
view, the default current user is assigned to the task instead of
corresponding user.
So in this commit, assign the default user along with current user.
task-2920824
closesodoo/odoo#104967
X-original-commit: ab0e072fda7c2dff4ee7916496edfb6da11019ff
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit:
Let's consider project P1 having no stages.
Let's consider project P2 having Stage 1, Stage 2
When importing tasks via csv file:
- Task 1 for project P1 and Stage 1
- Task 2 for project P1 and Stage 2
Stage 1 and Stage 2 are still assigned only to project P1.
After this commit:
Stage 1 and Stage 2 are now assigned to P1 and P2.
Task-2996393
closesodoo/odoo#103819
X-original-commit: 2e6a7741dd2c993daa1b1aafe4ebd422cd57235c
Signed-off-by: Xavier <xbo@odoo.com>
Before this commit, when the domain used in `read_group` and `search` to
check if the portal user can access to the fields used in the domain
does not take into account the `TRUE_LEAF` (that is, `(1, '=', 1)`) and
`FALSE_LEAF` (that is, `(0, '=', 1)`). In other words, when the
`TRUE_LEAF` or `FALSE_LEAF` is in the domain, an access error is raised
saying the field name `1` or `0` cannot be accessible by the portal user.
This commit allows to add `TRUE_LEAF` and `FALSE_LEAF` in the domain to
avoid having an access error because of that.
close#103214closesodoo/odoo#103465
X-original-commit: 953033e1ab20a01918dae7ca495654cddef14af3
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
This commit remove tooltip from stage_id field of project model
from project app.
task-2999323
X-original-commit: 1e81116ea28de33ac54b99601ef5dd6048cef378
Part-of: odoo/odoo#103032
Before this commit, when we go to a Task. Click on the Tags field
> Search More. Group by Projects.
We get a list of projects groups. Click on them and they go from
(x) to (0) due to invalid group result from read_group without
valid domain same as search_read.
So in this commit, override the read_group method to pass the valid
domain same as search_read.
task-2959382
closesodoo/odoo#102236
X-original-commit: f9e9964c7138485ba328ce5cd4c4c8905c392adc
Signed-off-by: Xavier <xbo@odoo.com>
Steps :
- When the user is subscribed to the `Stage changed` subtype
but not `Task in progress` and on change of stage, the users only
subscribed to stage changed will not receive stage changed notification.
Cause :
- When the stage is changed it will also change the kanban_state to
in progress and due to that, it will track the kanban_state from
_track_subtype, and the user who subscribed only stage_changed will not
get notified.
Fix :
- So in this commit, prioritize the stage_id changed notification so that
when the stage_id is changed we use that one, and the in-progress won't
be triggered, but when we change the kanban state back to progress it
will be triggered. As in progress is implicit when changing the stage_id.
task-2818058
closesodoo/odoo#102172
X-original-commit: 4d952d679629a4a225ff208a6d018e11f14bf47e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Steps to reproduce:
- have a project with a stage having the user_id set to Mitchell Admin (in this scenario you would have to add the field in the view)
- create a task in this stage
- log in with Marc Demo
- Try to open the project
Issue:
There will be an access error
Cause:
The domain allows to fetch all tasks from a project; even those from a prohibited stage
Solution:
- As in d4252825f5, we'll restrict the domain and "hide task stages if user is set".
- Prevent the user to create/modify a record to it with with a `user_id` and `project_ids`
opw-2917631
closesodoo/odoo#101965
X-original-commit: fdaef9276b89e2170128e205a4b7fd0b8defc2b1
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
Purpose
=======
To be able to customize the working flow on the task, based on their
project, we add a properties field on tasks, whose definition is stored
on their project.
Task-2965523
X-original-commit: 2f244769cbb1512875ae197aa8adc3efd34fd54b
Part-of: odoo/odoo#101487
The goal of this task is to review the copywriting of the tooltips
because some of them are not correct in English and others are not
valid anymore. This is also a good opportunity to make an inventory
of the tooltips we have and to add some that could be missing.
task-2862283
closesodoo/odoo#93261
Related: odoo/enterprise#28225
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
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.
closesodoo/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>
Purpose of this PR to improve generic usage of project app.
So, in this PR done following changes:
- In project.project form view :
- Divided settings into sections
- In project.update.search.view :
- Added author, description and status in quick search
- Added ancestor task in group by and replaced parent task with ancestor task
in search view
- In project.task search View:
- the filter for unread messages should be visible only if the current user
managing his notifications in Odoo
- Added my private task filter
- In project_task_view_graph
- Added a default project > stages group.
- In project.task form view:
- If stage is_closed added decoration-muted
- Replace/Add parent task with ancestor task' in group by and quick search
- analytic-tags set on project should be automatically applied to it's tasks
task-2844212
Part-of: odoo/odoo#93676
Purpose of this PR to improve the generic usage of project app
So in this commit done the following changes:
- when a project is archived, the 'tasks' stat button should
count/show archived tasks
- when delete project it's milestone should also be deleted automatically.
- project.task > blocked by notebook: it should be possible to select tasks
in projects that are not allowing 'task dependencies'
- project.task portal form view: hide the description if it is empty
task-2853991
closesodoo/odoo#94138
Related: odoo/enterprise#28654
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Since https://github.com/odoo/odoo/pull/90588, the personal stage is a required field in the task form view in debug mode.
However, we only generate personal stage for a given user when that user is first assigned to a task.
If a user creates their first task and assign it to themselves, they won't be able to give it a personal stage.
To prevent issues linked to the current users not having personal stages, this commit makes the field not required, but prevents the user from unsetting it
closesodoo/odoo#99735
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
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
This commit (and its enterprise equivalent) purpose is to smooth the
user experience and remove unnecessary steps.
The commits:
- Remove all stat buttons except the status and collaborators one from
the project edit form.
- Add multiple small changes to string/name fo fields in views
- Change the custom O2M widget for a standard M2M for the management of
child tasks
- Add the milestone field to the portal page of shared project.
- Remove the wizard 'marked_as_reached_milestone'
- Add the automatic generation of milestone when a SO is confirmed if
some SOL need it
task-2941835
closesodoo/odoo#98546
Related: odoo/enterprise#30628
Related: odoo/upgrade#3798
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Purpose of this commit to improve generic usage of project app.
So in this commit done the following changes:
- apply the 'open tasks' filter by default for my task menu
- the search view set the one from accounting and not timesheet for
gross margin stat button
- add a 'stalling for 30 days+' filter that should return open tasks whose
last stage update was more than 30 days ago for project task form view
- move the 'stage' quicksearch above the 'project' one for burndown chart
- when archiving a project containing tasks that are recurrent, disable their recurrence instead of
raising an error
- format some field in timesheets notebook in project sharing
- display the 'rating email template' field by default for task stages
task-2899490
closesodoo/odoo#95636
Related: odoo/enterprise#29270
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
The master plan finally comes to an end.
Thanks to:
- odoo/odoo#87522 refactoring `load_views`,
- odoo/odoo#94337 refactoring `common.Form` to prevent changing
invisible fields in unit tests using `Form` instances,
- odoo/odoo#95729 refactoring the behavior of `groups=` in views,
- odoo/odoo#98551 removing the need of the `groups_id` many2many field
on back-end views.
The result returned by `get_view`/`get_views` can now finally be easily
and efficiently cached, in order to cache back-end views.
The goal of this revision is to cache the model views and fields
already post-processed for the web client
(with the modifiers, etc., already computed)
without group restriction.
Then, from this cached version, post-process group related features,
such as removing nodes restricted with a `groups=` attribute,
set the create/write button according to the user access rights to models, ...
Not including the groups in the cache key allows:
- to have less cached versions,
(otherwise it would be one cached version per different group combination)
- to not have to fetch the user groups to compute the key
(with the current cache key,
there is nothing to fetch from the database to compute the key)
Besides, post-processing the groups features
after taking the view from the cache of the view doesn't take a tremendous time:
- parsing arch from/to string with etree is fast,
- removing the `groups=` nodes using etree is fast,
- adding the `create="False"`, `write="False"`, `delete="False"` on the view
root node according to the access right of the user on the model is fast.
This allows way faster calls to `get_views` by the web client,
as the server no longer need, for each call, to fetch the views in database,
combine the inherited views, post-process the modifiers attributes, etc.
Timing tests are available on the pull request of this revision.
Part-of: odoo/odoo#99417
Purpose of this PR to improve generic usage of project app.
So, in this PR done following changes:
- In project.project form view :
- Added name label above name field
- Changed placeholder name of field to 'e.g. Office Party'
- in project_project_view_form_simplified:
- displayed name as Title
- renamed 'create' into 'create project'
- in project.task form view > extra info notebook :
- added the 'personal stage' field (Only visible in debug mode)
- in project.project form view:
- based timesheet encoding unit set the 'cost' field name to Daily cost
if uom in Days or In Hourly cost if uom in Hours
- configuration > projects: if possible, clicking on a project kanban card
will be open its form view
task-2821488
closesodoo/odoo#90588
Related: odoo/enterprise#26977
Related: odoo/upgrade#3492
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Non total order can lead to randomized order in some case, making some
test behaviour random and/or difficult to debug.
Adding some fallback 'id' order shouldn't hurt
closesodoo/odoo#99324
X-original-commit: 6e40e5fe775273a2d3a968ac113cbeb578318dd1
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>