Commit Graph
682 Commits
Author SHA1 Message Date
kusi-odoo 8a1f1354f9 [FIX] project: hide create task stage option from the project kanban
Due to the project user's inability to create a task stage, we have removed the
'create stage' option from the kanban view.

task-3511164

closes odoo/odoo#159557

X-original-commit: cadf1483948295397137284a01ddf219169bcecd
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-04-11 13:16:52 +00:00
dise 110cce72e5 [FIX] project: fix project tour in mobile mode
The tour isn't working if you run it on mobile mode, it gets stuck at
some points.

To fix this issue, a mobile step was added, and one trigger was edited
to work with mobile mode as well.

task-3709501

closes odoo/odoo#155789

X-original-commit: 224d3dfb9bbcc53bd2902407800b6fa88d9b8716
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-02-29 10:34:25 +00:00
Aaron Bohy 22f897275d [FIX] project,web: improve perf of project task list view
Before this commit, to render the table, the project task list
view computed the list of selected records once for each cell,
and then iterated over that selection to check whether selected
tasks were all associated with the same project (to set the
stage_id field readonly if not). However, computing the selection
requires to iterate over all records, so the rendering was O(n^2).
As a consequence, the rendering of (not so) large tables was very
slow (~1s for 80 records).

With this commit, we compute only once for the whole table whether
the selection contains records from different projects.

closes odoo/odoo#153611

Signed-off-by: Géry Debongnie <ged@odoo.com>
2024-02-13 10:07:57 +00:00
Aaron Bohy d1e14994a9 [FIX] *: use correct float formatter
Commit [1] moved (almost all of) the code of formatFloat from
views/fields/formatters.js to core/utils/numbers, to make it
accessible in the frontend. A formatFloat function was kept in
formatters.js to handle the false case, which makes no sense in
number utils, but is useful for fields. However, a lot of imports
have been updated to use the numbers.js instead of formatters.js
(i.e. they no longer benefit from the support of false), whereas
they are actually formatting field values, so they should have
kept using the formatFloat from formatters.js

This commit adapts the places where the formatFloat to use must
come from formatters.js, not numbers.js.

[1] https://github.com/odoo/odoo/commit/054ca0a19aaf297f420a1b478b93ae26f1b943b8

task 3722043

closes odoo/odoo#152810

Related: odoo/enterprise#55919
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2024-02-06 20:16:20 +00:00
Raja Prasad b7c68826d9 [FIX] project: fix alignment of heading in profitability section in mobile view
Steps to reproduce:

- first install bridge module 'project_account_budget'
- open any project and go to project updates
- in right side panel you see 'Profitability' button
- click the profitability and switch to mobile view

Issues:

- heading of table are not vertically centered

Solution:

- Add style to vertically align center of heading

closes odoo/odoo#151839

Task: 3633405
X-original-commit: 249f8700b9c982c765d712cd27e93bbd7bedfe3e
Related: odoo/enterprise#55460
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-31 13:47:17 +00:00
Louis (wil) 13bb9c21ab [FIX] *: remove escaped newlines from translated strings
The parser of the library we use to extract strings to be translated
(python-babel) doesn't handle escaped newlines in the same way as the
JavaScript parser. The resulting mismatch makes the content that uses
them untranslatable.

for example:
```js
const hey = _t("slt \
çv ?"
);
```
is exported as "slt \nçv ?", while the content of the variable is
"slt çv?"

This commit removes faulty occurrences from the code base and re-exports
the corresponding POT files.

*: point_of_sale, pos_sale, project, web

closes odoo/odoo#145971

Related: odoo/enterprise#52617
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2024-01-10 15:26:01 +00:00
suth-odoo 3b91372be5 [FIX] project: fixes the size of the chatter
Steps:
 - install project ,website,saleorder
 - open project ,share a saleorder project to admin from the share button
 - then go to website,click on projects
 - pen the shared project
 - In that the size of the chatter is small

Issue:
 - The size of the chatter is abnormally small

Cause:
 - The problem occurs because the width of the chatter is less

Solution:
 - By increasing the chatter size the problem can be solved

task-3549279

closes odoo/odoo#148770

