Commit Graph
167234 Commits
Author SHA1 Message Date
Julien Carion (juca) 04a67936d5 [FIX] web: add shortcut to cog menu
This commit adds the "alt+u" shortcut to open the cog menu in order
to match with the behavior of the actions menu.

task-3560446

closes odoo/odoo#140798

X-original-commit: fbf245cb81453e1fedbfd4649a8284546da44ffb
Related: odoo/enterprise#50074
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-11-04 04:29:34 +00:00
Sébastien Theys 221b11e7ac [FIX] mail: lazy load message out of focus sound
There is no reason to load this sound until it should be played.

closes odoo/odoo#140900

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-04 03:25:48 +00:00
Loukas Wets (lowe) df53cf7fd0 [FIX] pos, pos_restaurant: patched order setup signature
Prior to this commit, the patched setup functions of Order did not match
the original signature.

closes odoo/odoo#140893

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-11-04 03:25:46 +00:00
Joseph Caburnay 03f104d184 [FIX] point_of_sale: category selector images
We now only show the category images when:
- there is at least one loaded category with image,
- height of the products widget is at least 720px,
- and, ui is not small (note pos override on ui_service).

closes odoo/odoo#140891

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-11-04 03:25:45 +00:00
Joseph Caburnay b91aea2351 [FIX] point_of_sale: proper style for button to open input
Part-of: odoo/odoo#140891
2023-11-04 03:25:45 +00:00
Joseph Caburnay 5b587b2223 [FIX] point_of_sale: reserve space for category caret
Part-of: odoo/odoo#140891
2023-11-04 03:25:45 +00:00
Dossogne Bertrand 4edba45a51 [FIX] hr_holidays: fix accrual leaves display
Before this commit, leaves linked to accrual allocations
taken in the future would still be takin into account in the display,
resulting in a warning if the leave excessed the amount that the
employee currently had allocated.
This leave removes any future leave to be taken into account if
the leave type has any accrual allocation set for the employee.

closes odoo/odoo#140888

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 03:25:44 +00:00
Dossogne Bertrand 0a9e83dfd8 [FIX] hr_holidays: fix accrual plan level type compute
Before this commit, the `added_value_type` field wasn't properly computed
in the `hr.accrual.plan.level` model resulting in some issues upon
the creation of a second level.

closes odoo/odoo#140887

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 03:25:43 +00:00
Dossogne Bertrand 22e4d3f715 [FIX] hr_holidays: fix various bugs
This commits fixes 3 issues:
- Traceback on the creation of a new leave:
If the french holidays l10n is installed, creating a new leave
was impossible due to an override of a method was not adapted to
a change on the base method `_get_duration`

- Impossibility to create a leave for more than 1 employee:
the validity check was only done for the employee set in employee_id,
which was resulting in a traceback if the leave was created for
more than one employee.

- Wrong error message:
Before this commit, the error message given to the employee if
the leave isn't possible to create was directed to an employee creating
is own leave. As this is not the only way to create a leave, the message
has been adapted to reflect every situation.

closes odoo/odoo#140886

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 03:25:42 +00:00
Tiffany Chang (tic) ef75711fb2 [FIX] mrp: clean bom overview report
Does 2 things:
- ensure that the "free_qty" doesn't display a negative value (=>
  consistent with MO overview + avoids neg "Ready to Produce" values)
- ensure that showOptions.availabilities is always a Boolean and never
  "undefined" (=> avoid traceback when opening overview while in debug
  mode)

closes odoo/odoo#140767

Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-11-04 00:38:33 +00:00
Tiffany Chang (tic) 79ab83e732 [FIX] mrp: correctly calculate producible_qty Ready in MO Overview
Previous to this commit, the qty reserved was only considering the
currently reserved quantities in the MO, not the ones calculated and
displayed in the MO Overview (i.e. including the quantities reserved in
the picking during 2 step mrp). This would lead to showing reserved
quantities but a "Not Ready" status, which is confusing and
inconsistent.

Now we pass the calculated component quantities to the method that
calculates this state and ensure the calculation is consistent.

