Commit Graph
754 Commits
Author SHA1 Message Date
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Elisabeth Dickinson b2ef35a431 [IMP] *: replace .bg-color by .text-bg-color on ribbons
Also remove unnecessary CSS on ribbons.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
stefanorigano (SRI) 051ac37232 [IMP] web, * :introduce o_avatar
*: account, gamification, mail, mrp, note, project, website_blog,
   website_event_track.

Uniform design defining a common element shared across different
modules.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
Xavier Bol (xbo) 8a286e89cc [FIX] project: fix the width of state and priority columns in list view
Before this commit, when the list view is rendered and is empty then
the state and priority columns are relatively big just to display a
button.

This commit fixes the width of those columns to 40px when the list
view is empty. If the list view is not empty then those columns will
have a min-width set to 40px.

task-3248592

closes odoo/odoo#120508

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-12 19:54:50 +02:00
ravb-odoo 571c08256f [IMP] project: remove assign_me button and clock icon from task form view
Description of the issue/feature this PR addresses:
Before this commit assign_me button and clock icon from start button is shown in
project task , project sharing as well as helpdesk ticket.

This commit remove assign_me buttom and clock icon from start button in project
task, project sharing and helpdesk ticket.

task-3292056

closes odoo/odoo#120378

Related: odoo/enterprise#40630
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-10 19:17:07 +02:00
Kartik Chavda 629307d310 [FIX] project: make priority field non auto save in page
Before this commit changing priority  from sub-task
and block-by task saves the unsaved change or even create new
records even though user discard that changes.

This commit add 'auto_save' false to prevent auto save for
sub-task and block-by task page.

task-3282848

closes odoo/odoo#120925

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-10 11:36:59 +02:00
Julien Mougenot 10dc896c1e [REF] *: Adapt views to Owl DateTimePicker
This commit follows the addition of the OWL date picker and intends to:

- update views calling daterange widgets to use the new syntax (and
remove the end date field from the view in most cases);

- change the remaining components extending the previous DatePicker and
DateTimePicker components.

Part of task 3121497

Part-of: odoo/odoo#112171
2023-05-05 13:52:22 +02:00
Yashkumar Vaishnav 4e9a30bcfc [FIX] project: fix validation error of quick create view
In the quick create view, do not enter a value in the Task Title field and try
to create a task, a validation error is showing instead of a toast notification
highlighting that a required field is not set.

In this commit, display_name field is set as a required field so that when
required field is null, a toast notification is displayed instead of a
validation error

task-3274690

Part-of: odoo/odoo#118576
2023-05-05 10:29:42 +02:00
ravb-odoo c9637fd3bd [FIX] project: fix recurrence boolean should be hidden issue
Description of the issue/feature this PR addresses:
In project module, when sub-tasks is created then recurrence boolean field
should not be visible in that task. It only visible in parent tasks.

Current behavior before PR:
recurrence field is visible in sub-tasks.

Desired behavior after PR is merged:
recurrence field is not visible in sub-tasks.

task-3252521

closes odoo/odoo#120601

X-original-commit: c122da61dba916c74bca4c6994a289099d73eaa4
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-05 00:39:52 +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
Bruno Boi f22961ad07 [FIX] web,*: repair root class attr
*: web + adaptations in base, fleet, hr, hr_expense, hr_recruitment,
   loyalty, lunch, mail, mass_mailing, note, project, stock, survey,
   web_tour

**Foreword**
Since d19037e141 the rootnode class attribute for form/list views was
copied two times:
- on the o_view_controller div
- and on the root node of the view renderer.

Examples:

<form class="foo">...</form>

    gives

<div class="o_view_controller o_form_view foo">
    <div class="o_control_panel">...</div>
    <div class="o_content">
        <div class="foo o_form_editable ...">...</div>
    </div>
</div>

and

<list class="foo">...</list>

    gives

<div class="o_view_controller o_list_view foo">
    <div class="o_control_panel">...</div>
    <div class="o_content">
        <div class="o_list_renderer foo ...">...</div>
    </div>
</div>

**Issue**
This could lead to confusion and also unexpected styling issues.
See this PR #119815 to read a message JS Framework team has received.
See also another a fix that had to be made for x2m fields: 980244fa8

**Introduced Changes**
- in the form compiler, the root node attributes are no more copied to
  the root div node of the compiled template the form renderer receives
