Commit Graph
6385 Commits
Author SHA1 Message Date
MerlinGuillaume ed2a9c3a78 [FIX] project: recurring dates of monthly repeated task until date
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

closes odoo/odoo#107910

X-original-commit: 236b383fd9d1ad6a5d39d8c4232b49864ec19b37
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-12-14 07:49:06 +01:00
Bastien (bvdn) 65893b50fa [IMP] project: change stage_display string in 'My/All Tasks' list view
Small fixup for already merged PR: 103318
stage_display column should have 'Stage' as a header, not 'Stage Display'
added the stage_display field to 'All Tasks' list view

Task-3024152

closes odoo/odoo#107407

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-08 18:00:18 +01:00
FrancoisGe 96e158a8b8 [REF] web: simplify customizations of static menu actions
There are several customizations of the list and form view that consist
in modifying the behavior of a static menu action (archive, unarchive,
export, delete, duplicate). We have seen that this one is very complex.
So we decided to simplify it.

Solution:
Add the getStaticActionMenuItems API point. This allows us to easily
modify the behaviour of static actions.

We also took advantage of this commit to simplify the ActionMenu api.
We have removed the other actions because it was not clear enough.
They are directly added in the action category.

closes odoo/odoo#107086

Taskid: 3089039
Related: odoo/enterprise#34598
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-06 17:11:53 +01:00
Thomas Lefebvre (thle) b755975372 [FIX] project: calculate recurring tasks with interval
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

closes odoo/odoo#107320

X-original-commit: 5d44d7d595dab866695945e5a6d2091ddd9df342
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-12-06 15:32:58 +01:00
niyasraphy 9a976a8c9a [FIX] various: uniquify the the !
Just change double the by single. This fixes various typos in error and
code comments.

closes odoo/odoo#107266

X-original-commit: 09dfedfc19c2bc34c2bb394dcc4bc609c5ac0107
Related: odoo/enterprise#34681
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-06 10:52:50 +01:00
Kartik Chavda f1257c8e1b [FIX] project: fix width of chatter in fontend
This commit make chatter width same as form sheet in project
sharing form view.

task-3018123

X-original-commit: https://github.com/odoo/odoo/commit/bb27fde366c41123057a6080e949e384b981d84c
Part-of: odoo/odoo#106956
2022-12-06 10:52:17 +01:00
Hugo Carlier (Huca) 52c53a0210 [IMP] hr_timesheet, project: Modify timesheet info display in project.task form view
- project.task form view:
    - move the tag_ids field below the user_ids one
    - move the 'allocated hours' field above the 'deadline' one
        - remove the 'progress' field and indicate (x%) next to
        'allocated hours' instead
        - the final output should look something like
    - 10:00 (incl. 05:00 on Subtasks) (50%)
    - the timesheets o2m takes the whole width of the notebook

task-3046210

closes odoo/odoo#104677

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-02 19:49:57 +01:00
Hugo Carlier (Huca) dd4168e3d8 [IMP] project: make task description editable for portal users
A portal user who has access to a project can edit tasks description.

task-3046210

Part-of: odoo/odoo#104677
2022-12-02 19:49:56 +01:00
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +01:00
Aaron Bohy 4c5b867ff6 [IMP] web,*: control form and kanban rendering context
Before this commit, the rendering context of kanban and form views
was the instance of the KanbanRecord and FormRenderer, respectively.
As a consequence, a lot of implementation details (e.g. "props",
"__owl__", any Class method...) were available. This wasn't what
we want.

The door being left open, people went through, and in 16.0, several
kanban and form archs contain(ed) such use of undesired "features".

With this commit, we restrict the rendering context of those two
views. In kanban views, it contains what has been historically
available (e.g. "record", "widget", "kanban_color"...). In form
views, nothing is available since the only dynamic part in those
archs is the attrs, which aren't evaluated by the rendering engine.

To do that, we use `t-call-context` owl directive. When using this
directive, the rendering context is the given one, + `this`. So the
component instance is still available, but through the `this`
keyword. We can thus use it in our compilers, to make them work as
before. Note that `this` can never be used in an arch directly.