Steps to reproduce:
- enable 2 or 3 step mrp
- create an MO with a component that is in stock at the stock loc
- confirm MO and open "Overview"

Also change "Quantity" back to "Reserved" in the pdf version of the MO
Overview. This was a mistake change since this column name already
exists and "Reserved" will be hopefully less confusing for users.

Part-of: odoo/odoo#140767
2023-11-04 00:38:33 +00:00
Julien Carion (juca) 924a797a3b [FIX] web: domain field: foldable invalid domain
This commit fixes an issue with the domain field where a traceback would
be launched when an invalid domain is received. It also changes how
invalid domains are displayed in foldable domain fields so that only the
content of the domain selector component is displayed in this case.

closes odoo/odoo#140719

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-11-04 00:38:32 +00:00
Julien Carion (juca) 058117c333 [FIX] web: domain field: validate domain when edited in debug
This commit changes the behavior of the domain field such that it
performs a quick validation of the domain after it has been edited in
the debug input. This solves an issue where the isValid state was not
properly updated after debug input edition.

Part-of: odoo/odoo#140719
2023-11-04 00:38:32 +00:00
Rémi Rahir (rar) d11845e322 [IMP] spreadsheet: Improve ODOO.PIVOT.TABLE hook value
In order to identify an ODOO.PIVOT.TABLE formula cell, we set the
display name of the pivot as the evaluated value of the cell containing
the formula.

closes odoo/odoo#140674

Task: 3580153
Related: odoo/enterprise#50003
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-11-04 00:38:29 +00:00
snd 7c45aca3be [FIX] stock: remove old lines when generating serials
When generating serial numbers or importing them, the old lines are still present
and the quantity done gets raised by the quantity of the added lines. This forces
the user to manually remove each old line one by one.

This ensures that old lines are removed by the amount of newly created lines.

closes odoo/odoo#140618

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-04 00:38:26 +00:00
Abderraouf Ghrissi (abgh) e9225d52af [FIX] project_timesheet_holidays: generate timesheets from leaves
Description of the bug:
timesheets are not being generated when validating time off

Steps to reproduce:
- activate Time Off setting
- timeoff type form: choose a project and a task
- create and validate a leave request with the type modified in
previous step
- no timesheets added

Source:
in task 3279188, leave validation function was replaced from
_timesheet_create_lines to _validate_leave_request, this one
checks if the company of the selected project of the leave type is
equal to the company of the type or env.company.
if not, we don't generate timesheets even if the project/task are set.

Solution:
leave type form:
- generate timesheets have a True default value
- in the absence of a company, we display the 'generate timesheets'
(in debug mode) and hide the project/task fields.
=> when the company is removed, project/task will be removed thanks
to the compute method, you can only change them manually if the company
is set.

When generating timesheets from leave validation, we refer to the project/task
set in the company of the employee if no company is set in the leave type.

task-3576751

closes odoo/odoo#140383

X-original-commit: eccefab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-04 00:38:26 +00:00
xO-Tx 9cd1b671f4 [IMP] website, web_editor: integrate new text highlights designs
task-3285817

closes odoo/odoo#140372

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-04 00:38:25 +00:00
Leonardo Pavan Rocha 8ad097d363 [FIX] hr_homeworking: fix locale week name in set_employee_location
After the rework of hr_homeworking, a traceback started occurring if the odoo
server was running in an environment with a different locale. Since
`.strftime("%A")` is a localized method, it wouldn't return the week name in
english. This would cause a traceback because we would try to access fields
that don't exist (e.g. jeudi_location_id). This commit changes the approach to
get the weekday number and uses an array to access the correct field name.

task-3570053

closes odoo/odoo#139736