- the root div node generated by the form compiler now has the
  "o_form_renderer" class, which was removed during the recent form view
  refactoring.
- the list renderer no more adds the root node class attribute to its
  "o_list_renderer" div
- the X2ManyFieldDialog has been adapted too
- since View, X2ManyField & X2ManyFieldDialog both need to compute view
  classnames derivated from the arch root node, an util has been
  introduced to avoid duplicating code
- the whole codebase has been checked and adapted.

Related: odoo/enterprise#40418
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-04-27 16:10:30 +02:00
Raouf b0421b3aab [IMP] project: improve portal and project sharing UX
Before this commit:
1- project sharing task form: Internal users can't see and edit all fields.
They need to go back to backend interface. Some users don't even know the
difference between project sharing and backend, and the others need to navigate
manually to that interface

2- portal tasks list view: Currently, the name of tasks will be cropped if it is
too long. However, the user has no choice but to open the form view to get the
full name of the task. This can be quite bothersome when each task has to be open
individually in order to differentiate them

3- portal tasks list view: Currently, projects are displayed as tags

After this commit:
1- we added a shortcut to redirect them in one click.

2- display the full name of the task on hover

3- display project as a normal field

task-3186689

closes odoo/odoo#114531

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-27 14:49:38 +02:00
odoo 36ce1611ed [FIX] project: fix line break between the partner name & city issue
Description of the issue/feature this PR addresses:
In kanban view of field service, there is a break line between partner name and
partner city.

Current behavior before PR:
partner name and partner city are in different line.

Desired behavior after PR is merged:
partner name and partner city are in same line.

Fix:
in kanban view of project module, partner city is inherit from the industry_fsm
module. Style is added in both the fields(partner name and city), due to which
line break is occurs. so style is removed from both the fields and added to the
parent <span> tag of the fields. <t> tag is converted into <span> tag so that
style can be applied.

task-3252521

closes odoo/odoo#119760

X-original-commit: f35b534e6e86d3b5848f3e9cb6aa4d6e0b0c1854
Related: odoo/enterprise#40331
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-26 23:01:07 +02:00
Vincent Larcin e7afea2434 [IMP] project,hr_timesheet: improve project and task search views
This commit brings a few improvements to the project.project and project.task
search views.

Task-3264820

closes odoo/odoo#118515

Related: odoo/enterprise#39766
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-25 21:10:39 +02:00
Julien Carion (juca) eaacaf122d [IMP] web, *: Add autoresize hooks
This commit adds two autoresize hooks for text inputs and textareas to
make it adapt their size (width for text inputs, height for textareas)
depending on their content.
The commit therefore solves the issue of several form view task titles
being restricted to 1 line while it can be annoying if the title is too
long. The autoresizeTextarea feature was moved from TextField to the
autoresizeTextarea hook and the autoresizeInput feature was moved from
the AutoresizeInput mail component to the autoresizeInput hook.
The TextField component has a new option for disabling linebreaks.

task-3138826

closes odoo/odoo#117355

Related: odoo/enterprise#39493
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-25 14:07:15 +02:00
Adesh Jolhe 1ec282f858 [IMP] project_timesheet_holidays, _*: bring ux improvements for project and timesheet app
*_= project, sale_timesheet,

The purpose of this commit is to improve the UX of the project and timesheet app
So in this commit done following changes:

- In the timesheet time off form view changes the label from
timesheet to timesheets
- In the timesheet list view added a 'no_open' option on the SOL field to
make not be clickable
- In project form view removed the 'quick' create option from the
user_id field
- In project task form view added a 'no_open' option on the SOL field to
make not be clickable

- Color of the Gantt and calendar views in project app
     My Tasks:
	the color used should be according to the personal stage set on the task.
     All tasks:
	the color used should be according to the project set on the task.
     When the user clicks on a project in the main view of Project app:
	the color used should be according to the stage.

task-3125942

closes odoo/odoo#111688

Related: odoo/enterprise#36615
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-19 11:00:49 +02:00
Bastien (bvdn) fd36b064e5 [FIX] project: change task sort > priority then state
closes odoo/odoo#118747

X-original-commit: 5ba3f75
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-17 15:18:57 +02:00
Kartik Chavda 89a7d47914 [IMP] project,hr_timesheet: make task list view consistant
Purpose of this commit have consistent list views between
project.task and the sub-tasks / blocked by o2m so that when
a change is done in one place it also impacts the other
places.