Task 3085357

closes odoo/odoo#106045

Related: odoo/enterprise#34493
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-12-02 11:37:48 +01:00
kais-odoo 42a371fc9d [FIX] project: fix the missing progress bar in project sharing view
Before this commit, the progress bar was missing since the progress bar CSS
wasn't loaded to the project sharing webclient.

So in this commit, the progress bar CSS path has been added to the manifest file
for the project web client.

task-3014420

X-original-commit: 84caa0bb2f8a3095c4b98b35ab72f85fd456943a
Part-of: odoo/odoo#106815
2022-11-30 15:06:13 +01:00
Hugo Carlier (Huca) fb13d7c99e [IMP] project, hr_timesheet: improve UX
- Description:
    - project: Apply default filters when selecting a 'blocked by'
    task in task form (project.task form view > blocked by notebook >
    add a line > apply a default filter on the current project and on
    open tasks)
    - project, hr_timesheet: uniformize remaining hours display in
    kanban view for tasks and projects (project.project kanban view:
    add a frame around remaining hours. The color of the frame follows
    the same rules as the one used in project.task kanban view)

task-3034806

closes odoo/odoo#104250

Related: odoo/enterprise#33309
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-28 14:50:50 +01:00
Rohitkumar (roku) f7f3d9610b [IMP] sale_(project): improve the UX for project app
Purpose of this commit to improve generic usage of project app.

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

task-2917086

closes odoo/odoo#97669

Related: odoo/upgrade#3893
Related: odoo/enterprise#30195
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-25 17:55:56 +01:00
Denis Ledoux 141852dc66 [IMP] mail: hide Unread messages filter for email notification users
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

closes odoo/odoo#104328

Related: odoo/enterprise#33338
Related: odoo/upgrade#3996
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-11-24 12:26:01 +01:00
Rohitkumar (roku) 095efcd65c [IMP] project,sale,hr(_timesheet): improve the UX for project
Purpose of this commit to improve generic usage of project app.

So in this commit done following changes:
 - rename 'total hours' into 'total hours spent' (or 'total days spent' if the
   timesheet encoding  unit is in days) for project.task
 - timesheets (billed on timesheets) section > group the graph view by
   invoice > employee
 - add default action project update > profitability> timesheets
   (billed on timesheets) section > group the grid view by
   invoice > employee (display sections)
 - add default  the 'timesheet costs' measure in pivot view
 - display 'hours remaining' in red if the number is negative for project.task
   form view
 - display the 'week' scale by default in the grid view

task-2819458

closes odoo/odoo#90270

Related: odoo/enterprise#26795
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-23 15:13:50 +01:00
Kartik Chavda 279856fb49 [FIX] project: fix layout of project share wizard
This commit fix layout of project sharing wizard.

task-3032518

closes odoo/odoo#104728

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-23 13:24:48 +01:00
Raouf f9242db25f [IMP] project: change kanban_state to normal when changing task project_id
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

closes odoo/odoo#91174

Related: odoo/upgrade#3523
Related: odoo/enterprise#27287
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-18 15:00:53 +01:00
Raouf 5c555995ee [IMP] project: prevent sending of emails when duplicating project or task
After this commit:
- When duplicating project or task, assignment notifications and emails on stages are not sent

task-2849291

Part-of: odoo/odoo#91174
2022-11-18 15:00:52 +01:00
Raouf f15c9811c9 [IMP] project: create subtask with same followers than parent task
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
2022-11-18 15:00:52 +01:00
Manisha Tulsiyani 2e513973d7 [IMP] (sale_)project,timesheet: improve the UX for project app
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

closes odoo/odoo#97870

Related: odoo/enterprise#30268
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-17 10:57:07 +01:00
Xavier BOL (xbo) 9971d1e98d [FIX] project: correctly delete the personal stage group in kanban view
Before this commit, when the user removes a personal stage in Project
app and this personal stage has some tasks, the kanban model will reload
the data instead of delete the group. However, since the
`default_group_by` is personal stages then the group deleted stays
visible in the UI even if it is deleted for the backend side.

