Commit Graph
6606 Commits
Author SHA1 Message Date
Panagiotis Kyriakou 577bdbcd87 [FIX] project: revert current stage notification
This commit reverts a previous commit which allowed to
display the current stage when the state is changed.

The reverted PR: https://github.com/odoo/odoo/pull/119925

The reversion was done as what was implemented does not
follow the standard display of tracking messages and
because it doesn't look good in the chatter.

Task-3336184

closes odoo/odoo#123797

X-original-commit: eff511140175ba8224c2f9be59a798a3e1dee6da
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-06 08:06:05 +02:00
Kartik Chavda f7037c3515 [IMP] portal,project: reduce the size of the wizard dialog in project
In this commit, in this commit, We have changed the size of wizard
dialog to medium instead of large.

task-3259212

closes odoo/odoo#120211

Related: odoo/enterprise#40577
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-06 08:05:50 +02:00
Adesh Jolhe 57f95e1a17 [IMP] sale_(project,hr)_timesheet: bring generic improvements for project
The purpose of this PR is to improve the generic usage of the project app.

So in this PR done following changes:
 - switched Sales Orders button and planning, document button from their place in
   the project kanban card burger menu
 - In milestone form view added decoration-danger on quantity % if it is equal
   to 0 and there is an SOL set
 - On milestone creation the SOL of the project set default if it is of
   milestone type
 - In the product form view Uom is set as 'hours' if the service is either
   prepaid or invoiced based on timesheets.
- In project.milestone list view changed quantity_percentage label to
   to Quantity(%).
- Added product_uom_qty field in project.milestone list view .
 - In project.sharing improved remaining hours widget now only the frame is
   displayed in orange/red, not the background (as in the back-end)
 - project.update right-side panel added the ref of the SO in the nameget
   of the SOL
 - In project.update right-side panel added Confirmation when trying to delete
   a milestone
 - Reduced the size of project and task sharing wizard

task-2989828

closes odoo/odoo#106284

Related: odoo/upgrade#4198
Related: odoo/enterprise#34322
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-05 13:31:01 +02:00
Raouf a35e8fb67a [IMP] project: improve ux
Before this commit:
- When a project is created on SO confirmation,
the new project (assuming there is no project template
set on the product) is added with one stage with name=New
- When portal users drag & drop columns from the kanban view
of project.task, an access rights error is displayed.

After this commit:
- When a project is created on SO confirmation,
set the following stages for the new project
(assuming there is no project template set on the product):
to do - in progress - done (folded) - canceled (folded).
- Disable dragging and dropping project tasks for portal
user.

task-2929871

closes odoo/odoo#97220