X-original-commit: a2efc1a0a1b831f4dd356661d1ef40e9174af73b
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-10 10:28:22 +00:00
Bastien (bvdn) 8b0aff12a5 [IMP] Project: add JS tests for widgets
Added JS tests for the following widgets:
- status_with_color (project.project, project.update)
- name_with_subtask_count (project.task)
- priority_switch (project.task)

Task-3660956

closes odoo/odoo#148104

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-10 08:50:51 +00:00
Chauhan Aadil Riyazmohamed 15a088d0f1 [FIX] project: discard unnecessary scrollbar in project form view
Before this commit:

In project module when project form view opens there is a tiny horizontal
scrollbar that doesn't seem necessary.

After this commit:

With this commit, I have fixed this issue and discard unnecessary tiny
horizontal scrollbar in project form view.

task:3508251

closes odoo/odoo#146819

X-original-commit: f151910b1df856b0141c488a32b62f8e006c0492
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-19 14:51:40 +00:00
Julien Carion (juca) 6e27c43c58 [FIX] web, project: avoid crash on file upload in portal
This commit fixes a crash that would happen on file upload in the project
sharing portal chatter. This crash was caused by the file size check in
the uploadFiles method of the FileInput component due to the fact that
the PortalFileInput calls this method once per file instead of once for
all files. The fix therefore ensures that the file size check will be
correctly applied in the case of a single file parameter instead of a
files array.

Steps to reproduce:
- Access the portal (with the /my route)
- Go to Projects
- Open the AGR - S00064 - Sales Order project
- Open any task in the kanban view
- Send an attachment in the chatter
- Before the fix, a traceback occurs on file upload

Crash introduced by https://github.com/odoo/odoo/pull/138203/commits/82b4395b2f12e1c86d2bd5c4acd47c321be071d8

opw-3628996

closes odoo/odoo#146214

X-original-commit: 8e2aef9ab607b06eb4667859204cfd7186b3f060
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-19 08:12:25 +00:00
mano-odoo 998e40cf07 [FIX] web, project: list renderer alignment top
Prior to this commit some td in the list renderer were vertically align
on the middle while other are aligned on top. This comes from commit[1]

This commit removes the vertical-align: middle to rely on the inherited
alignment from the `<td>` which is inherited until the `<table>` el
which set the alignment on `top`.

To visually center the icons previously centered by vertical-align,
a new variable: `$o-line-size` is created.

This variable accounts for the total size of a line which is the font
size multiplied by the line height.

In our case this ensure that the icons line height in the list view is
the same as the <td> that are containing text.

[1]: odoo/odoo@53f6053997

task-3557566

closes odoo/odoo#145290

X-original-commit: cce036d03ccd7c12f34ed930b8964e26464732ba
Related: odoo/enterprise#52275
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-12-07 10:07:59 +00:00
dhda-odoo 0a62f7e06a [FIX] project: add space between caret and assignees dropdown
step to produce :
- go to project
- click on any project in the Kanban view
- click on the quick create button
- notice caret at assignees dropdown

issue:
- at the assignees dropdown the caret position is at the far right and not
  aligned with the discard/trash button

Cause:
- changes which happened in task-2944742 added left margin for user_ids field ,
  which then moved the position of caret.

Solution:
- changed css to just apply the margin at bottom right for M2M avatar at kanban
  and stopped it from affecting user_ids field in quick create task.

task-3506482

closes odoo/odoo#144987

X-original-commit: 519df29285700a33a515d640777745ca6a90fbab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-05 21:15:33 +00:00
Kartik Chavda dcec4ad28d [FIX] project: fix no content helper in project sharing
Steps:
- Install project app.
- Share project editable to user which has no
task.
- Open that project in project sharing.

Issue:
- No content hepler is not properly showing.

Cause:
- Helper in project sharing action is not markup
even and that action is type object so we have to
markup no content manually.

Fix:
- Markup project sharing helper.

task-3293310

closes odoo/odoo#144516

X-original-commit: 34aa8c46a50ebb0923565594c6c74d15c83756b8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-04 13:23:35 +00:00
Ritika Shekhawat 140c2ef6e1 [FIX] project,sale_timesheet: fix profitability section visibility
Steps:
- Install project & accounting
- Open project
- Open project.update
- There is profitability section
- Go to accounting module configuration,settings
- Analytic accounting field true or false