This commit flags the group deleted to avoid readd the empty group
when the reload is done to correctly remove the group in the UI.

task-2968326

closes odoo/odoo#105801

X-original-commit: ad5a569b6ee50cc2c643975b52f23b9df385b753
Related: odoo/enterprise#33967
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-15 19:22:13 +01:00
Xavier BOL (xbo) 927d6b9ae7 [FIX] project: display 2 stat buttons per row in mobile in right side panel
Before this commit, in project right side panel (when the user goes to
project update of a project) when the screen width is below then 1600px
the number of stat buttons is reduced to 3 stat buttons instead of 4.
The problem is in mobile view, there is no enough space to display 3
stat buttons in a row.

This commit reduces the number of stat buttons to 2 instead of 3 when
the user is in a mobile view.

task-2968326

X-original-commit: 50d710993d0a37526f75430f87310b2a2d67d69d
Part-of: odoo/odoo#105801
2022-11-15 19:22:13 +01:00
Xavier BOL (xbo) a19a63ea65 [FIX] project: review style of right side panel to avoid auto-scroll
Before this commit, when the user accesses to project update
view of a project with a mobile, the view auto scroll to the kanban
renderer and so the user will not directly see the right side panel
displayed above the kanban renderer when the view is a mobile view.

This commit changes the position of the right side panel to add the
ProjectRightSidePanel before the KanbanRenderer (or ListRenderer)
component, to avoid using `flex-direction: column-reverse;` in mobile
view because there is a auto-scroll because of that css property. And
so, the `flex-direction` will be `row-reverse` by default and when the
view is a mobile one, the `flex-direction` will be `column`.

task-2968326

X-original-commit: 05e46f779b9eb625dcd17a00c1c2228650a8f8d8
Part-of: odoo/odoo#105801
2022-11-15 19:22:12 +01:00
Xavier BOL (xbo) 5454c20917 [FIX] project: keep overflow-x in auto for list view in project update
Before this commit, when the user resizes a column to increase its size,
the list view will be below the right side panel and it was impossible
for the user to horizontally scroll to see the part of the list view
below the project right side panel.

This commit removes the `overflow-x: hidden;` on the list to be able to
horizontally scroll the list view as it is the case for the all others
list views when the size of list view is bigger than the width of the
screen.

task-2968326

X-original-commit: 865c510d7c015db97e19c77609dac864b7065f92
Part-of: odoo/odoo#105801
2022-11-15 19:22:12 +01:00
Xavier BOL (xbo) 856d8b2d07 [FIX] project: fix alignment issue in stat buttons in project update
Before this commit, before the OWL conversion, the number of tasks (for
instance) in the stat button was aligned to the left, and after the OWL
conversion it is aligned to the center.

This commit fixes the alignment to keep the same alignment before the
OWL conversion.

task-2968326

X-original-commit: 151d95dcee27fc790a86faa2e13996c284cc05b5
Part-of: odoo/odoo#105801
2022-11-15 19:22:12 +01:00
Prakash Prajapati 58b743b28d [FIX] project: fix the traceback when we created task from project sharing
Reproduction steps:
     - Install project module
     - Create project and task
     - Share the project
     - Open the  portal
     - Open the project sharing list view
     - Create a new task

Before this fix:
      traceback occurs when we create task from project sharing.

Why traceback occurs:
    In `portal_chatter_init` route both res_id and res_model are mandatory.res_id
    is undefined during a task created from project sharing.

task-3012469

closes odoo/odoo#105392

X-original-commit: 2c2b7d94bbbe6f785c68bb6a479bc1aa4eceb668
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-15 00:17:56 +01:00
Prakash Prajapati 3a1afcc20a [FIX] project: filter projects for Late Milestones filter
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

closes odoo/odoo#105709

X-original-commit: e8ee1e370ec3c6b4bc13d0d5da6b242af1e9b9c3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-14 18:17:52 +01:00
Prakash Prajapati e2b52e6358 [FIX] project: hide "Milestone" action button in project kanban card
Before this commit, when the Milestones feature is globally enabled
in the project app, the "Milestones" action button displayed in the
dropdown of the kanban card are always visible even if the project
has the feature disabled in its settings.