Related: odoo/enterprise#29911
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-05 13:30:52 +02:00
Audric Onockx (auon) 8aed28bafb [FIX] project: make _get_subtasks_recursively actually recursive
Previous commit (https://github.com/odoo/odoo/pull/116570) renamed
this method _get_subtasks_recursively.
But instead of calling itself in the return statment, the
method _get_all_subtasks was called resulting in a non-recursive
function and to potential undesired behavior as _get_all_subtasks calls
_get_subtask_ids_per_task_id that calls _get_subtasks_recursively in
some cases.

With this commit, we just call _get_subtasks_recursively on the children
to make it actually recursive, like it was in the first place.

closes odoo/odoo#123149

X-original-commit: 3a6f5e4d8eddaa4effbf96d8b59d47afc0ee9503
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
2023-06-01 14:25:48 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Julien Carion (juca)andVincent Larcin 52b483e6f8 [FIX] project,web: fix readonly in list view cells
This commit changes how automatic readonly props are applied to list
fields so that it doesn't override the getFieldProps method

It also fixes the method 'getCellReadonly' in ProjectTaskListRenderer,
which was renamed to 'isCellReadonly' in the framework but not in the custom renderer.

Task-3340379

closes odoo/odoo#123026

X-original-commit: da3b2421b3f851629d5d287223b7ef581a30a5ab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
Co-authored-by: Vincent Larcin <vila@odoo.com>
2023-05-31 13:08:26 +02:00
Damien Raquet 76a6a0d2ec [IMP] sale_project: allow the creation of new records from the SO
view

The goal of these changes is to make it easier for the user to manage
their SO. They can create new tickets/timesheets/etc without being
forced to leave the application to open the one they need, nor do they
need to manually link the new record to the SO

task-2954409

closes odoo/odoo#100300

Related: odoo/enterprise#31391
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-30 19:09:53 +02:00
Damien Bouvy fa50fb9277 [FIX] project: alignment issue
X-original-commit: 43cf1e63e757ffab84fd411a210281b49fd3a0d9
Part-of: odoo/odoo#122111
2023-05-23 22:32:45 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Brieuc-brd ee75969979 [IMP] *: app icons: replace svg to png
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.

task-3326633
Part of task-3326263

X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
2023-05-22 13:54:07 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Odoo's Mergebot e072e45ca4 [MERGE] project_todo, *: replace Notes with To-do
- Impacted modules:
    - project_todo (new module)
    - note (deleted module)
    - project
    - mail (test adaptation)
    - test_discuss_full (test adaptation)

- Changes summary: The application Notes is removed and replaced by a
new app To-do. This new app is based on the model project.task and other
related models, allowing to have a nice link with project. To-dos are
actually private task that are displayed in both Project and To-do
app. The reason why To-do could be used is that it introduces clean
views and simplified widgets to work on these tasks/to-dos.

- Commits description:
    - ***[ADD] todo, note,...: replace Notes with To-do***: Deprecation
    of Notes and create of To-do (module project_todo). The model
    project.task is slightly modified to be able to be used in the
    module project_todo (mainly security and personal stages management
    methods). Views and activities are adapted to the new model.
    - ***[IMP] todo: make the name of a to-do editable from the
    breadcrumbs***: The name of a To-do is made editable directly in the
    breadcrumbs.
    - ***[IMP] todo: add conversion form for todo->task***: A new action
    is introduced in To-do to be able to convert a to-do to a task in a
    project.
    - ***[IMP] todo,...: add an onboarding to-do***:  An onboarding to-do
    is added to describe the functionalities of the new app to the
    users.
    - ***[IMP] project: avoid to add OdooBot as default assignee on
    tasks***: Improvement of the UX for both Project and To-do.
    - ***[IMP] todo: integrate mark as done in To-do app***: This commit
    introduces a new widget in To-do that can be used to set a to-do as
    done. This widget used the new states recently introduced in Project
    but present them in a simplified binary value in To-do.
    - ***[MOV] project_todo: rename module todo to project_todo***:
    Technical renaming to avoid confusion.
    - ***[REM] note,...: remove module note***: Removing of module note.

task-3085077

closes odoo/odoo#115390

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-16 20:33:11 +02:00
Mathieu Duckerts-Antoine 5304d8fc64 [REF] *: remove legacy search models/components
There is no action that uses the search models/components available in
the legacy control panel. We remove those.

closes odoo/odoo#121433

Related: odoo/enterprise#41078
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-05-16 15:55:24 +02:00
Thibault Delavallée 23bbd8860b [REF] portal(_rating): make portal message_format standalone
RATIONALE

Purpose of this change to rewrite the formatting done on messages displayed
on simple frontend i.e. portal chatter widget and project chatter.

We stop calling 'message_format' which computes a lot of unnecessary data
and sends too much information to frontend. We choose to instead manually
handcraft the returned data, already tailored for frontend widget.

SPECIFICATIONS

Remove call to '_message_format' in 'portal_message_format'. Instead have
a list of properties (fields or computation based on fields e.g. rating publisher
information) that can be overridden in sub-addons. Use those to generate
the data used by frontend chatter widget.

Remove extra formatting or data computation done in JS files. Do it directly
in 'portal_message_format' in order to have clean information sent.

This change targets mainly portal and portal_rating. Making those modules
Independent from backend message formatting allows to save queries and
also to avoid sending useless information to the frontend.

Task-3322905

Part-of: odoo/odoo#121104
2023-05-16 15:55:17 +02:00
Kartik Chavda b51c5e317c [FIX] project: make tasks action from project consistant
Before this commit task action from kanban click and from
stat button does not have same behavior like kanban click
does show archive task for archive project and does not
display New button while other on does not.

This commit make both action consistance to have same
behavior in both actions.

task-3224627

closes odoo/odoo#121473

X-original-commit: c95278e78325aa3831f6bfb02a7f3e377d0a8028
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-16 14:42:14 +02:00
Xavier Bol (xbo) eb51266d11 [FIX] project: changes icon of Changes Requested state option
Before this commit, when the user is colorblind and sees the kanban
view of project.task, he cannot see the difference between
`Changes Requested` and `Approved` options and so he has to
alternatively open the form view to make sure that they are reading
it right because no check mark appeared in the dropdown to know
the current option selected.

This commit changes the icon of `Changes Requested` state option and
also adds the check mark in the dropdown options of the state field
to show which option is the current one.

task-3287326

closes odoo/odoo#121427

X-original-commit: 5e477356d2498cb0692f869053531082b4e7618f
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-16 13:37:32 +02:00
Panagiotis Kyriakou f2c1472f0f [IMP] make the kanban subtask button clickable everywhere
This commit button makes the kanban substack button
clickable everywhere - both in the icon and the x/y
indication next to it.

Additionally, this commit also makes it that the tooltip
on hover is shown when the user hovers over both the icon
and the x/y indication.

Task-3284498

closes odoo/odoo#119468

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-15 11:41:16 +02:00
Hugo Carlier (Huca) 08ecf62d0c [IMP] project: avoid to add OdooBot as default assignee on tasks
During the creation of a private task (model project.task with not
project_id set), the current user is added as assignee. For all the demo
data, OdooBot is therefore added as a default assignee. This commit
avoid this situation by performing a check on user id at creation of a
private task.

task-3085077
2023-05-15 09:01:27 +02:00
Hugo Carlier (Huca) bc8332808f [ADD] todo, note, *: replace Notes with To-do
- Impacted modules:
    - todo (new module)
    - note (deprecated app)
    - project
    - test_discuss_full (adding a dependency)

- Main changes:
    - The Notes app is deprecated
    - A To-do app is created to replace it
    - The To-do app uses the model project.task (from module project)
      for to-dos. To-dos are equivalent to private tasks (tasks without
      project) with no parent task set.
    - Private tasks/to-dos can either be displayed in the My Tasks menu
      of the Project app or in the To-do app that proposes simplified
      views to edit them.

- Details:
    - depracation of Notes: Before the module note can be fully removed,
      some changes still need to be done in other modules that use its
      models (mainly note.note model). This commit deprecate the Notes
      app in the meantime by removing it from the main menu/dashboard
      and by replacing the creation of notes directly from the systray
      by the creation of private tasks (to-dos).
    - activity: In the systray, it is currently not possible to
      segregate records using the same model. Therefore to-dos will
      appear in the task section. This will change in the future when
      this possibility will be implemented in mail.
    - name generation: When edited from To-do, a name is auto-genrated
      for private tasks. This behavior is similar to the one existing in
      notes with a few adaptation to Todo UX. When a to-do is untitled
      and saved (through the save button or when leaving the form view),
      a name is generated based on the first line of the description of
      this to-do. If the generated name is longer than 100 characters it
      is truncated.
    - security:
        - project.task model need to be accessible in all crud modes to
          all internal users as it is used in the to-do module. This is
          a big change compared to the previous behavior where only
          project users could edit tasks.
        - project.tags model access is way more permisive now. All users
          have access to edition/delition of tags as they are use in the
          to-do app.
        - Record rules: A similar behavior as the current one is
          implemented, i.e:
            - project users can access all tasks (with edition rights)
              verifying one of the following conditions:
                - they follow the task
                - they follow the project the task belongs to
                - they are assigned to the task
                - the project the task belongs to is accessible for all
                  internal users.
            - internal users have only read-access to the non-private
              tasks shared with them.
        - Those changes related to security only occurs when the app
          To-do is installed. When it is note, the current behavior of
          Project security-wise is kept unchanged.

Note on this last point: As the write access of internal users to
project.task is now managed with record rules, the form of this model
won't be displayed in read-only anymore when To-do is installed. This
will results in access error message for the tasks for which the write
access is restricted. Unfortunatelly, there is no better solution at the
moment as neither restricted read access, nor extendent write access for
internal users are desired. An improvement of the framework to deal with
such situation could be benificial.

task-3085077
2023-05-15 09:01:27 +02:00
Elisabeth Dickinson 45b9e04db4 [IMP] *: status buttons fix
Part-of: odoo/odoo#116641
2023-05-12 22:59:23 +02:00
Pierre Paridans eef262abf4 [FIX] *: adapt QUnit tests and tours
[FIX] *: selectors in tours

[FIX][TMP] account: CogMenu selector in tours

[FIX][TMP] web*: Breadcrumb targetting in tours

Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).

