**Good to know first**
The UI active element takership system is
directly bound to the focus trap mechanism.
**Before this commit**
If an element become the UI active element but has no
tabable elements in its tree, we force its tabindex
to the -1 value to make it programmatically focusable.
That way we ensure the focus is effectively trapped.
**After this commit**
The tabindex is no more forced at all.
Instead, if we detect that there are no tabable elements
inside the UI active element candidate, it simply does not
become the UI active element.
In other words, this commit kind of weakens the focus trap.
But this is perfectly fine for our use cases, i.e.:
- dialogs always have at least one focusable button (close, ok...)
- the website wysiwyg-adapter has a ton of focusable elements
**Why ?**
We need this change to permit other UI pieces to make use of
the active element takeover mechanism, i.e. popovers.
Part-of: odoo/odoo#140885
**Before this commit**
If a UI active element taker has its first or last
tabable element rendered conditionnaly, the focus trap mechanism will
not work properly.
**After this commit**
It works as intended.
Part-of: odoo/odoo#140885
There is a visual "glitch" in the website builder, there is a 2px white
bar (2x1px border) at the bottom of the screen in edit mode.
Steps to reproduce:
* Enter edit mode on a page
* Drag & drop a few snippets to have a scrollbar
=> The bottom white bar appears
closesodoo/odoo#140979
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Since we remove jQuery UI[1], the owl component `AutoCompleteWithPages`
doesn't work correctly on Safari.
When we clicked on the `AutoCompleteWithPages` input the code in the
`AutoComplete` component `onFocus` make a selection on the input of the
`AutoComplete` component and not on the `AutoCompleteWithPages` input
this make a unwanted effect such as blur the clicked input and focus
the other input. This commit fixes that.
Steps to reproduce:
* With Safari, open the `Website` app
* Click on `Site` > `Edit Menu` > `Add Menu Item`
* You can't type in the url field and if you spam click on its.
Sometimes, it produces a browser crashes
Links
[1]: https://github.com/odoo/odoo/commit/99f5ae32d3ee4a3dcc75e31ad0a88f42d6ce3589
Part-of: odoo/odoo#140979
Before this commit:
Message type of rating messages for Livechat Session in demo data was not set,
which led it to set default type `email`.
Which would lead to display the `Show/hide original email` button.
After this commit:
Set `message_type` as `notification`.
task-3502745
closesodoo/odoo#140975
X-original-commit: 1b33e019ba7cf9b1dc272a0fedc1b8534b9e8867
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit forces the color of all buttons in the header to have a
better-look consistency.
Steps to reproduce:
* Open Odoo on small screen
* Go to Sale
* Create a new SO
* Click on customer field to open the Kanban view => BUG
the clear button is not visible (enterprise)
closes odoo/odoo#141040
Forward-port-of: #50123
X-original-commit: aa748820d06ddd84465c404ce158e882307dbda6
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Before this commit service threshold value for 'unit'
unit of measure display (1 unit = 8.00 hours) but since
https://github.com/odoo/odoo/pull/99785 PR we take 1
unit equals to 1 hours not 8 hours.
This commit display (1 unit = 1.00 hour) to dispay proper
value according to calculation.
task-3282848
closesodoo/odoo#141039
X-original-commit: d27209ef9bc4f57a8f7401e5271915763df5eeb1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Prior to this commit, on mobile, we couldn't see the entire offcanvas
menu because the browser's UI was hidding part of it.
To fix that, this commit adapts the height of the offcanvas menu using
`dvh` unit.
task-3582657
closesodoo/odoo#141032
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
When we're exiting the import view, we need to have ids of the imported records
to confirm that the import was successful and to filter on import records if
needed.
This commit adds an optional resIds parameter.
task-3549609
closesodoo/odoo#140969
X-original-commit: bb968c5e197e37c0391209420655a777821aa3f1
Related: odoo/enterprise#50141
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
Before this fix, a condition of the form (field_name, "in", expr) would
be "stringified" in such a way that expr would be wrapped in a list, e.g.
we would get by expressionFromTree the expression
field_name in [expr]
Here we prefer to keep expr as it is since we have no information on its
type at evaluation. That is we transform the above condition into
field_name in expr
closesodoo/odoo#140966
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Steps to reproduce:
- Install Sale and Purchase and enable UoM
- Change 'Acoustic bloc screen' purchase UoM to dozen
- Create a PO for that product
- Access the product page from PO line
- Wrong Sales price
Bug:
the jsonrpc to read product data needlesslt sends the UoM in the context
which leads to the sales price being updated by _compute_product_lst_price
Fix:
remove UoM from procut context as it is not necessary
opw-3434574
closesodoo/odoo#140957
X-original-commit: fe04d61a886fa7b461ebf9bda2d7479fb69281cd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
**Before this commit**
Open some popover then a dialog.
The popover appears in front on the dialog.
Examples:
- Calendar > Click an event (popover opens) > Open command palette
- Open a facet domain editor dialog in any app, then open any model
field selector popover and open the command palette
**After this commit**
Each first-level child of the overlay container
starts with the same z-index and with a value
that is greater than the higher value we can find
in the bootstrap z-index master list.
This solves the aforementioned overlaping issues.
closesodoo/odoo#140953
X-original-commit: 9682cfa174fb39ec9d9874951ea9ee2884058d96
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Before this commit, the user could drag the first employee displayed
in the gantt and drop him on one of his subordinate. By doing that,
the manager of that employee will be his subordinate and a cyclic
will occur and no record will appear when the org chart will be
reloaded because no employee will have no manager set.
This commit fixes the issue by improving the cyclic detection when
the user uses the drag and drop feature. That is, the action will be
blocking when the system detects the user tries to drag and drop a manager
to one of his subordinates.
closesodoo/odoo#140951
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, some recent changes altered the generic view for
Org Chart view of `hr.employee` model. The problem is those changes
also altered the other hierarchy view used in others models.
This commit moves the recent specific changes to hierarchy view
of `hr.employee` model to be sure to alter only the org chart view
of that model.
Part-of: odoo/odoo#140951
When we add a many2many field related to Project, an error is thrown
when we add 2 or more projects
Steps to reproduce:
1. Install CRM, Project and Studio
2. Go to CRM and open any quotation
3. Trigger Studio
4. Add a many2many field related to the Project model
5. Close Studio
6. On the CRM form, click on Add a line and select 2 projects, the 2
projects must have the same sequence (new projects will have a
sequence of 10)
7. An error is thrown
Problem:
The "name" field used in the order of the list view for project was not
present in the view so there was an error when trying to sort the list
by this field
opw-3526101
closesodoo/odoo#140950
X-original-commit: 334e6fc41725fe0bd7e6bae8e2153c6abedc71cf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
In this commit we adjust the pos module such that, in the
corresponding enterprise commit, we can more easily add the
tax letters corresponding to each orderline in the receipt.
closesodoo/odoo#140974
Related: odoo/enterprise#50134
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
To reproduce:
- Install studio and account.
- Invoicing/Accounting, menu Customer > Invoices
- Activate kanban view
- Put filter "My Invoices"
- Enter studio mode
=> There is a traceback in the logs, even if not shown in the view.
When entering studio in kanban, a card with default values is created.
The problem was that the journal wasn't computed, and so, broke
the onchange_partner_id function
It was because move_type, while being in the default, wasn't in the view,
and so wasn't in the values given by the js.
closesodoo/odoo#140927
X-original-commit: 629176269614467c637543b11fc556a63ee70c5b
Signed-off-by: William André (wan) <wan@odoo.com>
Current behavior:
When the user language uses a different decimal separator than the
"." (dot), the tip amount is not formatted correctly and the amount is
incorrect. e.g. 1.5 is interpreted as 15.0
Steps to reproduce:
- Change the current language decimal separator to "," (comma) and
thousand separator to "." (dot)
- Open restaurant (make sure tip after payment is enabled)
- Add a product to the order
- Pay by bank
- Click on tip 20%
- The tip amount is incorrect (too high)
opw-3525033
closesodoo/odoo#140926
X-original-commit: f0cd80fbb55e0f234800c6be4696ff8e1533978b
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Steps:
- Open Settings > Users
- Change the name of the user by typing it multiple times
- Go to the portal view of the website
- Among the Documents select Task > select a task where our user is set as an
employee
Issue:
- When that particular task is chosen, under the Timesheets, the name is found
repeatedly in the table.
Cause:
- The text is not truncated due to which the name overflows.
Fix:
- adding a class 'o_portal_my_doc_table' in the table which helps to truncate
the text
closesodoo/odoo#140922
Task: 3383519
X-original-commit: b7952e2cf649584906ddab57386b711e06de9ba2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Description of the issue/feature this PR addresses:
The "View My Services" button of the widget should open
the IAP accounts tree view, just as the main "View My Services"
button of the general settings.
Current behavior before PR:
View my services widget redirected to iap website
Desired behavior after PR is merged:
Updated the widget to redirect to tree view of services
task-3580190
closesodoo/odoo#140904
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
If the web client gets into a bad state and piles on errors (or
exceptions) this leads to a mess with hundreds of kilobytes of
warnings being logged as we try to set an already failed tour to
failed (and also take screenshots), as in
http://runbot142.odoo.com/runbot/static/build/53098209-master/logs/test_only.txt
Also update `has_failure` to directly depend on an exception being
set, as that should be a more reliable indicator. And much like the
case of an error log skip trying to set the tour to failed in
`_set_exception` if it's already failed. Although in that case do log
the traceback as an `error`.
closesodoo/odoo#140879
X-original-commit: 96c501036a6dcb216e82e0dfa42b59a9b917d742
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
We currently have two date fields, "date" and "invoice_date". Before this pr,
the "date" column was before the "invoice_date" field. We think it's more
logical to have "invoice_date" before the other, since it's the legal date.
What has been done:
- Swap in the tree view the two columns
- Swap in the search view the two columns
closesodoo/odoo#140878
Related: odoo/enterprise#50107
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Steps:
- Install Field Service
- Open the Field Service module
- Click on the configuration
- Go to the Worksheet Template
- Now go to the kanban view
- In view, Click on dropdown menu of any card
Issue:
- In kanban view, when we are viewing in dropdown menu colors are not correctly
centered.
Fix:
- Added in kanban color picker mb-0 & ms-2 for margin space from bottom & left.
Task-3508241
closesodoo/odoo#140807
X-original-commit: 97e90710f5f2e300131df442bba833a5e7ece29e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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
closesodoo/odoo#140798
X-original-commit: fbf245cb81453e1fedbfd4649a8284546da44ffb
Related: odoo/enterprise#50074
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Prior to this commit, the patched setup functions of Order did not match
the original signature.
closesodoo/odoo#140893
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
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).
closesodoo/odoo#140891
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
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.
closesodoo/odoo#140888
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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.
closesodoo/odoo#140887
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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.
closesodoo/odoo#140886
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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)
closesodoo/odoo#140767
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
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
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.
closesodoo/odoo#140719
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
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
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.
closesodoo/odoo#140674
Task: 3580153
Related: odoo/enterprise#50003
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
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.
closesodoo/odoo#140618
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
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
closesodoo/odoo#140383
X-original-commit: eccefab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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