Related: odoo/enterprise#49570
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha ff2e27afde [FIX] hr_homeworking: don't show work location if not location set
In homeworking, we currently show the work location as false if a location is
not set. This commit fixes this issue by checking if the location is set before
rendering.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha 4e41bc3d1b [FIX] calendar: move calendar integration from cog menu to module settings
Currently the calendar integration can be accessed from the cog menu when in
the calendar module in the calendar view. However, it is a bit hidden. This
commit removes the button for calendar integration in the cog menu and also we
move the calendar integration settings from the general settings to a new
calendar specific settings page.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha 031cfa321b [FIX] calendar: fix attendee_tags_list show plus icon closer
In calendar, when you have many attendees for an event, the popover hides some
of them and adds a "+ x" to indicate there are x more attendees going to the
event. However, since this had its text be centered, it was looking a bit off.
This commit removes the centered text so that it is aligned with the other
attendees.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha b9ea99f667 [FIX] web: calendar hide weekends feature not showing
After the calendar revamp, a button in the scale selector to hide/show the
weekend in the calendar view was not being rendered. This was caused by a
wrong rebase that removed the props that were supposed to be passed to the
ViewScaleSelector component. This commit fixes this, therefore bringing back
the feature.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha ca66b8b9bd [FIX] {google_,microsoft_}calendar: fix calendar onboarding
Currently the onboarding of calendar is set if you simply open the credential
configuration page and close it. Ideally we just want to close it if the
credentials have been set. This commit implements this change.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha df62b58341 [FIX] calendar: yearly recurrence was being shown as custom weekly
In calendar, we use the interval value of the event to define if the
rrule_type_ui is custom or not. However, since a yearly recurrence in odoo
becomes a monthly recurrence every 12 months, we were showing the rrule_type_ui
as custom. At the same time, we were getting the wrong rrule_type. Instead of
being a monthly rrule type, it was being set as weekly (the default rrule_type).
This commit fixes this by getting the correct rrule_type, however we still show
it as custom as internally the yearly recurrence is a monthly one with interval
set to 12.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Elisabeth Dickinson f2579aa30c [FIX] web: remove unused xpath
This xpath was added in the calendar's revamp PR but is not used.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Elisabeth Dickinson 501f5cd58e [FIX] web: remove margin in the day-header of calendar's week view
The left margin in the day header was meant for day view only.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Elisabeth Dickinson 905b3f39e4 [FIX] web: add more space before calendar's title
The calendar's title in the header can use a bit more spacing

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Elisabeth Dickinson 740ddbb12b [FIX] web: fix calendar's sidebar spacings
The datetime picker's top and bottom padding is unnecessary in the 
calendar's sidebar.
An extra margin is added below the filters because the sync buttons
were too close.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Elisabeth Dickinson a78dd31669 [IMP] web: remove .o_calendar_popover_open class
The class was added to make the event highlighted when the popover is 
open, but this is buggy at the moment, better to remove until a better
fix can be made.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha 084e2f7079 [FIX] calendar: fix calendar event form view UI
Currently, the calendar event form view looks a bit off since some fields are
not aligned.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha 82c9e8f85c [FIX] hr_homeworking: fix homeworking button not clickable in week scale
https://github.com/odoo/odoo/pull/138670 changed how the set location buttons
look, however this change started causing the button not to be clickable. This
commit fixes this issue. Also we change the button text from "add location" to
"set location". On top of that, the "set location" button takes too much space,
creating a big gap between the date and the events for that day. To make the
gap smaller, we reduced the size of the button.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha d1285bc41c [FIX] web: calendar grid not being applied in tablet resolution
After https://github.com/odoo/odoo/pull/138670, the calendar view would start
breaking in tablet resolution. This was caused by a wrong media query that
was not being applied to tablets.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha 7eda053830 [FIX] web: scrollbar in calendar mobile view is on top of text
Currently the overflow-auto of the filters is in the wrong div, causing the
scrollbar to render on top of the attendees' names. This commit fixes this
issue by moving the overflow-auto to the correct div.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha a4ef58e6d5 [FIX] web: datetime picker gap not being set between picker titles
Currently the datetime picker computes a gap property in css for the rendered
titles, however since the display is not set as flex, the gap is not applied.
This commit adds the flex display so that the gap is applied.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00
stefanorigano (SRI) 9a17a7aa07 [IMP] website, web_editor: restore default inputs to white + add config
This PR refactor the "inputs design system" by reverting the correlation
'$input-bg == $light == color-3', initially introduced by #120302.