So, in this commit add/update sub-task and blocked by page list
views to make them identical.

task-3165202

closes odoo/odoo#112620

Related: odoo/enterprise#37055
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-13 16:40:00 +02:00
Kartik Chavda bb0bab2a3e [IMP] project: add default project group by on stage views
Purpose of this commit help the user identify which stage is linked
to what project, and what workflow each project has by grouping
them by project.

So, in this commit group the stage list and kanban view by project.

task-3165202

Part-of: odoo/odoo#112620
2023-04-13 16:39:59 +02:00
Kartik Chavda aaafc4de17 [IMP] project: add default group in view instead of action
Purpose of this commit to  avoid having a default group by that
would impact all views without distinction by using the new
attribute that was recently introduced for the list view.

So this commit add group the kanban and list views by stage by
using an attribute on list and kanban view instead of a default
group by in action.

task-3165202

Part-of: odoo/odoo#112620
2023-04-13 16:39:58 +02:00
kais-odoo 9b2c19b945 [IMP] project: improve generic UX of project
In this commit made following changes:
- added copy writing content in project form view for
  access_instruction_message field.

task-3067151

Part-of: odoo/odoo#106233
2023-04-11 11:33:29 +02:00
Kartik Chavda a457785920 [IMP] sale_project: improve generic UX
Purpose of this PR to do generic improvement.

So in this PR done following improvements:

- add context in partner fields in various places to display
customer partner first in selection of partner field.
task-3099758

closes odoo/odoo#107913

Related: odoo/enterprise#34950
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-11 09:21:00 +02:00
Bastien (bvdn) 0c2060eab9 [IMP] project, web: sort burndown chart legend
Before this commit:

- The burndown chart displayed the stage in order of the data fetching which wasn't logical especial for a chart that supposed to represent the evolution of the tasks in the project
- When sorting all/my tasks by stage, It was possible to select any project in any quickcreate of the stages which didn't make much sense

After this commit:

The burndown chart legend is now ordered according to the stage sequence (previously was ordered randomly by comming data)
Modified the burndownChartModel, simply makes a RPC to get the stages and sequences then sort the legend elements (one by stage) with it
Display only the projects which uses the stage in the dropdown menu of the task kanban quickcreate (when grouping by stage)

When sorting by all/my tasks by stage, the quickcreate now only display the projects which contains the stage selected
done by adding a domain in the quickcreate form
(shoutout to LTU and AUON who actually found the fix)

Task-3067445

closes odoo/odoo#105694

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-07 15:31:52 +02:00
Yashkumar Vaishnav 7266a546bb [FIX] project: fix broken layout in activity view
In this commit, we fixed the broken layout of task activity view.

task-3231708

closes odoo/odoo#116317

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-06 18:17:51 +02:00
damr 5ad0aa5c2a [IMP] project,web_form_project : add the handling of AAL for
project_profitability + change the name displayed in portal

This commit's purpose is to
- add the computation of the AAL for the project profitabity. If a the
analytic account of a project contains AAL that were manually added (
and thus not linked to any sol/purchase/etc ) those lines are not
computed in the 'other costs/other revenues section.

- to display the title of the ticket/task/project in the name of the page My ticket/My task/My project of the portal

task-2960753

closes odoo/odoo#106438

Related: odoo/enterprise#34344
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-06 17:20:44 +02:00
Adesh JolheandManisha Tulsiyani 23cf931808 [IMP] hr_,sale_(timesheet, project),purchase: generic improvements for the project
Purpose of the commit is to do the generic improvements for project.

So in this commit did the following changes:
 - adding a label 'last update' to the stat button in project form view.
 - indicate 'my project' in the tab instead of 'project sharing view in portal' in project sharing.
 - set the first non-folded stage of the project as default on newly created tasks.
 - remove user confirming the SO as the default project manager.
 - hide fields service_tracking, service_upsell_threshold if sale_ok is false.
 - set purchase_method to purchase by default if product is of service type.
 - remove the : next to the totals labels and decrease the font-size for values of 'total hours'
   and 'remaining hours' in timesheets notebook in project task form view.

task-2897867

closes odoo/odoo#96548