Issue:
- Analytic accounting feature true or false the profitability section always
visible in project.update

Cause:
- There is no condition for profitability section visibility

Fix:
- Added  required conditions for profitability section visibility

Task-3484413

closes odoo/odoo#135108

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-30 18:37:49 +00:00
Prakash Prajapati bbb4a2e08a [FIX] project: default focus set on sub-task title
Issue:
      When user add sub task then first field is focused.
Fixed:
    In this commit, we have made the title the default focus so that the user does not
    have to click manually and time will also be saved.

Steps:
     - Install project app
     - Active Task Dependencies
     - Create task and add subtask

task-3471102

closes odoo/odoo#143251

X-original-commit: 487a62a249e783ca15f95675a6cf43322b61d569
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-24 16:22:04 +00:00
Antoine Guenet 0f4914a157 [IMP] web_editor, project: remove attributeless spans/fonts on sanitize
`<span>` and `<font>` elements without attributes are useless and can be
removed. Removing them will make the editor output more readable and
will prevent endless nesting of attributeless `<span>` and `<font>`
elements when successively styling, unstyling and deleting text.

Part-of: odoo/odoo#141303
2023-11-07 21:02:24 +00:00
Ritika Rathore c82ffda05d [FIX] project: select the any project in the sub task
Steps:
- Install Project
- Open project module
- Actived Task Dependencies
- Select any project
- Now select any task
- Go to Sub-Task notebook
- Add sub task
- Select any other project in the sub task

Issue:
 Currently, we cannot create sub task of another project in the form view.

Fix:
 - we can create sub task of any project.

Task-3508241

closes odoo/odoo#140794

X-original-commit: 5c2471f4ed1f61b0ba75e05280eccf39a6a44f62
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-06 11:16:40 +00:00
Elisabeth Dickinson 89082fbd56 [IMP] web, *: fix favorite alignment
*: account, hr_recruitment, project, lunch, mrp

By removing the absolute positioning on ".o_favorite" inside kanban
views, we allow it to align naturally with the rest of the elements,
thus removing the custom code that was needed for padding.

By doing so however the icon - which is now only visible on hovering the
card in the Project's kanban view - should remain visible at all times.
The behaviour would be the same as in other kanban views: an outlined
star when not active and a full yellow star when it is.

The margin on the kanban heading in the Manufacturing orders has been
removed to realign the top elements.

task-3462098

closes odoo/odoo#131559

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-11-02 12:03:40 +00:00
c0b683e2f4 [IMP] web,*: improve darkmode
This commit introduces some adjustments to the dark mode color scheme
and the use of bootstrap classes in Community.

- Mini calendar contrast -

The colors were not using variables, making them non dynamic
and breaking the contrast in dark mode.

- Avoid !important rules spreadsheet -

Prior to this commit, spreadsheet top bar was using a `bg-white` class,
making it pure black in dark mode.

Since spreadsheet is designed with light colors and we don't provide a
dark mode for it, we remove that class and set a `background-color`
property using CSS in Enterprise.

- Input color -

This commit fixes the focus behavior on the searchbar in the control
panel, the `command_palette_search`, and the `start a conversation` in
discuss.

- Copy clipboard field border color -

Make use of the `text-primary` color for the copy to clipboard field
We use the o-theme-color function to avoid an undefined since primary
doesn't exist in the o-theme-text-color map in white mode.

- Web_editor toolbar variables -

The toolbar was using the `o-brand-primary` variable
which was set to a darker shade. This caused issue when activating an
option due to how vibrant the color is.

- Improve the controls on border-color -

Introducing a custom property on the border-color to allow
further control on individual components (such as the popover).

- Improve setting tabs colors use -

Prior to this commit, the colors of the settings tabs menu were kinda
inverted. The menu was light in dark mode and dark in light mode.

We fix this by changing the values associated to the CSS variables in
use.

- Make model field selector dark mode proof -

Fixing the design of the model field selector popover in both
light and dark mode. Since the popover was using custom style with
arbitrary values, it was not designed for the dark mode and had a lack
of consistency.