Beside ensuring color-consistency, the former system aimed to simplify
palette edition by clarifying how color-3 was used (simply all the UI
elements...).

While the former system was responsive to user customization and
color-presets, it didn't necessarily delight everyone's discerning
taste, at least not with default settings/palette.

This commit enforces a classic "white with borders" design that's
independent from the color palette and doesn't adapt to color-presets.
The rationale behind this decision is that the need for non-white inputs
is "nonexistent" and exceptional cases should be addressed using the
SCSS editor.

As a workaround to ease edition for users that still wants to challenge
themselves with the creation of "not standard" palettes/designs, this
commit introduce a colorPicker option assigned to $input-bg.
The hope is that this new controller help users finding a "compromise
color" that could work with any color-presets.

task-3568806

closes odoo/odoo#139642

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-04 00:38:19 +00:00
Benoit Socias 261d803239 [IMP] website: remove duplicate and conflicting classes
When introducing the templates for the "new page" feature in [1], on
some elements classes ended up being specified twice, or being added
without removing a contradicting class (e.g. different bottom paddings)

This commit adjusts the blocks of the new page templates so that:
- no class appears twice
- only the visually applied class of several conflicting classes is kept

For `pt*`, `pb*` and `o_cc*` the class with the highest number is the
visually applied one.

[1]: https://github.com/odoo/odoo/commit/b27d52c193a08fe6a4471c844afa3d01a33ccace

task-3562147

closes odoo/odoo#139572

Related: odoo/design-themes#731
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-11-04 00:38:18 +00:00
Antoine Boonen 2b95b87571 [IMP] account: improve performance of is_used computation on account.tax
Problem
---------
The compute_is_used function currently parses through a huge amount of
data using the _read_group ORM function. Which causes some performance
issues in large databases.

Objective
---------
Improve performance of the said function.

Solution
---------
Instead of reading the data on whole tables (ex.account_move_line), we
read the relation table between the modules and the taxes. This is done
using SQL queries with the EXISTS statement.
Furthermore, the code logic is modified so that if all the taxes for
which we compute `is_used` have been found, we don't look further in
other modules since doing this cannot add an new relevant information
and actually slows down the computation.

closes odoo/odoo#139497

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-11-04 00:38:16 +00:00
Theo VINCENT (thvi) 7f1c96995f [IMP] pos_self_order, *: notify backend payment
*: point_of_sale

Updates the self-order UI and preparation display when a POS order is paid from the backend interface.
The preparation display is notified following what has been done in 4b2f14db946cb266feba3ab856d359faca919014.

closes odoo/odoo#140092

Task-id: 3568361
Related: https://github.com/odoo/enterprise/pull/49731
Related: odoo/enterprise#49731
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-11-03 18:05:37 +00:00
jugj-odoo 3244017696 [FIX] hr_attendance: Hide hours today in systray if 0
Due to rounding errors, the variable isFirstAttendance was not computed properly
due to hours_today not being exactly 0, we apply a 3 digit precision rounding to solve
this issue.
task-3565209

closes odoo/odoo#140066

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-03 18:05:36 +00:00
suresh badikala c0f6ecd5d2 [FIX] project: fix the traceback when group by project in the planning
Steps:
- Open Field service
- Select planning then by user
- Group by project
- The trace back is coming

Issue:
- when we trying to group by projects the trace back is raised.

Cause:
- In  '_search_on_comodel' method filtered_domain does't set perfectly,
  The filtered_domain it is not set for the additional_domain , when we
  given on additional_domain, on that time filter_domain does not consider
  the additional_domain, because of that traceback will be coming.

Fix:
- By adding an 'if' condition for cases when you provide an additional
  domain, it will work fine.

task-3522178

closes odoo/odoo#140661

Related: odoo/enterprise#48652
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-03 18:05:34 +00:00
Tejas Modi cd53a24e0b [IMP] mrp: stop creating return on done transfer
Before this commit
===================
In MO if a line is deleted or line has its to consume quantity reduced so in
done state transfers return is creating.