Related: odoo/enterprise#29774
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Manisha Tulsiyani <matu@odoo.com>
2023-04-04 11:01:59 +02:00
c5dd03ffee [FIX] project: review UX and UI in Project app
This commit reviews the UX and UI in Project app and improves the usability of the
new features recently added (subtasks list in kanban card, state field replacing
kanban_state field, etc).

The following changes are made in this commit:

- swap of user_id icon in the kanban box and the removal of the allow_unassign field and setting
- change the ordering of the fields in the subtask list
- make small layout changes in the project.task and project.project kanban cards
- remove the "lock-icon private" sub-title of private tasks, replace it with a
  little lock icon on the bottom right icons of the kanban card.
- remove the break tag in the project.task kanban card that was unecessary
  given the new display and margin style settings
- lock icon is bigger
- kanban icons are better aligned
- state is as big as avatar
- remove the 'remaining hours on SO' field
- deadline field will be optional and hidden by default in project.task list view
- remove the rating field
- add stage field as optional in project.task list views
- priority and state fields will no longer be optional
- stage_id will be copied when duplicating a task, except when the task is
  generated through the recurrence
- remove the tooltip of the tag_ids field
- When duplicating a task having sub-tasks, '(copy)' is no longer
  added to the name of the sub-tasks of this task.
- project.task kanban view:
  * (+ x tasks) mention next to the name is removed
  * The caret is replaced with 'fa-check-square-o x/y'
    which will represent the number of sub-tasks closed
    compared to the total number of sub-tasks
  * Only open subtasks are displayed
  * When changing the state of a sub-task to a closing one,
    the sub-task is muted and removed from the list on the view reload
  * The name of the parent task on the kanban card of sub-tasks is
    displayed except when viewing the sub-tasks of a particular task
    through the sub-tasks stat button
  * project.project kanban view: the fa-check-square-o icon of
    milestones is replaced with fa-flag-o
  * project.task kanban card: the fa-play and fa-pause icons
    are moved on the right of the remaining hours widge.
  * Allow users to edit the stage_id in batch from the list view of tasks
    if all of the selected tasks are part of the same project.
  * the state will have the same size as the avatar
  * change the opacity of the tasks that are closed
  * state is at the right of subtask list
  * the striked should be replaced by the opacity on the kanban card

Enterprise PR: odoo/enterprise#38132

Task-3229873

closes odoo/odoo#116628

X-original-commit: 09b5d5843096d27b5a4ab0f603ad44bdb2e74723
Related: odoo/upgrade#4478
Related: odoo/enterprise#38771
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Panagiotis Kyriakou <paky@odoo.com>
Co-authored-by: Bastien (bvdn) <bvdn@odoo.com>
2023-04-03 17:07:21 +02:00
Kartik Chavda f7ed7052fb [IMP] {sale_,}project: hide customer for non-billble project/task
Before this commit user able to see and add customers on non fsm and
non billable tasks/projects which is not provide any significance as
user don't need customer for normal tasks/projects.

So, in this commit hide customer field and also move partner phone
and city to field service app as it was only usefull for FSM project
and task.

task-3141350

closes odoo/odoo#111335

Related: odoo/upgrade#4274
Related: odoo/enterprise#36459
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-31 19:10:48 +02:00
Kartik Chavda 421537e67e [IMP] project: hide project related filter
Before this commit project field was hidden from views
open for specific project but search view still display
project related filter/groupBy and there is not point
displaying that if all tasks has same project set on
then.

This commit hide project related fielter/groupBy from
views open from specific project.

task-3141350

Part-of: odoo/odoo#111335
2023-03-31 19:10:47 +02:00
Kartik Chavda 96ca3680d9 [IMP] hr_timesheet: change allocated hours field label
Before this commit allocated hours field label on task has
to change allocated days when user change encoding unit.

This commit change label to allocated time that work for
both encodinging unit and we don't have to change label
depending upon encoding unit.

task-3141350

Part-of: odoo/odoo#111335
2023-03-31 19:10:47 +02:00
Vincent Larcin 317cf3b85e [FIX] project: fix task search views priority
Steps to reproduce
------------------
1. Install and open the Timesheets app.
2. Click on the "Start" button on the top left.
3. Click on "Select a Task" and then on "Search More..." to open the list view.
4. The associated search view is not the same as in the Project app.