This commit changes the visibility of that action button to also
take into account the settings of each project.

task-3033041

X-original-commit: 05485bbd192c2316267d38934544d7f08ff4e9e8
Part-of: odoo/odoo#105709
2022-11-14 18:17:52 +01:00
Bastien (bvdn) 0a23462728 [IMP] project: improve user experience
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

closes odoo/odoo#103318

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-14 18:17:44 +01:00
Audric Onockx (auon) 76b513917b [IMP] web,project: add and modify commands in the palette
\- Add 'Move to next stage'
Generic, we think it is a useful tool to have anywhere.

\- Change the 'Set priority...' command
to 'Set priority as Low/High' :
Only 1 command will be available with the 'not current' priority.
Specific, because it is used on selection fields,
which means there could be more than 2 options.

\- Transform the 'Set kanban state...' command into three commands
Generic. 2 commands will be available.
One for each 'not current' kanban state.

task-2857447

closes odoo/odoo#91821

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-14 17:17:47 +01:00
Julien Mougenot cda3396546 [FIX] web,project: Restore kanban drag&drop in Firefox
Before this commit, the drag & drop feature for the Project "Tasks"
kanban view did not work if the drag sequence was initiated from the
title of the card.

This was due to the "o_kanban_record_headings" class having the CSS rule
`overflow: hidden`, because of a well known 6 year-long-and-counting
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1352061

Namely: mouse enter|leave events won't fire on anything underneath
elements having `overflow: hidden`.

This commit solves this issue by introducing a dedicated class name
'o_dragged' to all elements dragged using the `draggable_hook_builder`,
and defining on it the CSS attributes that were assigned in JS before,
as well as `pointer-events: none` on itself and all its children to
avoid the issue mentioned above.

Also in this commit: fixed a syntax error in a CSS rule in project's
"task_name_with_subtask_count_char_field" widget.

closes odoo/odoo#105353

Related: odoo/enterprise#33774
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-10 12:21:57 +01:00
Adesh Jolhe (adjo) 11ea3fd06e [FIX] {sale_}project,hr_timesheet: translate various messages
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

closes odoo/odoo#105192

X-original-commit: 85ef44cd66474bf5dcda4d7478d566e462d1a550
Related: odoo/enterprise#33717
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-08 23:14:51 +01:00
Hubert Van de Walle (huvw) 3de9e58239 [FIX] project: grouped by personal stages in kanban -> user == current user
Steps to reproduce
==================

- Go to project > My tasks
- Click on load More on the first column
- Nothing is loaded

Cause of the issue
==================

The orm groups by stages for each stage where the user is
the current one or null
-> This returns a null stage when the left join has not match
   But we only want stages linked to the current user

Solution
========

When loading project kanban groups and isGroupedByPersonalStages is true:
Add the user_id to the domain

This is the same solution applied in saas-15.3

https://github.com/odoo/odoo/blob/f463d9a6ba95c0df64268b1c577f1b9d1c5bcb25/addons/project/static/src/js/project_kanban.js#L342

opw-3033943

closes odoo/odoo#105367

X-original-commit: 1294ff85aa54aa195e2f1554c6ef426869b90c75
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-08 20:45:44 +01:00
Jensi Chovatiya 8499a1556e [FIX] project: fix the traceback when opening task from milestone
Why traceback occurred:
   When we open the task from the milestone dialog, the milestone dialog does not close,
but the component gets destroyed. And when we manually close the milestone dialog,
it tries to load the props. so the traceback occurred.

In this commit:
When the task is opened from the milestone dialog, the milestone dialog will be closed, and
before loading the pros checked whether the component is mounted or not.

Steps:
- Install the project app
- Active Milestones in  setting
- Open the  Project Updates
- Open any Milestones
- Click on the  task stat button

task-3010877

closes odoo/odoo#105027

X-original-commit: 3f08ff262e2943f870e906e06ec90807f581183c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-06 20:54:56 +01:00
Pratik Raval c9874d11e5 [FIX] project: fix formatting of note field
This commit fixes the formatting of the note field in project
sharing wizard.