add classname on last breadcrumb item

[FIX][TMP] project: View buttons selector in tours (moved away from CP)

[FIX][TMP] project: Kanban selectors in tours (quick create)

[FIX][TMP] *: SearchBar selectors in tours (toggle menu)

[FIX][TMP] *: ButtonBox selector in tours

[WIP][IMP] web: add toggleSearchBarMenu in search helpers

adapt and unskip 3 list tests

adapt and unskip calendar tests

unskip web_tour test that actually pass

post rebase fix

allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later

post rebase fixes

fix

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
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
Brieuc-brd 8a2875bb38 [IMP] delivery, sale_loyalty, project: adapt for milk
This commit adapts the spacing between the buttons in the
sale_order_views to fit with Milk.

project: layout fixes:
- Fixed kog displaying on top of the project status button
- Fixed the flickering in project updates when selecting rows in list
view

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:21 +02:00
Pierre Paridans caef16ee4e [REF] web,*: ControlPanel layout
This commit brings the ControlPanel into a single line with 3 main
sections:
- buttons & breadcrumb
- layout related actions (ie. the SearchBar in multirecord view or
  ButtonBox in formView)
- navigation (pager, switch view...)

Add new search bar menu, this is a merge of the following components
into one big component display in column:
* comparison_menu
* favorite_menu
* filter_menu
* group_by_menu