Explanation
-----------
This occurs because the selected search view will be the one related to the model
with the lowest priority. Since we didn't define a priority for any of the views,
the view `view_task_search_form_base` is the one with the lowest default priority.
However, this is a base view created for inheritance purposes and not intended
to actually be used anywhere.

To solve this issue, this commit adds a very high priority to the base views,
and a low priority to the concrete views we want to be used in such cases.

Note that this unintended behavior is also present in versions below 16.1,
but in a non problematic way (only the project related filters are missing).

---

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

Task-3217905

closes odoo/odoo#117354

X-original-commit: e68bd3490ee609a82c2a0fb0d76c1e2502a2ffc0
Related: odoo/enterprise#39128
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-31 17:02:55 +02:00
hiroh-odoo 0e9498a345 [IMP] project,sale_timesheet: improve generic ux
Purpose of this commit is to improve the generic usage of the project app.

So in this commit done the following changes:
- add done task count field in milestone and display it in milestone form view
  stat button all tasks under this milestone and the done tasks of the milestone.
- rename 'project.project' form view field lable from 'Name of the tasks' to
  'Name of the Tasks'.
- add 'invoiced' column in the project update description under the sales section.
- remove helper for 'project.project' name field in form view.
- add a placeholder in the 'project.task' form view.

task-3073860

closes odoo/odoo#107076

Related: odoo/enterprise#34593
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-31 17:02:24 +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
Pratik Awasthi 87941198a5 [IMP] project: improve menu for my tasks and all tasks
Purpose:
- In the project, My Tasks and All Tasks menu are related to the task model so
 having two main menus for the same model which display almost the same
 thing would not be great for UI and it'll not look good if we add another menu
 in the future or via customer customization.

So in this Commit:
- We have added a menu named Tasks which has 2 sub-menus My Tasks and All Tasks
 which would be great to display tasks

task-3180910

closes odoo/odoo#113335

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 15:09:05 +02:00
Rohitkumar (roku) 21f9219dff [IMP] sale_(project),hr_timesheet: generic UX improvement for project
Purpose of this commit to improve generic usage of project app.

So in this commit done the following changes:
  - the sequence field should not be optional for project.task.type list view
  - move the fa-play icon next to the remaining hours widget in kanban view
  - add filter and separator for burndown chart search view
  - transform the 'milestones' stat button into 'x Milestones /n y Reached
  - change the recurrence banner
  - add the placeholder for the label_tasks field 'e.g. Tasks'

task-2947481

closes odoo/odoo#99528

Related: odoo/upgrade#3872
Related: odoo/enterprise#31047
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 15:08:56 +02:00
Rohitkumar (roku) 587f250858 [IMP] project,(hr,sale)_timesheet: generic improvements for project app
Purpose of the commit is to do the generic improvements for project.

So in this commit did the following changes:
- add a space between 'access to:' and the name of the course in SOL nameget.
- hide the 'remaining hours' value if the nb of 'initially planned hours' is
  equal to 0 in task list view.
- hide the 'initially planned hours' and 'hours spent' values if they are equal
  to 0 in task list view.
- hide the 'milestone' and 'assignees' fields if they are false task calendar
  popover
- hide the 'remaining hours on SO' value if there is no SOL set on the task
  list view
- use the progressbar widget for the progress field update list view

task-2949984

closes odoo/odoo#112265

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-29 23:36:44 +02:00
Victor Piryns (pivi) c0ae3e70e1 [FIX] project: search view for activities on tasks should be correct
Current behaviour:
When checking on the activities that are "Late/Today/Future", the
resulting search view doesn't apply any filter.

Expected behaviour:
If you click on "Late" activities for Tasks, then you should see
only the "Late" activities, not all of them.

Steps to reproduce:
- Install Project
- Create a project and 3 tasks for that project
- On each task, put an activity that is "Late"/"Today"/"Future"
  respectively (1 activity per task)
- Click on the activity widget (top-right in the header) > Tasks > Today
- All tasks are shown, not only those for "Today"

Reason for the problem:
Since the view refactoring from
b77f60b , search filters follow an
hierarchy of inheritance to reduce code duplication. The issue is
that it's "delegation" inheritance (so the childs have a mode of
type "primary") but all their priorities are the sames, so the
algorithm for view matching (refer to documentation) matches the
parent view, that doesn't contains the necessary filters for the
activities, which are defined a few level lower in the inheritance.

