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
closesodoo/odoo#139736
Related: odoo/enterprise#49570
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
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
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
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
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
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
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
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
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
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
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
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
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
closesodoo/odoo#139642
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#139572
Related: odoo/design-themes#731
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
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.
closesodoo/odoo#139497
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
*: 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.
closesodoo/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>
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
closesodoo/odoo#140066
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#140661
Related: odoo/enterprise#48652
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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.
closesodoo/odoo#133696
Task: 3283010
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
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.
closesodoo/odoo#140675
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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.
closesodoo/odoo#140671
Signed-off-by: William André (wan) <wan@odoo.com>
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
closesodoo/odoo#140669
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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.
closesodoo/odoo#140664
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
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
closesodoo/odoo#140663
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
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
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
closesodoo/odoo#140362
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
From the backend manufacturing order view, it was no longer possible
to specify batches/serial numbers for by-products.
Now it is.
closesodoo/odoo#140446
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Step to reproduce:
- Order a combo product in pos_restaurant
- Order the same combo product for the same table
- The second order will not be processed
Previously the getOrderChanges method was computing the orderline changes based on
a key composed of the product id, the full product name and the note. This was
done considering the fact that the merge orderline was working. Combo products
are not handled by the merge orderline. Because of this, if 2 orderlines of
combo product were the same, only the last orderline would be taken
into account. To prevent this, this commit changes the key to the uuid wich
is a unique identifier to an orderline.
closesodoo/odoo#140416
Related: odoo/enterprise#49893
Signed-off-by: David Monnom (moda) <moda@odoo.com>
This commit fixes some layout issues in the portal sale interface.
Before this commit, the sidebar layout was broken if the button `reorder`
is activated.
This is due to the layout of the xpath and the general layout of the
template.
This commit fixes this issue and also improves the layout of the sidebar.
We also fix an issue in the different sections displayed inside the page,
with a missing spacing between two of them.
task-3572209
closesodoo/odoo#139882
Signed-off-by: Chrysanthe Gomrée (chgo) <chgo@odoo.com>
Current behavior: if the user has no access to crm.lead, it shows the
error
You are not allowed to access 'Lead/Opportunity' (crm.lead) records.
This operation is allowed for the following groups:
- Extra Rights/Contact Creation
- Sales/Administrator
- Sales/User: Own Documents Only
- User types/Portal
Contact your administrator to request access if necessary.'
With this fix, First check the access to the model to count the records
or assign zero.
Related ticket #3546713closesodoo/odoo#140827
X-original-commit: d0f373ba5bd0f0aaa1f464158d02f1a25d781751
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
It's no longer necessary to interact with the orderlines in the order history
because it's showing already paid orders.
closesodoo/odoo#140754
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Since [1] when the layout of the theme options was reorganized, the
button's font-family option was not displayed anymore.
This commit restores the button's font-family inside the "Button"
section, before the button "Padding" options.
[1]: https://github.com/odoo/odoo/commit/388e4bb2bfcaebdd4ff30277fb49a034592d7086
task-3478355
closesodoo/odoo#140692
X-original-commit: 718ae15606fe452da26fe9c4fa9c90cc443fd8f1
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Steps to reproduce: (ETA API credentials required)
- Install l10n_eg_edi_eta
- Switch to an Egyptian company
- Configure ETA API Integration
- Create a tax with "Fixed" as "Tax Computation"
- Create an invoice with the created fixed tax
- Send the invoice to ETA
The invoice is rejected by ETA.
Cause:
The generated EDI document contains an entry looking like this:
"taxableItems": [{"taxType": "T1", "amount": 28.0, "subType": "V009", "rate": 14.0}]
where each element of "taxableItems" is a dict with the details of each applied tax.
However, for fixed taxes, the "rate" key should not be there.
Solution:
Only populate the "rate" key if the tax is not a fixed one.
opw-3436422
closesodoo/odoo#140850
X-original-commit: 07f6321f7fd64a394e348e37353f8300103a4a42
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Prior to this commit, there was no space between tags and the label.
This commit adapts the label margin to maintain layout consistency.
task-3575796
closesodoo/odoo#140764
X-original-commit: cf1383c15cbe7dd846b0bb8bc38f7afd93db61b5
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Add export to 'getDifferentParents' and 'triggerPointerEvent'.
It is useful for creating a custom drag and drop for example.
closesodoo/odoo#140542
Related: odoo/enterprise#49926
Signed-off-by: Ruben Gomes (rugo) <rugo@odoo.com>
Reproduce
Create some expense, approve some of them
Expected:
On journal dashboard, The Expense Journal need to display Number of
Expense to process
Actual:
number_expenses_to_pay does not display on The Expense Journal because
we haven't override the needed method yet
Also this PR aim to improve the open_expenses_action to display
correctly the number of expense on the journal dashboard
closesodoo/odoo#139971
X-original-commit: dd3e59a8c86dab6be6d01f776e6890fb9ad97605
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Before this commit:
When we try to click on element contenteditable=false then it is switch to
nearest editable area.
After this commit:
When we try to click on element contenteditable=false then it will not switch to
nearest editable area.
Task-2977246
closesodoo/odoo#139961
X-original-commit: 3b8e4bc123dd87857d6634b55ddaaa716a0729ce
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit, there was an issue with the dropdowns in the editor
panel. When the selector was at the bottom of the panel, the dropdown
opened outside the viewport, requiring the user to scroll the editor
panel to see it.
After this commit, the dropdowns in the editor panel open above the
selector if there is not enough space below for it to be visible without
scrolling.
task-3500768
closesodoo/odoo#135788
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce the bug:
- Open the Menu Editor.
- Add a menu item.
- Type a URL (which will trigger the autocomplete).
- Bug: You can't select the last URLs in the autocomplete dropdown
because it goes off screen and can't be scrolled.
This bug was introduced by the commit [1]. Since this commit, all modal
dialogs are vertically centered, which is why the bug fixed in this
commit occurred.
[1]: https://github.com/odoo/odoo/commit/dd141a22f44ea88af18448c4a6089252daeba8cc
task-3580373
closesodoo/odoo#140846
X-original-commit: 23272e38d822c734d1ea2fdb404ba2b1d6890cb3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>