Also adapt navigation hook.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +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
Antoine (anso) fabf9e9703 [FIX] hr_{recruitment,skills},mass_mailing,project,note: milk adaptations
hr_recruitment: switch smart button value and label
- Switching applicant's name with "Employee" label to be consistent with
  the rest of smart button's format

mass_mailing: adapt status bar layout
- Removed excessive margin between the status bar and the content
- Added no padding between status bar and the control panel
- Removed a useless border before the status
- Improved margin between alert and buttons

project: right side panel stats buttons alignment

hr_skills: fix `::before` alignment

== ISSUE ==

Before this commit, the :before line in Employee resume is not aligned
with the dots. This is due to the fact that the variable
$o-hrs-timeline-entry-padding used in the mixin isn't the right value we
should use.

There was also an issue with responsive.

== After this commit ==

We now use a calc, which process the half of the circle plus the padding
minus the border-width. The $o-horizontal-padding is the variable used
to define the padding of the line inside the form view.

We adapt this in a smaller media query since the $o-horizontal-padding
value is different.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
stefanorigano (SRI) f951b72716 [REF] web: inputs, dropdown, popover, tooltips design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:13 +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
stefanorigano (SRI) 24e89badac [REF] web,project,hr_holidays: buttons design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
stefanorigano (SRI) 589f6954dc [REF] web, mail, project, website_slides: backend bootstrap review
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
Xavier Bol (xbo) 96c11f3e9c [FIX] project: avoid autofocus the state field
Before this commit, when the user goes to the form view of a task
and when to add a subtask into it. When he clicks on `Add a line`
on the subtree view of subtasks the state field is focused because
it is the first field focusable in that list view.

This commit removes the state field in focusable elements to directly
focus the next focusable element who is the name field.

task-3248592

Part-of: odoo/odoo#120508
2023-05-12 19:54:49 +02:00
Xavier Bol (xbo) 45376e4b11 [FIX] project: translate additional text in name_with_subtask_count widget
Before this commit, the additional text added next to the task name
when `name_with_subtask_count` widget is used on the task name field
was not translated.

This commit correctly translates the additional text added in that widget
by moving the text defined in JS code into the template of that widget.

task-3248592

Part-of: odoo/odoo#120508
2023-05-12 19:54:49 +02:00
Xavier Bol (xbo) 93b90a3ff3 [IMP] project: update closed_subtask_count when state of subtask changed
Before this commit, when the user displays the subtasks list on a kanban
card and change the state of a subtask to set to Done then the
`closed_subtask_count` field does not changed in the kanban card.

This commit updates the `closed_subtask_count` when the subtask will
be closed or opened on the subtask list displayed in the kanban card.
Also, the `this.props.record.activeFields` is no longer used to fill in
the activeFields of Record component because the `activeFields` will
change in the future.

task-3248592

Part-of: odoo/odoo#120508
2023-05-12 19:54:49 +02:00
Bastien (bvdn) 3e6821e215 [FIX] project: sort kanban header/renderer functions
the deleteGroup method in the header opens the confirmation dialog then calls the kanbanrenderer deleteGroup method so no need to override it
the editGroup canEditGroup and canDeleteGroup methods must be placed and overrided in the kanbanHeader
as well as the onWillStart the sets the this.isProjectManager, which will be used in the canEditGroup
the canCreateGroup and isProjectTasksContext should stay in the renderer

Task-3276463

closes odoo/odoo#119096

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-12 19:54:40 +02:00
Bastien (bvdn) 1b35c5eb3d [FIX] project: change personal stage edit display
in the edit stage of the personal stage we should only display the name of the stage and the folded bool

Task-3276463

Part-of: odoo/odoo#119096
2023-05-12 19:54:40 +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
Xavier Bol (xbo) 5b2d1d846a [FIX] project: display the current stage when the state is changed
Before this commit, when the user changes the state, the followers
receive a notification about this change. Since the label of the
state is no longer customize by stage, the followers cannot know
in which stage the task is before clicking on the link to go to
the task form view. And so, if one of those followers has to
check the task in a specific, he has to click on the link in
the notification to know in which stage the task is.