The formatting of the wizard broke after the merge of 16.0.

task-3010435

closes odoo/odoo#105054

X-original-commit: e64bb62173578f52efe9251675f17bb78fd6de29
Related: odoo/enterprise#33659
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-06 11:16:38 +01:00
Xavier BOL (xbo) 363403aea9 [FIX] project: change the default order used in project list/kanban view
Before this commit, the default order used in the project list/kanban
view is only `sequence` but if all projects have the same sequence.

This commit changes the default order to sort by `sequence`, `name` and
`id` as it is defined in the python model.

closes odoo/odoo#104986

X-original-commit: 25efb87f960380dac8093e018a3766bd5041cd0f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-05 16:13:42 +01:00
Jensi Chovatiya 109515ee7f [FIX] project: fix the default user on task gantt view
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

closes odoo/odoo#104967

X-original-commit: ab0e072fda7c2dff4ee7916496edfb6da11019ff
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-05 13:09:44 +01:00
niyasraphy fa2e34e1fc [FIX] project: prevent opening the form of report.project.task.user model
closes odoo/odoo#104506

X-original-commit: 910a0bda28c84e96a93430044f841b4f28055b3a
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-04 14:59:15 +01:00
Xavier BOL (xbo) 8873581323 [FIX] project: add default project when user wants to add subtask
Before this commit, the f3974bea4b adds
the project as filter in the search view when the user wants to add a
subtask on a task in the form view. This feature has been broken due to
a change on the search view. The main search has no longer the
display_project_id field, only the one inherited the main one has that
field. (commit da868d28e2)

This commit changes the search view to use to correctly have the project
of the parent task as default project when the user wants to search a
subtask to add on the task displayed in the form view.

closes odoo/odoo#104878

X-original-commit: 4e1ee0f9ae6f39154a528fec2c16943df807ab7f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:57:05 +01:00
Eteil Djoumatchoua (etdj) 3c526229c6 [FIX] project: ensure cost are subtracted when calculating margin
steps to reproduce the bug:
- Create a service product with "invoicing policy" set to "Based on timesheet" and "create on order" set to "project and task"
- Create and invoice with the product and confirm it
- Type in some hours on timesheets for the invoice
- Go Project -> Project update of the project, The margin value is incorrect

Solution: As the cost are always negative, changed the operation of the calculation to have the good value.

opw-3029869

closes odoo/odoo#104474

X-original-commit: a39a1a6a3bc276177f9f4c95495153bbb5818ed5
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:04:45 +01:00
damr 5db02c9924 [FIX] project: fix task navigation in portal project
This commit purpose is to fix the navigation in the project portal. When
a project is shared, the user can access all tasks of the project
from the project portal page, but when he select one task, he can not navigate from one task to another with
the previous and next button on the right of the header.

the commit :

 * fix the previous and next button of the task page. When a task is
reached by pressing one of these buttons, the navigation is not
interrupted and the user can navigate through all the tasks of the
project without having to go back to the project page

task-3032785

closes odoo/odoo#104700

X-original-commit: 0b32d83baf0563360b858a470afc5c71fb996f84
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-02 13:36:03 +01:00
std-odoo afe9497341 [FIX] project: hide the "View In Kanban" properties option
Purpose
=======
We don't use the properties field in the tasks kanban view.
Because of this, we want to hide the option "View In Kanban" in
the properties definition.

Task-3012780

X-original-commit: 63fa07d38e51b261780cadb674ab035f8b15f58e
Part-of: odoo/odoo#104252
2022-11-02 12:37:04 +01:00
Hubert Van de Walle (huvw) 95024f8bcb [FIX] project: applychanges for personal_stage_type_ids
Steps to reproduce
==================

- Go to Project > My tasks
- Drag a card to another column
-> An error occurs

Cause of the issue
==================

`personal_stage_type_ids` was not changed to `personal_stage_type_id`

opw-3036820

closes odoo/odoo#104442

X-original-commit: 3afc32af953556227dc07f8c65b5301d10fa92fe
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-10-28 13:23:06 +02:00
Pratik Awasthi 1103c93271 [FIX] project: fix description field size in form view of task
Before this commit, while creating/editing a task, the
description field height is not increase to  use the remaining
space until the bottom screen in the project task form view.