After this commit
===================
Stopped creating the return on done state transfer when quantity is reduced or
a line is deleted.

closes odoo/odoo#133696

Task: 3283010
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-03 18:05:33 +00:00
vava-odoo 4048cd824e [FIX] website_sale: fix fiscal position of public partner
Error 500 when accessing the shop page when not logged in. The error was
introduced by odoo@4069158c9 where we take the id of the id.

closes odoo/odoo#140675

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-11-03 16:43:37 +00:00
Thomas Becquevort (thbe) 31ba272955 [FIX] account: Traceback on studio opening in Amounts to Settle
Steps to reproduce:

1. Open the "Amounts to Settle" view of either the Customers of Vendors menu
2. Click on the Studio button on the top right of the window
3. A traceback appears.

Issue/Feature this commits addresses:

When on the "Amounts to Settle" view, when clicking on the Studio button,
a traceback appears and the studio menu is not opened. This should not happen.

Desired behavior after this commit is merged:

This fix makes the event that would cause the error not possible anymore.
The studio menu should always open and not cause that traceback anymore.

closes odoo/odoo#140671

Signed-off-by: William André (wan) <wan@odoo.com>
2023-11-03 16:43:36 +00:00
Robin Lejeune (role) b1414d3c30 [FIX] website, website_sale: remove forced options views in headers
Since [this PR], some headers have some preselected options. For
instance, by default the header_sales_one displays social icons without
colors and a CTA button with rounded sides. However, if one modifies the
option in the panel, it appears to be working, but upon save it goes
back to no_icon_color / rounded sides.
This happens because the option is forced by the header template. That
behavior takes the precedence over the user's option choice.

As there is no proper way to make it work without modifying the model,
this commit removes the forced option on the templates for Odoo 17.
It should be properly reintroduced in master.

[this PR]: https://github.com/odoo/odoo/pull/119650

task-3576074

closes odoo/odoo#140669

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-03 16:43:35 +00:00
Julien Mougenot 210c03fde0 [FIX] web_tour: ensure tours are run only once
Before this commit, tours could be resumed AND started in the same
sequence, causing object mismatches in the tour service internals and
resulting in multiple tooltips being displayed at the same time.

This commit ensures that a tour instance can only be run once at a time.

closes odoo/odoo#140664

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-11-03 16:43:34 +00:00
Arnold Moyaux 2e254f07c2 [FIX] stock: refresh on state change
Temporary fix to revert once it will be done correctly on
client side. The idea is to remove the variable after a record
editation in order to trigger the recompute of column width

closes odoo/odoo#140663

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-03 16:43:33 +00:00
Arnold Moyaux e518dc9fc6 [FIX] stock: UI issue at confirmation
Currently after confirmation on picking. The details operations button
is mixed in the trash icon. The view needs a refresh to be correct.

This is cleaned by moving all the buttons together and introducing the
custom column before the last buttons group.

Part-of: odoo/odoo#140663
2023-11-03 16:43:33 +00:00
Louis (wil) 548198ed2b [FIX] base_automation, website_sale_wishlist: correct typos
Corrects typos found when translating Odoo 17.

closes odoo/odoo#140627

Related: odoo/enterprise#49981
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-03 16:43:31 +00:00
Robin Lejeune (role) 143bdfa13d [FIX] web_editor, website: fix columns mobile orders
This follows [commit 1], which introduced a way to separately reorder
columns on mobile and desktop.
This commit replaces the custom mobile order classes with the Bootstrap
`.order-x` classes.
It also ensures those orders are not used for mass mailing in case the
editor composes their email on a small window. The reorder would indeed
not have any effect for the end users in such a case.

[commit 1]: https://github.com/odoo/odoo/commit/710d000f1872fd99b41d52ec3d6923756bba7cba

task-3576046

closes odoo/odoo#140362

Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2023-11-03 16:43:29 +00:00
JF Aubert bc5392b24c [FIX] mrp: fix tracked by products
From the backend manufacturing order view, it was no longer possible
to specify batches/serial numbers for by-products.
Now it is.

closes odoo/odoo#140446

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-03 13:33:28 +00:00