Since https://github.com/odoo/odoo/pull/99503, o_xxl_form_view is
removed from the modal but there was still an useless overflow present.
Also we removed the `flex-flow: row nowrap;`,
as the flex direction is handle by the `form_compiler`
Note:
for a display: flex the default value for direction and wrap are:
```css
flex-direction: row;
flex-wrap: nowrap;
```
To reproduce:
- Add a bank account on accounting app
- Choose "create it" at the bottom of the modal
- The modal is broken
closesodoo/odoo#99677
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, these tests sometimes failed because the
autocomplete dropdown updated itself after a delay. These tests
patch it s.t. there's no delay in the tests. Something similar is
done in the Many2oneField test suite.
Example of impacted staging and nightly builds:
https://runbot.odoo.com/runbot/build/19121210https://runbot.odoo.com/runbot/build/18976006
This commit also removes unnecessary patches that set the delay of
the Autocomplete component to 0, but this has no impact as this
property doesn't exist (this was done in addition to a patch of
setTimeout which is enough anyway).
Closes#99781closesodoo/odoo#99788
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
This commit fixes the BooleanField which didn't
turned the row in edition when clicked on it since
the event was stopped by the Checkbox component.
The disabled input should not stop the event, since
the component do not need to handle a click being
done on it.
The test in editable list has been adapted to add
this assertion.
closesodoo/odoo#99759
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Instead of fetching all field attributes sent with the field list
to the web client,
restrict the attributes to the ones actually required by the web client
This allows, for instance,
to gain 44,75KB on each call on `get_views` for `account.move`,
from 208.78KB to 164.03KB,
with only `account_accountant` installed.
closesodoo/odoo#99660
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
To reproduce the issue, set the local timezone of the computer and the user to Pacific/Auckland.
Create a new time off from the dashboard.
The date_from and date_to are one day apart.
task-2885980
closesodoo/odoo#99072
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Opening journal items does a query similar to
```sql
SELECT
"account_move_line".id
FROM "account_move_line"
LEFT JOIN "account_move" AS "account_move_linemove_id" ON ("account_move_line"."move_id" = "account_move_linemove_id"."id")
WHERE
ORDER BY "account_move_line"."date" DESC,"account_move_line"."move_name" DESC,"account_move_line"."id" ,"account_move_line"."id" LIMIT 80
```
Indexes on `date` weren't used in such queries. Building a compound index that includes
`id` changes the index cost computation, and allows a Index Only Scal. So, it does not
have to jump on data pages anymore to retrieve the ID of rows.
Without that, postgresql will use a Seq Scan. It went from 10s to 5ms in our production
database, to open the list of journal items.
Part-of: odoo/odoo#99795
Since the "canCreate" option was not propagated this was leading
to a traceback with the autocomplete.
Indeed the option "No records" was never added because it was always
in a loading state.
closesodoo/odoo#99689
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Since the PR introducing the wowl environment in the discuss app, the
model manager is not set in debug mode during tests. The debug mode
is usefull since it adds integrity checks and more verbose error
messages. This commit restores it.
closesodoo/odoo#99556
Related: odoo/enterprise#31086
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
- Made executeGracefully in messaging so it can have specific
behaviour in qunit tests (no timeout)
- guard all usages of `executeGracefully` in case current record
is deleted (e.g. during test teardown).
Task-2976295
Part-of: odoo/odoo#99556
This computed field was manually updating a field, which is
not correct. Instead, this field should have been an `onChange`,
which is what this commit does as a fix.
Task-2976940
Part-of: odoo/odoo#99556
Since recently fields are not present in the views if the user does not
match the groups attribute on that field, this means that the field is
not loaded an may not be used in domains in `attrs` for example.
Most fields were properly checked but some remained broken.
closesodoo/odoo#99751
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Before the websocket were introduced, the last notification id was
persisted in the local storage in order to use it even after a page
reload.
The last notification id is now stored on the `SharedWorker` which
means this information is lost if the last opened tab is reloaded.
This commit fixes this issue by storing this information by the mean of
the localStorage. Since the localStorage is not accessible from the
worker global scope, the bus service will store this information and
relay it to the worker when starting. The worker will now wait to
receive the last notification id before subscribing.
closesodoo/odoo#99621
Related: odoo/enterprise#31124
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Refactor the tabs to be :
* Automatically aligned on a 40px grid.
* A tab only need one delete to remove.
* Arrow navigation around tabs is working as intended.
task-2871848
closesodoo/odoo#99460
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Ensure the selection is never put inside a contenteditable=false
element when correcting the selection due to navigating around ZWS.
Part-of: odoo/odoo#99460
* Add test for the new Odoo Editor Tabs.
* Refactor test utils to simplify and
remove deprecated or unused features.
task-2871848
Part-of: odoo/odoo#99460
Have a CABA tax
Create a Bank statement with a line
Reconcile with manual operation adding the CABA tax
After reconciliation check the journal entries: the tags will be missing
opw-2865789
closesodoo/odoo#93878
X-original-commit: 49229615ca1ce3f85a254e402732f274eb354444
Related: odoo/enterprise#28520
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Firefox throws NS_ERROR_FAILURE when setting selection on element
with contentEditable=false for no valid reason since non-editable
content are selectable by the user anyway.
task-2809451
closesodoo/odoo#99706closesodoo/odoo#99777
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
lstrip remove each letter, and not only once in this order.
So a google console key like googleeef88156 will be never trusted.
'googleeef88156'.lstrip('google') = 'f88156' and not 'eef88156'
Now we ensure that it starts with google or ends with .html and remove
exactly what we know.
To replace with removeprefix/removesuffix once we have py3.9 as minimal
version.
closesodoo/odoo#99776
X-original-commit: 44c08f18de9b2f25d1c716319ad287a409d2384d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
It was no longer possible to load the My Profile for users with an
employee that were not HR Officer.
In the `get_views()` method, the 'search' view was requested after the
'form', thus it omited the fields requested as SUPERUSER in
`get_view()`.
closesodoo/odoo#99750
Signed-off-by: Kevin Baptiste <kba@odoo.com>
To Reporduce
=============
- Create RFQ and send it by mail
Problem
=======
The received mail contains the amount which we don't want to show when it's just a RFQ
Solution
=========
to solve the issue a condition was added to show the amount only on Purchase Order
opw-2955758
closesodoo/odoo#99684
X-original-commit: 6c3c2ce3c8deb5a04a97efb82d1d3ab6acbb81ae
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
Need to show the pos_report_print_id option on gift card and ewallet
programs like the mail_template_id. It's important on printing
newly generated gift card and ewallet from pos.
closesodoo/odoo#99678
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
During the OWL refactoring, the "decoration-bf" and "decoration-it" were
not included in the standard decoration handling to convert them into
the default bootstrap classes. I.e. the previously applied commit:
https://github.com/odoo/odoo/pull/73210/commits/29390ccdc3447c3d1ef4da1d805e630d00402fbd
was not ported over to the updated OWL views/fields. Note that this
commit uses the BS5 classes of fw-bold and fst-italic and should not be
backported because of that.
Also added QUnit tests to handle these 2 decoration cases.
closesodoo/odoo#99698
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- create a contact with a phone number
- enable IAP-sms
- take off the number of the admin-contact
- create an event in the calendar with a "text-sms reminder" with the new created user
Issue:
No sms will be sent
Cause:
The IAP server-side does not accept request with `number` set to False such as in:
```{'messages': [{'res_id': 23, 'number': False, 'content': 'Event reminder: test-local, 07/11/2022 at (15:46:00 To 16:46:00) (Europe/Brussels)'}, {'res_id': 24, 'number': '+32487253270', 'content': 'Event reminder: test-local, 07/1>
Solution:
Filter partners with a valid phone number in `_sms_get_default_partner`
opw-2867763
closesodoo/odoo#99697
X-original-commit: 512010cfeb80fd6f5511888ddbd58dd26212105b
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
Have a form view with a notebook.
In the notebook a page has autofocus, and is also invisible in some
circumstances.
Before this commit, the default page was always displayed, even if invisible,
its anchor was not selected though.
After this commit:
- if the default page is visible, display it.
- if the default page is not visible, select the first visible page
- if the default page was visible and the page has changed, don't select the default page at next render
- if the default page was not visible and becomes visible, select it at next render
closesodoo/odoo#97742
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
From the applicant page, there is no way to access the related partner's page.
If you made an error on the email address before creating the partner and you wish to update it,
it will not be updated on the partner's mail address, which is used to send the signature request.
taskID 2880904
closesodoo/odoo#93840
Related: odoo/enterprise#28502
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit changes the indentation of the redirect_field template to be
more in line with the rest of the template in the website module.
closesodoo/odoo#99150
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit will adapt ThemePreview views to OWL.
Those views use custom components to achieve the desired layout and
functionality.
Part-of: odoo/odoo#99150
Co-authored-by: Younn Olivier <yol@odoo.com>
Currently, in the survey, if the survey/section/question title, description,
survey breadcrumb and multiple choice question options have a very long
link in the label, then on mobile the card is too long, which makes browsers
display a horizontal scroll.
This commit solves the above problem by adding the `text-break` class to the
label.
task-2925648
closesodoo/odoo#99761
X-original-commit: 8be192ba10042d5bb5b8019439c1ac44e1bf3bef
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
1. Remove emoji that have unicode version equal or greater than 13.0.
2. Also removes "smiling_face" and "frowning_face" emojis, as although
they are old emojis, their visual support is quite lacking, so
they feel off. As substition, use "slightly_smiling_face" and
"slightly_frowning_face" respectively.
3. All regional flags have been removed.
4. the 11 remaining flags have been moved to "Symbols" category.
Task-2976577
closesodoo/odoo#99753
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since #84736 the access right check queries were merged into one
Unfortunately the query plan for cases of a group with tons of users
can be suboptimal.
Using a subselect will force the query plan in order to avoid an index
only scan on res_groups_users_rel.
Performances where tested in production, this new query being
around 300 and 1000 times faster for two tests cases (res.partner
and account.payment.term)
closesodoo/odoo#99747
X-original-commit: c7f6a88466878698a78ba26ceeb18247df6dc955
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Since we are not using `postMessage` in `updateMessage`, setting
isPostingMessage is not useful.
closesodoo/odoo#99744
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Since odoo/odoo#97984 the "Add new skills" button was opening a dialog
and was not considering the `editable` attribute of the list view.
closesodoo/odoo#99741
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit introduces a new digest tip which
informs the user about the possibility to create
tasks in a project by receiving an email in its
email alias.
If a project with an email alias is set up it will
show it as an example. Otherwise the tip will be a
generic message.
This introduction will further help explain odoo
capabilities to its users.
Task-2973540
closesodoo/odoo#99740
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Steps to reproduce:
- Create Accrual plan to add 3 days with frequency Yearly on 1 of
January and days lost at the end of the year
- Submit an Allocation request for this accrual plan starting more than
2 years ago
- Run scheduled action "Accrual Time: Updates the number of time off"
Current behavior:
Allocation request calculation time off computes 0 hours
Expected behavior:
Allocation request calculation time off computes 3 hours for the
period between the first of last year and the first of this year
Explanation:
With this modification there are two changes:
1) When the attribution day is the first of january, the nextcall
set in the _end_of_the_year_accrual is the first day of next
year meaning that no days are going to be computed for the last
year period. We change that so that if the first of the year is
the attribution day then the first of the year is the nextcall and
the last call is computed accordingly.
2) If the period to compute the attributed days is acrros two years
the begining of the period is not the first of the year anymore but
the usual lastcall, this has an impact particularly on based on
worked time accrual plans.
opw-2948216
closesodoo/odoo#99728
X-original-commit: 88ba0e68c7878ac4b45cd7103bfecf9cfb567d4f
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
It is not common, but we sometimes need to modify translation components
in place. The goal is to have a mechanism to change translation
components and all future/present instances
closesodoo/odoo#99719
X-original-commit: 87f98e6bb82cb2319d7f923b838085befd823f72
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
In some case the ctrl+A selection in the editor
create issue with the commands and the toolbar.
We fixed it by correcting the selection and force it
to be strictly inside the editable.
task-2971144
closesodoo/odoo#99718
X-original-commit: be07c2c021c71d1c5654ea5e331287f2d4e0d559
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Observed Behaviour
When opening a pivot view with the catalan language activated
and grouping rows/cols by months, everything works fine. But if
we try to import this pivot view in a spreadsheet, all months
are converted to gener, which means 'January' in catalan
Expected Behaviour
When importing the pivot view in a spreadsheet, we should get
the correct date grouping
Reproducibility
This issue can be reproduced with the following steps
1. Activate the catalan language and set it
2. Got to Sales App
3. Select the pivot view
4. Group the rows/cols by order date > months
5. Try to import the pivot view in a spreadsheet
Fix Description
The issue was coming from the fact babel (the package
used to generate date as text in python) write the month as
'de gener', 'de febrer', 'de març', 'd'abril', while moment
(the lib used to handle date in JS) is looking for months as
'gener', 'febrer', ... (ie without "de" or "d'" prefix),
causing it not to recognize the date proposed by Babel. We then
added a preparse method to the catalan language, automatically
used by moment when present in the language definition.
Related Issues/PR
opw-2817041
closes odoo/odoo#99717
Forward-port-of: #90466
X-original-commit: e6addb809134b37e1c45ca7d80bc4532180e1845
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
This commit changes the style rules on grouped kanban records to apply
an outline on focus and a transparency effect when the progress bar
filter does not match the class of the record.
The rules on both kanban_column_progressbar files (legacy & new) have
also been wrapped in global kanban renderer classes to avoid styling
leaks.
closesodoo/odoo#99712
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>