This commit uses `FormRendererWithHtmlExpander` component as
renderer for that form view (as it is the case for the project
and project update form view to increase the description field)
and override `htmlFieldQuerySelector` getter to select the
right tag containing the description field.

task-2987387

closes odoo/odoo#104259

X-original-commit: b4873875cb687c7d09474dee146274cda1cb910a
Related: odoo/enterprise#33297
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-28 00:50:40 +02:00
Pratik Awasthi a95a848e06 [FIX] hr_timesheet: fix traceback on task search in portal view
Before this commit, when the portal user is in `/my/tasks` route
and he remove the groupby and search a certain task name and no
task is found with his search, a traceback is occurred saying `task`
is not found to be able to evaluate the following lines:
```xml
                <t t-set="timesheet_ids" t-value="task.sudo().timesheet_ids"/>
                <t t-set="is_uom_day" t-value="timesheet_ids._is_timesheet_encode_uom_day()"/>```
in the portal template.

This commit fixes the issue by changing the xpath to be sure the task
variable is defined before evaluating task.sudo().timesheet_ids.
Moreover, this commit checks if there is any task in tasks before
displaying tbody to avoid having any scrollbar for nothing.

task-2987387

X-original-commit: 9d0b770aebaf3c9c08352bf11fb9fdf2a36f1523
Part-of: odoo/odoo#104259
2022-10-28 00:50:40 +02:00
Jorge Pinna Puissant 886f3de768 [IMP] web,*: force props validation for components
*: base_automation, lunch, mail, mrp, project, web_editor, website

This commit adds a warning if the props validation is not set for a
component.

The props validation is important to tell how a component should be
used, by looking at its code, it's a good documentation of the component.
It's also critical, to test if the component is correctly used, if all
the obligatory props are passed and that there are of the correct type.

For more information, see: https://github.com/odoo/owl/blob/master/doc/reference/props.md#props-validation

closes odoo/odoo#103723

Related: odoo/enterprise#33044
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-10-26 16:07:18 +02:00
Xavier BOL (xbo) f830656f0e [REV] project: fix alignment issue project sharing
Since the form view has no longer a readonly mode, the task name could
be cropped since its size has been reduced in a previous commit to keep
the same size in edit mode in 15.3 (before the OWL conversion and the
always edit feature). This behavior is no longer expected and the size
should be the one in readonly mode to use the available spaces between
the task name and the kanban state.

It is for this reason, this commit reverts
74a069226294044fa8901aed6b02bc25c4e11b21.

closes odoo/odoo#104118

X-original-commit: 677c8b1bc60fe0736ce45e8c041a03e65fc6413c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-26 01:58:41 +02:00
kais-odoo 58fdd05888 [FIX] project: fixes a traceback when opening project burndown chart
Before this commit, when a Project user opens the "Burndown Chart"
report from Project app, a traceback is occured due to an invalid
domain in the `ir.rule` for this report.

This commit fixes the issue by updating the domain since the `task_id`
field no longer exists on that report.

task-2982150

closes odoo/odoo#104107

X-original-commit: ce60532b0c5c77a80038298a27550ab5f9eeb012
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-26 00:01:54 +02:00
luvi 88c8999ec7 [FIX] project: fix task title width
This commit adds the w-100 classname to the div containing
the field used for the name of the task. It was no longer
using all available space.

After this commit, the title takes the full width available.

closes odoo/odoo#104103

X-original-commit: 482a597527a227c45afa4e0d85b0bcdcb8866a5b
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-25 21:20:48 +02:00
Romain Estievenart a172be756f [REF] web,*: dark mode uses service instead of legacy api
This commit adapts the codebase to match its enterprise counterpart
where calls to legacy cookie api (cf. web.utils.cookies) are replaced by
cookie_service ones.

closes odoo/odoo#104080

X-original-commit: 724469e19ff83e91a41c6721e334df1ad8d1c02c
Related: odoo/enterprise#33189
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-25 19:39:51 +02:00