To improve the design, we use variables rather than custom style, and
make sure the desired render is as close as before.

- Sign colors use -

This commit aims to improve the sign module in both light and dark mode.
There were some readability issue with some `btn-light` having poor
contrasts in both light and dark mode, and the use of some classes was a
bit unexpected (e.g `card-header` to set a grey background with some
padding).

- Improve buttons design inside listview -

Prior to this commit, this button was using custom CSS to make it look
like a primary button, while it was using classes related to secondary
buttons.

We remove the custom CSS used to style it correctly and keep our button
design consistent.

- Messaging menu layout in mail -

This commit aims to improve the design of the notifications displayed
in the messaging menu. Prior to this commit, the notifications dropdown
was using custom CSS variables overriding the regular behavior
of our dropdowns.

In fact, the layout was generating some friction:

1) Marking a notification as read would turn its background into a
darker color

2) Effects like `:hover` were all based on the custom CSS variables
resulting in an inconsistent layout.

- Multi company selector adaptations -

In darkmode the multi company selection was using the btn-light which
creates a weird effect and overrides the dropdown default hover behavior

This commit uses the btn-link to display an hover effect on the
company switch and on the checkbox while blending with the background
and the default dropdown hover effect.

- Adapts default badge design -

Improve the design of the default badges in dark mode.

If you open the light mode, these badges are dark grey with a white
text. If you switch to dark mode, they are dark grey but with a dark
text, which makes them look either muted or off.

We make use of SCSS variables to handle the color of the component,
providing a good styling in both modes.

- Fix kanban cards borders inside dropdown -

Fixes the issue with the divider inside the kanban dropdown menu not
showing in dark mode.

To ensure it is visible, we assign it the `$dropdown-divider-bg`, which
is the color it should use, as the horizontal divider above uses.

- Fix tour pointer design for dark mode -

This commit aims to insert the tour pointer and its content inside the
styling we applied to our tooltip.

To do so, we make sure it uses CSS variables, allowing more control and
consistency, plus we replicate the overall look of our tooltips.

- Fix `text-primary` on action background contrast -

This commit improves the readability of our `text-primary` classes when
it's used on a `$o-component-active-bg` background.

Prior to this commit, the `text-primary` was not meeting the contrast
standard, mainly when you were using the `CMD+K` shortcut on the
app switcher.

To prevent that, we changed the background to a `$o-component-active-bg`
background with an opacity ensuring our text provides a good contrast.

- Fix input states -

Prior to this commit, the `--o-input-border-color` CSS variable was
using the `$o-form-lightsecondary` variable to define the standard color
of the `border-bottom` property of our inputs.

This was conflicting since `$o-form-light-secondary` is also used to
define the `background-color` of our table on focus.

With this commit, we separate these two element with different variables
to make sure they don't affect each others.

- Fix kanban ghost background -

Before this commit, if you created a project without any stage or element
in it, the ghost cards that act like placeholders would be pure `#000` in
dark mode, due to the `bg-white` class.

This commit replaces that class with a `bg-light`, providing a better
visual result in both light and dark mode.

- Fix new message design -

Improve the design of the new message element while
inside Discuss, using our danger color, ensuring a good visual result in
both modes.

task-3201038

closes odoo/odoo#139966

Related: odoo/enterprise#49666
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Co-authored-by: chgo-odoo <chgo@odoo.com>
Co-authored-by: stefanorigano <sri@odoo.com>
2023-10-28 10:07:53 +00:00
Hugo Carlier (Huca) 2236e5c97c [REF] project, project_todo: refactor personal stages
Personal stages of project.stage records are based on two main field:
- personal_stage_type_ids: the list of all personal stages linked to a
  task (M2M)
- personal_stage_type_id: a computed field (not stored) indicating the
  personal stage of a task for the current user.

When reading a set of project.task records grouped by personal stages,
two options are possible:
- Group the records by personal_stage_type_id (approach used in former
app Notes): in which case the read_group method has to ne rewritten as
it can be used on a non-stored field.
- Group the records by personal_stage_type_ids (approach used in app
Project) in which case, the kanban view has to be overriden to be able
to drag and drop a task between personal stages (which is not possible
by default, when grouping according to a M2M field).

