This commit provides a few fixes for the non-fullscreen view:
* remove the subquiz link on slides of type 'quiz' in the sidebar;
* hide completion icons in sidebar if not member;
* only show the 'embed on your website' option when a slide has an embed
code. This will prevent slides of type 'certification' or 'quiz' to
display an empty embed box;
Commit linked to task ID 1941250 and PR #31977
This commit provides a few fixes for quiz feature:
* fix amount of karma won by the user in a quiz;
* correctly display the fact that a subquiz was completed by the user instead
of just looking like a non-completed quiz;
* going on a previously completed quiz, good answers are hightlighted and
inputs disabled;
* effectively put the quiz in readonly mode if not a channel member.
Commit linked to task ID 1941250 and PR #31977
This commit provides a few fixes for the fullscreen view:
* make external links associated with a slide clickable again in fullscreen
mode;
* hide completion icons if not member:
* add margin to subquiz icon in header;
* add dedicated button to exit the fullscreen mode;
* change "Pass certification" button to "Test Certification" if not member
of the channel (for website publishers);
Commit linked to task ID 1941250 and PR #31977
In Top menu, replace 'My courses' with 'Search' and adapt responsivness
for small devices. Truncate card's description and perform minors design
tweaks. Also add some slides-specific layouting to email validation banner.
Commit linked to task ID 1941250 and PR #31977
Purpose of this commit is to perform a cleaning of
* documentation course: add a new specific navigation for documentation
course with a sort option and filters on slide types; clean overall layout
of documentation course to have a better-looking result as this page was
still not really updated;
* lesson not fullscreen page: global layout and cleaning of not-fullscreen
page to have a better-looking result. Notably related slides for
documentation slide is set on right, and some UX bits are tweakes;
Commit linked to task ID 1941250 and PR #31977
Purpose of this commit is to improve the global look of course layout
(notably banner, navigation, course / channel informations). Content list
layout displayed in training (orderable) is also tweaked and improved.
Commit linked to task ID 1941250 and PR #31977
Improve the email validation banner and allow adding custom classes when
calling its templates. Also improve top banner design as well as navigation
and tabs.
Finally perform some minor tweaks on design.
Commit linked to task ID 1941250 and PR #31977
Following the refactoring of the web_editor (JS & CSS) when adding a
long link in a task's description the line starts to overflow from the
field and create an horizontal scroll.
This commit restores the CSS word-wrap properties to the form field html
allowing to nicely break the line on a word basis, preventing a possible
overflow.
Also it doesn't make sense to apply it on an iframe.
Task ID: 1942179
closesodoo/odoo#31988
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The factor parameter of the mixin in charge of generating the spacing
classes was not correctly used.
closesodoo/odoo#31996
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
If the database name contains one of the tested strings, it can render
the assertion of the test invalid or inconclusive. Ensure we strip it
away during the tests.
opw: 1957055
closesodoo/odoo#31987
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Manual cherrypick of 83b37a8
sale.order but also event.track need to use partner_id as email field
Closes#31954closesodoo/odoo#31967
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit simplifies the way the timezones are handled in hr_benefit.
Creating a benefit now uses naive datetimes obtained by converting from
the employee's timezone into UTC and then stripping timezone
information.
closesodoo/odoo#31968
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Create a contract for a vehicle
- Renew the contract and set old one to closed
- Run the cron 'Fleet: Generate contracts costs based on costs
frequency'
The closed contract is reset to expired.
The contract should remain closed.
opw-1949470
closesodoo/odoo#31974
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- The creation of leaves using "no validation" are not possible
if the `SUPERUSER` is not in the "Holidays / Team Leader" because
the validation is made using `sudo`.
OPW-1951316
closesodoo/odoo#31952
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
purpose: on a MO, producing via the 'Produce' wizard give the ability to add any additionnal product into the production.
The issue is that the UoM of the new line is empty and so will trigger an error later in the flow.
This commit add a new onchange on product_id to ensure the field product_uom_id will be set accordingly
closesodoo/odoo#31950
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
If using Stripe we did "Pay Now" -> close modal -> "Pay Now" we would
get 2 modals and possibly be blocked by infinite loading.
With this changeset, we only execute one time our strip.js file so we do
not declare multiple MutationObserver.
We also only open one checkout at a time from stripe when closing and
opening it or multiclicking click (the later one that could block the
interface with several stripe iframe opened and one with a infinite
loading wheel).
opw-1939323
closes#31928
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Some valid facebook pages appear as broken by the preview although
they load perfectly fine afterward.
At facebook, an id is required to perform requests to their graphql
endpoints. The ID is part of the URL of the page, sometime (like Odoo)
the ID is the name of the page and sometime (like LACME France) it is
a generated 9-digits id shown in the URL after the name of the page.
Example of two valid page URL and their page ID:
https://www.facebook.com/Odoo
^^^^
----
https://www.facebook.com/LACME-France-910072559192969
^^^^^^^^^^^^^^^
----------------------------
`^` denotes the page id and what odoo uses as page id after the commit
`-` denotes what odoo used as page id before the commit
opw-19494444
closesodoo/odoo#31922
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
If a signal is received during the worker _runloop sleep,
the worker will be marked as alive=False but process_work
will still be called once.
This commit prevents that by checking the worker state before
calling process_work.
closesodoo/odoo#31885
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
In an HttpCase test, when the browser_js method is used, an optional
javascript code can be used to check that the page is ready to execute
the test.
When no 'ready' code is given it defaults to check the
'document.readyState' status.
In some rare cases (discovered by @Xavier-Do) this status is checked on
the 'about:blank' page. As the page seems ready, the test code is
evaluated and fails.
With this commit, when no specific ready code is provided, the test will
wait for a chrome devtools event that ensure the page is fully loaded
before starting the test.
cherry-pick of 03a8819652closesodoo/odoo#31936
Signed-off-by: Christophe Simonis <chs@odoo.com>
When an accrual leave is allocated to an employee,
it starts from the employee creation date.
However, companies want to create employees before they start working.
Therefore, they want to be able to change the accrual leave allocation start
to when the employee starts working.
For instance, when hr_contract is installed, we can change the
accrual leave allocation start to the date when the first contract starts.
We create the function _get_date_start_work(),
that can be overriden to allow those changes.
OPW-1939378
closesodoo/odoo#31930
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
When there are multiple warehouses, the shipping address must appear on
the purchase order and the RFQ.
opw-1955874
closesodoo/odoo#32230
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this patch, the ir.logging's write_uid field was a many2one which
could cause a module install/update to hang when the module is changing
the res.users model schema and when this module causes to orm to warn
through the logger. (eg: declaring two res.users fields with the same
string attribute)
In such situation the transaction cursor that is processing the
res_users table alteration will be granted an exclusive postgresql lock
hence causing the ir_logging insertion to block because of the write_uid
foreign key to res_users.
This issue has never been raised by runbot as it is using a remote
database with --log-db
Note: the write_uid conversion from m2o to int was left over in commit e6a5d82closesodoo/odoo#32015
Signed-off-by: Christophe Simonis <chs@odoo.com>
Before this commit, ordering by `create_date DESC` and `write_date DESC` could
lead to undeterministic order if multiple records had the exact same date.
This is the case during tests as `crate_date` is set to transaction start time.
(That's what NOW() in PSQL does)
Now, we enforce that order to avoid randomness.
Related to #31829
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is following c78da8a80 that fixed website_links module.
We had to merge it with a skipped test as there was an error only appearing
with Docker (on runbot or on local with Docker).
This commit fix that test error and some other remaining bugs not found during
the first fix:
1. Fix the test error by adding a step to show recently used links. Indeed the
bug was that newest links would return inconsistent order as both 2 links
created during the steps have the same creation date.
On runbot it would click on the wrong link, the one which has 0 clicks.
Then JS would crash (see error bellow).
2. `websiteLinksCharts` JS animation class would execute all the `start`
method code even if there was no `_totalClicks`. JS would then crash as
`beginDate` would not be set correctly. Before the refactoring all that code
would be skipped as surrounded by an if/else condition.
3. BS3 to BS4 broke the nav-tabs layout to switch between 'Newest, Most Clicked
and Recently Used. `mt16` needed to be removed.
Closes#31829
When payslips are generated from the benefit calendar
view by clicking on the "Generate Payslips" button, the js
puts the start and end date in the context.
Start and end are js Date objects, respectively the start and end of the month
e.g.
start: `Fri Mar 01 2019 00:00:00 GMT+0100 (Central European Standard Time)`
end: `Sun Mar 31 2019 23:59:59 GMT+0200 (Central European Summer Time)`
The Dates are first transformed to a string before being sent to the server
by `time.datetime_to_str`.
Because this function change the timezone to UTC, the start date becomes
the previous day at 23:00:00.
The payslip start date is therefore wrongly set to the previous day.
closesodoo/odoo#31919
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Fix certification card in user's profile page
Since design review, certification card were not displaying well.
This commit applies the course card template on certification card
and modifies the way the certification get downloaded by calling directly the
controller instead of using class catched in javascript that calls afterward the
controller.
- Allow review button only if allow_comment in FS mode + redirect url
'write a review' button in fullscreen mode must not be displayed if the course
is not in allow_comment mode. Also, the url if this button was redirecting
to slide view in non fullscreen mode. As no review can be done from this point,
the url redirect now to the course view.
- Fix fullscreen slide height.
- Fix all slides view per category pager and page rendering
Since the introduction of categorized data dictionnary that is given to the template,
if a category is empty, it's rendered anyway, which is good for publisher,
to quickly see all existing categories.
But other users should not see those empty categories.
Also, if the slides from a course are filtered (with View all button) by category,
all the slides should be reachable, using the pager. This was not the case as
categorized slides dictionnary returned no slides if page <= 2.
(as bound of array was from offset to limit and offset and limit were equals)
The number of slides per category must be overwritten if search category is activated,
to see more than the 4 first slides of the category.
Finally, if search category is activated, only the target category should be displayed,
and not the others, for performance reason.
- Show 'not verified' next to user's name if user karma = 0
Instead of using the email_validation_done flag. As email validation is only used
to offer the user some karma in order to be able to interact in the forum or eLearning.
If the user already has karma, he is already considered as active and 'verified'
- Correct URL of certification in FS mode
Task ID : 1941250
Closes PR #31567
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Commit 5798ca28bf was assuming the vote and
comment access on slide was related to is_preview mode and was, consequently,
depending on each slide separately.
In fact, it's not because a slide is in preview mode that the user has the right
to vote for this slide. He must be course member to interact with this preview
slide, even if he has the right to read it.
So the vote and comment right are now computed at the level of the course,
and apply to all the slides of this course.
This commit also reviews and apply fixes on review - rating access.
Here are the applied rules regarding vote, comment and rating on course and slides:
A user can review a course:
- If allow_comment is activated on the course AND
- If the user is publisher OR
- If the user has enough karma AND is member of the course.
Note : if the rating is not allowed on the course, not only the button
to review must be hidden but also the entire rating composer.
A user can vote and comment a slide:
- If allow_comment is activated on the course AND
- If the user is publisher OR
- If the user has enough karma AND is member of the course.
Other fix applied is this commit :
- Avoid crash when no promoted slide : When going on course homepage
(documentation type), if no promoted slide, we got a internal server error.
Task ID: 1941250
Partial revert of commit 5798ca28bf
PR #31567
Merge ranks & badges pages. This commit adapt the final page
layout, controllers and templates.
Added the badge category filter. If used in url parameter, hide ranks and show
only the badge part of the page, filtered on matching badge_category.
Task ID : 1941250
PR #31567
Co-authored-by: @stefanorigano
Co-authored-by: @dbeguin
Before this commit, users wasn't able to input values in some
input elements like password, email and phone in mobile.
Steps to reproduce:
- Go to user
- Select Preferences
- Select Change password
- Try to input something
=> The focus was lost and the keyboard disappeared
In fact, a hidden input always have the focus when no other fields
need it. This input is used to intercept a value from a barcode
scanner.
So now, we added some input types to avoid to set the focus on the
barcode input.
The barcode input is now always defined (even if not used in desktop)
to be able to mock a Chrome mobile environment in a test.
opw-1936712
opw-1948266
closesodoo/odoo#31841
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Do not allow to write on a done WO except for time log.
Partial backport of aafa0490cb540f1646e1d81c6cdb0cfd4a8b2429
opw-1946121
closesodoo/odoo#31917
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Create a vendor bill from documents, change the partner, the default
terms and conditions are automatically set on the bill.
The problem is due to a wrong default value, the onchange only uses
the invoice type from the environment but never from the invoice itself.
opw-1936083
closesodoo/odoo#31905
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>