This commit fixes the issue by adding the curent stage in the
notification to inform the user who received the notification
in which stage the task is when the state has been changed.

task-3284597

closes odoo/odoo#120959

X-original-commit: d78c79d9a9f8ac108251c57c732cfb5b71b53fd5
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-10 16:37:11 +02:00
luvi 9575aba9ca [IMP] mail, *: add hover title to the activity button
*: project, web

This commit adds the title and aria-label attributes to the activity
button. This makes the hover display the summary or an explaination
about the button, especially when there is no text displayed next to
the button (in Kanban view).

In the state selection field, a title has been added when hovering
the state in kanban, allowing to see the current value. The project
task state selection has also been adapted to have that title attribute
set on the toggler.

task-3207639

closes odoo/odoo#120871

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-10 16:36:45 +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
Pratik Awasthi 918a6a524b [FIX] project: fix project tour tip on schedule activity
Steps:
- install project
- run project tour

Issue:
- tip on schedule activity was not visible

Cause:
- position for tip not given

Fix:
- position bottom given

task-3266724

closes odoo/odoo#118575

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-08 10:39:56 +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
b5794e89e1 [IMP] web: Owl DateTimePicker
This commit introduces a date picker OWL component meant to handle the
following use-cases:
- date picker
- date & time picker
- date range picker
- date & time range picker

Basically, this component is the union of the two previous third-party
libraries handling these cases: TempusDominus and DateRangePicker.

New components introduced:

* The main addition of this commit is the `DateTimePicker` itself which
handles the display and interactions of the calendar and time pickers.
> see @web/core/datetime/datetime_picker

* The picker can then be coupled to an input using the
`useDateTimePicker` hook. The purpose of this hook is to handle events
on a given input element and syncronize its value to a date picker it
will spawn in a popover.
> see @web/core/datetime/datetime_hook

* Lastly, a simple `DateTimeInput` component will render an input and
call the hook mentioned above to handle it. This component is
effectively replacing the previous DatePicker and DateTimePicker
components (note that it does not handle range values).
> see @web/core/datetime/datetime_input

Another noticeable change of this commit is the definition of daterange
fields in views:

- Previously, the arch would have to define both fields
and bind them via their options, while also adding an arrow between
inputs or other forms of connection.

- In the new implementation, only the start date field must be declared,
and a date range can be spawned by providing an `end_date_field` in its
options.

Example:
```xml
<field
    name="start_datetime"
    widget="daterange"
    options="{'end_date_field': 'end_datetime'}"
/>
```

warning Added limitations:

- this new way of declaring date ranges means that templates have been
revised to declare one field tag instead of two. This means that list
views using date ranges have lost the ability to be sorted on their end
date fields.

> Justification: the current use cases have been reviewed and it has
been decided that it was not needed to sort on the end date on the
affected list views.

> Workaround: drop the date range and declare both fields as simple date
pickers (i.e. without the end_date_field option).

- all modifiers applied to a field using a date range will be copied and
applied to the end date field. There is no way to define modifiers
specific to one field or the other.

> Justification: there was no use case where one of the two fields
needed specific modifiers.

> Workaround: same as the previous point: split the range into 2 simple
date picker fields.

Additional notes:

- the widget="daterange" is not mandatory in form views, but is required
in list views because only fields with explicit widgets will not be
rendered as simple <span> elements. The date range feature will be
available as soon as an end_date_field is specified.

- as the end date field is not explicitly defined in the view anymore,
any modifier depending on it need to have it defined as invisible
somewhere in the arch.

Task ID: 3121497

Part-of: odoo/odoo#112171
Co-authored-by: Julien Carion <juca@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Pierre Pulinckx <pipu@odoo.com>
2023-05-05 13:52:22 +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
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
Victor Piryns (pivi) d0e55f082b [FIX] project: correct pager of project portal view
Current behaviour:
If a project has more than 80 tasks, there is pagination activated
in the project portal view. But when clicking on the second page, we
are requested to login, even when we come from a shared link.

Expected behaviour:
You should be able to scroll through the pages of tasks related to
the shared project without being requested to login.

Steps to reproduce:
- Install Project
- Create 100+ tasks in 1 project
- Copy the share link of that project.
- Log out, open the shared link.
- Go to page 2 of the tasks -> login request.

Reason for the problem:
Missing `access_token` in the pager urls to browse through the tasks.

Fix:
Add the `access_token` as url argument in the links when creating
the pager for the portal view.

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

opw-3220659

closes odoo/odoo#120546

X-original-commit: 87b3f6d865cddb91def5af2603c44e8e2a68b04c
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-05-04 23:30:52 +02:00