The main evolution proposed by this refactor is to use an hybrid
approach that would:
1. Group the project.task records by personal_stage_type_id
2. Use the read_group with groupby set to 'personal_stage_type_ids' as
this should give the same result.

This would allow to:
- Avoid a complex and costly (performance wise) read_group override
- Avoid an override of the kanban view that is costly to maintain
- Simplify the implementation (and thus readability) of personal stage
management (among which, removal of the model
project.task.stage.personal).

task-3345132

Part-of: odoo/odoo#140050
2023-10-27 14:22:12 +00:00
Chrysanthe (chgo) df8535fbd4 [REF] portal, *: portal redesign
*: base, account, account_payment, auth_top_portal, hr_timesheet, loyalty,
   mrp_subcontracting, payment, project, purchase, sale, sale_stock,
   sale_timesheet, website_crm_partner_assign, website_sale,
   website_slides

Portal general redesign. Increase visual consistencies with the backend
[1] and adapt to the new default website design [2].

[1] https://github.com/odoo/odoo/pull/116641
[2] https://github.com/odoo/odoo/pull/120302

task-3046004

Part-of: odoo/odoo#138077
2023-10-25 15:50:36 +00:00
Jorge Pinna Puissant 7adde63d69 [MOV] web,*: move record.js to model folder
This commit is part of a serie of commits which aims at simplifying and
reorganizing js files in the web addon

closes odoo/odoo#139156

Task-id: 3508223
Related: odoo/enterprise#49212
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-20 11:22:17 +00:00
Pierre-Yves Dufays 725e7ffae3 [IMP] various: improve custom activity views
The following summary view of the record in the activity views have been
improved:
- project_task: task state added
- project_project: project manager added
- event_event: responsible and the dates (date_begin_located and
date_end_located) added
- account_move: total amount, customer and state added
- sale_order: total amount and the state added
- purchase_order: total amount and the state added
- crm_lead: customer and stage added
- hr_applicant (hr_recruitment): recruiter added
- survey_survey: responsible added
- maintenance.request: added equipment and responsible
- stock.picking: added scheduled_date
- repair.order: responsible, schedule_date and product_id added
- mrp.production: added responsible
- hr_leave (hr_holidays): status is added and default deadline modified see
below

Ensures that "Schedule activity" is in one line by adding a colspan.

hr_leave activity: When a time off approval activity is created as a
consequence of the creation of a hr.leave, the deadline of the activity is set
to the date_from of the hr.leave minus activity type delay_count (default 15)
except if it leads to a date anterior to today. In that case it is set to
today. That way, in the activity view, the time off approval activities are
more or less sorted by related hr.leave date_from and the cell date is an
indication of when the time off is planned.

Technical note: on most activity view, the activity record was not occupying
all the horizontal space. To solve that problem the css has been modified and
the max-width (200) that was imposed on the sub div has been removed. And as
it was impossible to impose a max-width for a flex div (which is the common
case for the activity record), the max width is imposed on each text that might
be too long using the class o_text_block. That class has been modified to
impose a max-width. That's why that class has been added in most view.
Alternativly, we could have modified the activity compiler to add that class
when the attribute full was set (not done because not sure of the consequence).

Task-3300854

Part-of: odoo/odoo#138135
2023-10-19 19:08:12 +00:00
Abderraouf Ghrissi (abgh) b9532e7549 [IMP] project: Improve ux
Before this commit:
- project.task > list view: Currently, the progress is displayed
in purple if less than 100% and in red if above. The two colors
don't contrast a lot, making it hard to read. In addition, it
is not coherent with the color we usually apply for the remaining
hours in the rest of the app.
- onbording tour: the manual saving step is no longer necessary
as records are now automatically saved. In addition, showing it
doesn't provide a wow effect and is an extra opportunity to lose
people in the process

After this commit:
- the following color code was applied for the progress bar:
*if progress < 80 -> green
*if progress is between 80 and 100 included -> orange
*if progress > 100 -> red

- step removed.

task-3475170

closes odoo/odoo#132854