Fix:
Add descending priority in the inheritance chain so we match the
lowest child when web-client requests the search view.

Affected versions:
- saas-16.1
- saas-16.2
- master

opw-3234525

closes odoo/odoo#116337

X-original-commit: 609f484
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-24 07:45:04 +01:00
Xavier Bol (xbo) 58183d47e7 [IMP] project: do not display private on project if task is subtask
Before this commit, since the display_project_id field has been removed and
the project_id field could be unset on subtasks (default value as the
`display_project_id` field), the widget `project_private_task` consider
a task as private if the task has no project_id set.

This commit changes the widget to check if `is_private` field is true
to display the `Private` on `project_id` field value.

task-3230063

X-original-commit: b0a8a9aedb3b5cfb2acb6ff3b10a77c279bda8fd
Part-of: odoo/odoo#115781
2023-03-24 02:23:37 +01:00
Xavier Bol (xbo) de7d0b17c5 [IMP] {sale_}project,{hr_,sale_}timesheet: remove display_project_id field
Before this commit, the `display_project_id` field was a bit confusing
for the user to know what is the goal of this field. Also this field is
available when the user wants to import his data into Odoo, if he does not
know the goal of this field then he could be lost to know which field he
should for his data to import (or even export).

This commit removes the display_project_id field and so a task will be
private one if the project and the parent fields are not set. The
project to set to the timesheet will be the one set on the task or the
one set on one of its parent tasks.

task-3230063

X-original-commit: 22eda5a5ddcfcda9fa6597d6fe21eb20f525799f
Part-of: odoo/odoo#115781
2023-03-24 02:23:37 +01:00
Audric Onockx (auon) 859156905c [MOV] project: create a separate file per model (views and models)
In this commit, delete the part of each file
that is not related to its model.

task-3234479

closes odoo/odoo#115694

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-22 14:52:10 +01:00
Audric Onockx (auon) 335579325f [MOV] project: create a separate file per model (views and models)
In this commit, we just copy/move the files.

task-3234479

Part-of: odoo/odoo#115694
2023-03-22 14:52:09 +01:00
Yannick Tivisse dcbdb6e690 [IMP] project: Remove commercial_partner_id from task/project model
closes odoo/odoo#115155

Taskid: 3231143
Related: odoo/enterprise#38142
Related: odoo/upgrade#4432
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-17 13:43:14 +01:00
Yannick Tivisse c002e4176a [IMP] project: Remove project_color field
Taskid: 3231143
Part-of: odoo/odoo#115155
2023-03-17 13:43:14 +01: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
Romain Estievenart a041a5f2ee [IMP] project: display the widget m2o/m_avatar_user on user_id (kanban)
Remove the existing t-if on m2o_avatar_user/m2m_avatar_user widget
on user_id field in"project.project.kanban" view to allow quick-assign.

closes odoo/odoo#114400

Task-id: 3121207
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-10 17:54:57 +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
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00
Vincent Larcin 055cc1a0f0 [FIX] project: move property fields to the correct task search view
Property fields introduced in https://github.com/odoo/odoo/pull/112005
were added to the Project tasks search views, but not in the right view
according to the views inheritance rules introduced in https://github.com/odoo/odoo/pull/106015.

This commit moves them to the correct search view.

closes odoo/odoo#114647

Enterprise: https://github.com/odoo/enterprise/pull/37899
Related: odoo/enterprise#37899
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-08 13:48:57 +01:00
Vincent Larcin fc52ee2530 [FIX] project: move property fields to the end of the list view
The property fields introduced in the project.task list view
in https://github.com/odoo/odoo/pull/112005 appear in the middle
of normal fields in the column order.

This commit moves them so they are always at the end instead.

Enterprise: https://github.com/odoo/enterprise/pull/37899
Part-of: odoo/odoo#114647
2023-03-08 13:48:57 +01:00
Abderraouf Ghrissi (abgh) c28063baee [IMP] project: add task quick create shortcuts
In this commit,
-We Ease the quick creation of tasks by providing shortcuts allowing the user
to set different fields (planned_hours, tags, priority, and assign to users)
without opening the form view.

task-3145203

closes odoo/odoo#112821

Related: odoo/enterprise#37166
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-07 20:31:53 +01:00