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>
When creating records with default keys in context those are currently
propagated through the whole call chain until message creation. However
default keys are meant to be used for the record creation, not its logs
or messages.
A protection against default_child_ids already exists. However better
remove all context keys by using a clean context.
Closesodoo/odoo#93797closesodoo/odoo#99670
X-original-commit: 421ee12a099220cb43f3c3f0bf8d51586e687a28
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit converts `pos.css` and `restaurant.css` to use SCSS color
variables. The style of the point of sale application has also been
improved to be more clean and mobile friendly.
task-2954422
closesodoo/odoo#99033
Signed-off-by: Masereel Pierre <pim@odoo.com>
In preparation of future clean up.
- remove obsolete method _fetchSpecialActivity
- apply lint / some es6 syntax on legacy activity file
- use async/await and remove most self in legacy activity
- inline activity setFileUploadID function
- inline activity _bindOnUploadAction function
- inline activity setDelayLabel function
- inline activity _readActivities function
- inline activity _sendActivityFeedback function
- inline activity _bindPopoverFocusout function
- remove obsolete activity _unbindOnUploadAction function
closesodoo/odoo#99646
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the labels tags that were after the fields losses
their attributes (i.e. classes) after the compilation of the form view
arch.
Now, the attributes are correctly copied after the compilation.
closesodoo/odoo#99486
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When one tries to quick create a record in a kanban view column and a
rpc error occurs, a form view dialogs open. If the form view to
display in the dialog is a legacy view, save the record displayed in the
dialog make the kanban renderer receive a legacy datapoint with no resId
key, making impossible to add the appropriate record to the column.
We fix that.
closesodoo/odoo#99294
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Go to eLearning > Courses > Contents, group the kanban view by Course,
then quick create a record in a column. A form view dialogs opens. Save
the record: a crash occurs.
Root cause: the kanban view needs some record data that are not found
on the record created by the form view dialog but tries to add that
record directly to the column.
Solution: we create a totally new record with same resId and add that
new record to the column.
Part-of: odoo/odoo#99294
- use util method already used in regular theme selector screen
- theme_common is already in hidden category, no need to exclude it
- searching on theme category rather than `theme%` name
- move the uninstallable check in the util, no reason to show those in
the regular theme selector screen either
Fixes#92125closesodoo/odoo#99099
Related: odoo/design-themes#586
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, there were multiple issues related to the creation
of `theme.website.menu` records in a theme:
- Not possible to add a menu in the existing website's navbar
- When one would try to create a `theme.website.menu` that menu would be
created for every website when instaling the theme on a particular
website, which is terribly wrong as it goes against the multi-website
holy grail rule: when editing a website, do not impact other websites.
- Not possible to create a mega menu
Now, one can create a menu:
- as a navbar top menu
- as a child menu of another theme menu
- as a whole new menu hierarchy (top level container)
This is not possible to create a menu as a child of a website.menu, like
adding 2 submenu to the existing contact us menu.
First, this is technically impossible to do without introducing yet
another hack code in the `website.menu` write. Indeed, there is no way
to identify a generic menu's website copies. Neither through a direct
DB field, neither through a persistent info like we do with the `key`
attribute of views. So there is no reliable way to tell the system to
add a menu below the "Contact Us" menu of the website, as this is just a
menu copied when the website was created. We could obviously later add
a `key` field or something like that to identify an XML menu's copies.
Second, there is a workaround as one has to recreate the website.menu
and delete the original one (through a `<function/>` record).
Third, this should not be the main use case about menu creation in
themes.
----------
Some fields were also missing regarding the `website.page` model.
----------
A stable attempt is done at [1], this is where the current commit
originates from.
As the Odoo 17 release is quickly approaching, it was decided to first
write the proper IMP in master from which we will see what can be
backported and how, if needed.
[1]: https://github.com/odoo/odoo/pull/86669
Part-of: odoo/odoo#99099
After this commit, the settings of coupons, promotions,
gift cards and loyalty cards are now managed under a
single one field in PoS Settings configuration. Moreover,
this settings field is "global" and shared between the
eCommerce and Sales app.
task-2959620
closesodoo/odoo#99060
Related: odoo/upgrade#3842
Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit (and its enterprise equivalent) purpose is to smooth the
user experience and remove unnecessary steps.
The commits:
- Remove all stat buttons except the status and collaborators one from
the project edit form.
- Add multiple small changes to string/name fo fields in views
- Change the custom O2M widget for a standard M2M for the management of
child tasks
- Add the milestone field to the portal page of shared project.
- Remove the wizard 'marked_as_reached_milestone'
- Add the automatic generation of milestone when a SO is confirmed if
some SOL need it
task-2941835
closesodoo/odoo#98546
Related: odoo/enterprise#30628
Related: odoo/upgrade#3798
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
hr_*:
hr
hr_contract
hr_recruitment
website_hr_recruitment
Increase UX and possibilities to postulate to a job on recruitement.
Also moves the model hr.contract.type from hr_contract to hr so that it
can also be used from hr_recruitment without having two models in parallel.
taskID 2898063
closesodoo/odoo#96551
Related: odoo/enterprise#29777
Related: odoo/upgrade#3861
Signed-off-by: Kevin Baptiste <kba@odoo.com>
* = base, calendar, google_calendar, microsoft_calendar
Purpose: Enable efficient Appointment Onboarding, not performed by company but at a global db level.
This PR enables:
* Track onboarding progress on a database scope (vs company) by introducing the `onboarding` module
* Easier configuration of external calendars with a modal instead of redirecting to "Settings"
\+ on-the-fly connector modules install
* Basic support for the onboarding panel on the calendar view
See included commits for details.
Task-2852375
Part of Task-2900763
See odoo/enterprise#29139closesodoo/odoo#97105
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This technical module can be used to configure onboarding panels flows at
company or global level (required for new Appointment onboarding, see ENT PR).
This implementation, which should be able to support the migration of the
other onboardings, separates the closed state from the completion state
(allowing to know that steps are not completed even though the panel is
closed).
Basic tree and form view are included.
Adding an onboarding with this module requires to provide records data for the
models:
- `onboarding.onboarding` + action to close the panel
- `onboarding.onboarding.step` + actions for the 'opening' and 'saving' of each
step.
See related ENT PR for the `appointment` example, in particular
`onboarding_data.xml` and `onboarding_onboarding.py`
Several python tests are also included.
Misc. In base, we slightly refresh the wording/style of the modal closing the
onboarding panel.
Task-2852375
Part of Task-2900763
Part-of: odoo/odoo#97105
* = account, sale
- Fix typo
- Make private as very specific role
- Allows to grep similar functionality from new onboarding module and previous
common implementation of onboardings.
Task-2852375
Part of Task-2900763
Part-of: odoo/odoo#97105
* = google_calendar, microsoft_calendar, web
Purpose:
Allow to install appropriate module and configure calendar provider credentials
in fewer steps, without needing to go to general settings, etc.
This requires that both buttons are visible from the start.
In this commit, we also prepare the ability to extend this configuration wizard
for the appointment onboarding (see ENT PR).
Task-2852375
Part of Task-2900763
Part-of: odoo/odoo#97105
Purpose:
Enable to add a banner to the calendar view. This is used to show the
appointment onboarding panel (see related ENT PR).
Task-2852375
Part of Task-2900763
See odoo/enterprise#29139
Part-of: odoo/odoo#97105
Currently, in a survey question, 'comments_message', 'validation_error_msg',
and 'constr_error_msg' fields have a default value. Because of it, they are
considered "user input" and not translated by default. So, the strings are
always printed in the source language and needs to be translated everytime.
This commit improves the behavior by removing the default strings, and instead
set them as code fallback wherever the fields are used, so that they only needs
to be translated once. Also, the same strings are added as a placeholder on
respective fields to make it more clear to the users that what should the value
in these fields look like. Apart from that, considering we now use a fallback
value, the "validation_error_msg" field does not need to be mandatory anymore.
task-2906052
closesodoo/odoo#98165
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this PR, the `remove an attachment..does not need any confirmation`
test would fail because the attachment was deleted while still
uploading. Since the abort controller does not work in the mock
server, the attachment would have finished its upload after its
deletion. This commit solves this issue by waiting for the attachment
to be uploaded before deleting it.
closesodoo/odoo#99758
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The chatter drop attachment test fails in an indeterministic manner.
This is because we're assuming that the next render will be the one
corresponding to the file uploading. In order to be sure this render
is really the one we're expecting, the `o-file-uploader-upload` event
is added.
closesodoo/odoo#99652
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the form and list views didn't reload when an
action from the ActionMenu (formerly known as "toolbar") was
executed. For instance, go to Contacts (list) > select records >
Actions > Merge: the contacts are correctly merged, but the view
still shows the merged contacts.
Note: it worked well for "static" actions like Archive, Delete,
this fix only concerns "contextual" actions.
closesodoo/odoo#99680
Signed-off-by: Georis François (fge) <fge@odoo.com>
Since [1] the 403 pages displayed when a website page is restricted to a
different group of users is the default one instead of the website one.
After this commit 403 fallback errors are rendered by the default error
rendering.
Steps to reproduce:
- Go to a page. (e.g. "Contact Us")
- Select "Page Properties" in the "Pages" menu.
- Go to the "Publish" tab.
- Define visibility as "Some Users".
- Select a user group. (e.g. "Administration / Access Rights")
- Access to the same page in an incognito window.
=> The displayed 403 error page was the generic one instead of the
website one (with the navigation header...)
[1]: https://github.com/odoo/odoo/commit/eb7eecec976570ae3301c17a04adc9c110d5b14a
task-2963843
closesodoo/odoo#99671
X-original-commit: fc0a0c2ccea83b3a9a5df0e300eac1fe7eb7a2a2
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
In the Employees app, when using the department kanban view and clicking on the
Time Off Requests or Allocation Requests, it leads to a tree view but the department
from which the user comes from is not part of the filters.
This commit adds the department in the filters of the tree view.
Due to the search panel being present in the tree view, the department filter is removed from the list of
filters to avoid a duplication of the filters in the search panel.
task-2939207
closesodoo/odoo#97773
Related: odoo/enterprise#30358
Signed-off-by: Kevin Baptiste <kba@odoo.com>