Related: odoo/enterprise#46162
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-18 18:27:25 +00:00
Bastien (bvdn) 7bd5bc9969 [FIX] project: write tests for project tags filter
Created custom filters using tag_ids for the tour to click on
using the add custom filter in the filter dropdown was buggy when used in the tour
the o_filter_condition div didnt update when changing the custom filter

Task-3511261

closes odoo/odoo#138930

X-original-commit: cf44186bdd082bb822eb1801534f8bf4b5a904e2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-18 07:51:42 +00:00
Brieuc-brd 538fdab99b [IMP] *: fine-tune app icons
The aim of this commit is to improve the impact and rendering of app
icons in bright and dark mode. It also reduces the size of svg files.

To achieve that, this commit updates the colors to flat colors. This
change will make the icons stand out and improve their readability.

task-3072562

X-original-commit: 667a19162b74fb6554a2389ba9c6e69de4ff5113
Part-of: odoo/odoo#138279
2023-10-16 09:21:17 +00:00
Pierre Paridans 35122d5c7c [REF] *: use raw CSS rules instead of extend utility classes
*:mail,portal,project,web

task-3546717

closes odoo/odoo#138615

Related: odoo/enterprise#48920
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-10-13 11:46:30 +00:00
Aaron Bohy b3972b26a1 [REF] web,*: remove legacy service provider
This service was used to redirect legacy service requests to the
wowl service infrastructure. It has been incrementally simplified
with the codebase getting converted. It now only allows to redirect
calls to the effect service, which doesn't seem useful anymore.
This commit thus removes it.

Part of task~3439226

closes odoo/odoo#138120

Related: odoo/enterprise#48654
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-10-10 07:15:47 +00:00
Jorge Pinna Puissant ef424a9dc2 [REF] *: remove owl from linter's accepted global variables
Before this commit, owl was in the linter's accepted global variables.
This allowed  direct access to owl global object.

For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`

Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:

`import { xml } from "@odoo/owl";`

task-id 3498859

closes odoo/odoo#137517

Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-10-05 10:21:53 +00:00
Aaron Bohy cc3a3a328d [REF] web,*: simplify arch manipulation and parsing logic
*board,mail,project

This commit aims to simplify the XMLParser logic and the way archs
are manipulated in views, motivated by [1] where we had to
modify the arch in View to insert access right information.

First, the xml utils have been reworked. The XMLParser class has
been removed. The xml utils module already exported a parseXML and
a serializeXML functions, this commit adds visitXML, s.t. the whole
XMLParser feature is fully replaced by the 3 functions.

Second, concrete views now receive the arch in props as an
XMLDocument, as the arch is parsed once for all in View. With this,
we were able to remove serializing/parsing back and forth at several
places, where we needed to extract information for sub-parts of an
arch individually (e.g. View, x2many subviews, list view groupby).

Third, even though this change has been driven by the one above and
wasn't initally wanted, the view compiler cache and API have been
simplified. The cache is now flat, there's an entry in the cache for
each template that has been compiled. Moreover, the useViewCompiler
hook no longer takes the cache key in params, as it can directly
compute it itself (the key being the outerHTML of the template).

[1] odoo/odoo#135145

closes odoo/odoo#136376

Related: odoo/enterprise#47808
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-10-04 08:39:12 +00:00
Jorge Pinna Puissant 006ee1fc47 [REF] web, *: remove legacy cookie utils and cookie service
The cookie service was replaced by a utils file in core. This was done
to be able to use the cookies without the need of environment.

"Om Nom Nom Nom" - Cookie Monster

part-of task-id 3439226

closes odoo/odoo#136782

Related: odoo/enterprise#48005
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-03 20:17:40 +00:00
Gurupreet Singh a3c4cb6ba2 [FIX] project: fix project tour
When we run the project tour manually, even if we select the assignee, the tour
does not move to the next step, so we have clicked the input button manually.

task-3302315

closes odoo/odoo#137152

X-original-commit: 99f13f2e2c9d30f829c3eba3d16d23ae203d0754
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 18:16:14 +00:00
kais-odoo 78e94807d3 [FIX] project: fixes recursion on options state selection
Before this commit, get traceback on deleting project task record cause
it is getting stuck in recursion.

In this commit, fixes traceback issue by no calling get option itself.

task-3460164

Part-of: odoo/odoo#131995
2023-09-29 09:21:48 +00:00
Julien Carion (juca) fadb88b651 [IMP] web, *: display none instead of undefined
This commit changes the default label of the graph view's axis to None
instead of undefined.

task-3519566

closes odoo/odoo#136822

Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
2023-09-28 13:21:01 +00:00
Audric Onockx (auon) 0baaa4b654 [IMP] project,hr_timesheet: improve project update
Add a new column, after tasks that shows the following information :

Tasks: Total done tasks /  Total tasks (ratio in percentage)
Timesheet: Hours spent/ allocated hours (ratio in percentage) 
\> visibility: only show if the timesheet setting is activated.

Right side panel  :

Add the Done icon before Tasks 
Add hours spent/allocated hours information under the Timesheet
Extra time: Add a new stat button that shows
the overall extra time used for the project. 
visible if hours spent > allocated hours.
By clicking on this it will redirect to the same view
as we have for the timesheet stat button.

task-3432102

closes odoo/odoo#129177

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-28 07:50:02 +00:00
luvi b91f4034ab [IMP] *: improve documentation of options in fields metadata
*: analytic,  base_automation, loyalty, mass_mailing, project, web, web_editor, website

This commit adds many new documentation of options and their usage for
fields. This makes them more usable and customizable in Studio, and adds
documentation for developers to know the type of expected option.

Some options that might lead to issues or that are too technical have
been removed, as they are not relevant and not required in most use cases.

task-3469741

closes odoo/odoo#134858

Related: odoo/enterprise#47148
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-09-27 14:57:03 +00:00
dise 95e31691a7 [IMP] project: add company specific stages
Adding a company_id field in project.project.stage will allow companies
to have their own individual stages, which was not possible before since
all the stages were shared between all companies.

task-3330285

closes odoo/odoo#122597

Signed-off-by: Vincent Larcin (vila) <vila@odoo.com>
2023-09-20 13:03:03 +00:00
odoo 98452d37cb [FIX] web: fix long username in header and milestone issue
Description of the issue/feature this PR addresses:

when logged in user name is too long then it take whole header to display it
name.
In project module, if milestone name is long then name is overflowing.
Current behavior before PR:

whole header is occupied when username is long.
milestone name is overflowing when name is too long.
Desired behavior after PR is merged:

when username is long it would show with '...' format.
when milestone name is long it would show with '...' format.
Fix:

some property is added in oe_topbar_name class to display the username in short
and '...' format.
add some bootstrap class so that long name should be formatted in '...' .
task-3217427

closes odoo/odoo#135899

X-original-commit: 38ac3f21843842937a89ce8c2e07f7b54039348f
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Ravi Bhingradiya (ravb) <ravb@odoo.com>
2023-09-19 17:44:31 +00:00
Sébastien Theys 7ea370fce7 [REF] mail, *: tests: refactor contains to further remove jQuery
* = account, base_iban, bus, calendar, crm_livechat, hr, hr_holidays,
    im_livechat, mrp, project, sms, snailmail, test_mail,
    test_mail_full, web, website_livechat, website_slides

Add support in `contains` for most operations that we use in tests.
Remove return value from `contains`.
Move into `web` module.
Remove import/export chains, directly import from correct module.

closes odoo/odoo#134652

Related: odoo/enterprise#47064
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-14 11:22:47 +00:00
Aaron Bohy 0d7acf60b4 [REF] *: remove legacy Markup
Use owl.markup instead.

Part of task~3439226

closes odoo/odoo#134793

Related: odoo/enterprise#47124
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-11 19:13:59 +00:00
Valentin Chevalier 054ca0a19a [IMP] web, *: Add more formatters in assets_frontend
Before this commit, formatters like `formatMonetary` and `formatFloat`
weren't loaded in the assets front-end.

This commit introduces `formatAmount` ( `formatMonetary` calls
`formatAmount` but makes some prior processing to deduce the currency
from the field) and makes `formatAmount` and `formatFloat` accessible
from any front-end application.

Note: The currencies were added in the front-end session info because
they are needed in `formatAmount`.

closes odoo/odoo#133824

Related: odoo/enterprise#46658
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-09-06 19:43:39 +00:00
divy-odoo cea1cab535 [FIX] *: resolve the last tour step warnings
When we haven't provided a custom action, the tour step runs the default
action. In the final step of the tour, when there is no `run` or
`isCheck` provided, It shows warnings of 'ignoring action (auto) of last
step' as it can lead to a race condition.

This commit resolves the warnings: `ignoring action (auto) of last step`

task-3429500

closes odoo/odoo#129239

Related: odoo/enterprise#46683
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-09-04 15:02:47 +00:00
Jorge Pinna Puissant ebd538a194 [IMP] web, *: optimize save record from webclient
This commit, adds a new python method (`web_save`) to save a record, and
optionally read-it again in one rpc call. This optimizes the current
behavior that is to save a record in one rpc, and read-it in a second
rpc.

web_save, will receive the list of IDs of the records to save (if this
list is empty it will create the records, if not, it will write on the
existing records), the list of changed fields, and the unity
specification as optional argument to read the created/modified records
(if the specification is not set, the function will return a list of IDs
of the created/modified records).

closes odoo/odoo#133021

Task-id: 3453184
Related: odoo/enterprise#46559
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-04 09:19:06 +00:00
FrancoisGe 61307c162d [FIX] web: use evalContextWithVirtualIds for client expression
Before this commit, all python expressions in js were evaluated with
the same evalContext. Unfortunately, this is not possible for expressions
based on an x2many. The value of the x2many depends on whether the
expression will be sent to the server or not.

All expressions that are only used client-side, such as modifiers (readonly,
required, invisible), decorations, etc., must take virtual records into account.
For example, I define a button that must be visible when I have at least
one record in my x2many. So when I create my virtual record, I want
the button to become visible and not have to wait for the record to be
actually created.

For expressions sent to the server, such as domains and contexts,
we don't want them to take virtual records into account, as these are
not known by the server and could cause crashes.

Solution:
We have evalContext for expressions sent to the server
and evalContextWithVirtualIds for client-side expressions.

closes odoo/odoo#133718

Related: odoo/enterprise#46604
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-01 15:09:49 +00:00
Aaron Bohy 986c00c1bd [REF] web,*: always use unity_web_search_read
*project,spreadsheet

The unity version of web_search_read will soon replace the older
one, so this commit prepares the work by adapting the remaining
calls to web_search_read s.t. they call unity_web_search_read
instead.

Part-of: odoo/odoo#133617
2023-08-31 09:04:58 +00:00
Pierre Paridans 6c2764a753 [IMP] web,*: remove legacy o_field_many2manytags class & styles
task-3439226

Part-of: odoo/odoo#133289
2023-08-31 06:15:55 +00:00
Pierre Pulinckx (pipu) b7e07135c6 [FIX] *: fix missed replacments env._t by _t
Related to previous commit c07181b20b,
this commit fixed missed remplacments of this.env._t by _t, also
replace one occurence of _lt (not exist anymore) and replace remainings
core._t.

closes odoo/odoo#133503

Related: odoo/enterprise#46496
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-30 08:08:45 +00:00
Jorge Pinna Puissant 4bf77b9ef1 [REF] web: RelationalModel: add option to save after update
This commit adds an option to save the record after an update. When the
save option is set to true, the record will be saved and reload after
the update. Note that, the onChange is not done in this case.

Part-of task-id~3179751

closes odoo/odoo#130328

Related: odoo/enterprise#44905
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-29 11:10:45 +00:00
Bastien (bvdn) 1e181b6dd0 [IMP] project: add new controller for project model calendar view
Needed a new view just to be able to change the default display text in the calendar

Task-3251698

closes odoo/odoo#126358

Related: odoo/enterprise#41304
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-29 09:11:52 +00:00
Gurupreet Singh dbc660513c [FIX] project: fix visibility of subtask assign button in kanban view
In the project, the kanban view assign button is  visible in the subtask

task-3374861

closes odoo/odoo#132986

X-original-commit: 2669881160e474459158e61e9914e3024ae75d5e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-28 09:34:01 +00:00