Commit Graph
124892 Commits
Author SHA1 Message Date
sri-odoo 7d0d49b4e3 [FIX] website_profile: improve top banner and navigation and apply various tweaks
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
2019-03-21 11:38:56 +00:00
sri-odoo da17740634 [FIX] website_rating: fix rating popupcomposer display
Improve overall widget layout, fix stars design and perform some small
tweaks.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:38:47 +00:00
Christophe Simonis 88102776f1 [FIX] mrp: adapt test to use new fields
Oversight of previous forward-port.
2019-03-21 14:24:31 +01:00
Christophe Simonis 4eff0af02e [MERGE] forward port branch saas-12.1 up to 6878c9f342 2019-03-21 13:58:37 +01:00
Pierre Paridans 45e3e432a3 [FIX] web_editor: html field with long links
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

closes odoo/odoo#31988

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-21 08:53:51 +00:00
RomainLibert 6878c9f342 [FIX] hr_payroll: handle timezones coherently in hr.benefit
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.

closes odoo/odoo#31968

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-20 11:07:01 +00:00
qsm-odoo 20ae38a62d [FIX] website_blog: restore sharing feature
Broken by renaming mistake of
https://github.com/odoo/odoo/commit/6d67ce5b7cc6f8686a142ca3a834f5bfd98a56d1

closes odoo/odoo#31955

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-19 17:30:24 +00:00
Toufik Ben Jaa f0db37b277 [FIX] hr_holidays: allow to create leaves with no validation
- 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

closes odoo/odoo#31952

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-20 09:08:53 +00:00
Christophe Simonis 6faf9b76cd [FIX] web: adapt new test to new version
Oversight of previous forward-port.
2019-03-19 17:40:56 +01:00
Christophe Simonis 23cb7a9030 [FIX] mrp: create mrp.production via Form in test
Allow to confirm it before planning production.
2019-03-19 16:21:03 +01:00
William Henrotin 9c53a141dc [FIX] mrp: missing default uom
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

closes odoo/odoo#31950

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-19 15:18:27 +00:00
Martin Trigaux 04370bff18 [I18N] export saas-12.2 source terms
closes odoo/odoo#31985

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-20 14:59:50 +00:00
Christophe Simonis c50d7d6bc5 [MERGE] forward port branch 12.0 up to 82c4393fd0 2019-03-19 15:14:23 +01:00
Julien (juc) Castiaux 82c4393fd0 [FIX] website: facebook page id regexp
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

closes odoo/odoo#31922

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-03-19 10:26:58 +00:00
Romain Derie a09236848c [FIX] link_tracker: prevent undeterministic order on new/recent filter
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>
2019-03-18 13:54:23 +00:00
Romain Derie d0cd971afb [FIX] website_links: fix remaining bugs and restore skipped test
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
2019-03-18 13:54:11 +00:00
Lucas Lefèvre b5c31bddfd [FIX] hr_payroll: Generate payslips with datetime
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.

closes odoo/odoo#31919

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-18 13:20:29 +00:00
David Beguin a13e33ddda [FIX] website_slide{_survey} : apply various fixes on elearning views
- 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>
2019-03-19 13:03:51 +00:00
David Beguin 12fd6a01c8 [REF-FIX] website_slides : review and fix access, vote, comment and rating
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
2019-03-19 13:03:46 +00:00
sri-odoo@stefanorigano@dbeguin
8ecff655e0 [IMP] website_profile: merge ranks/badges pages
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
2019-03-19 13:03:40 +00:00
Johan Demaret RivarolaandMarius Stedjan 36435b4ad7 [FIX] website_sale: fix authorized message
Field `auth_msg` never existed, this is an uncaught mistake. This commit
removes its usage and displays the fallback message to avoid runtime
error.

Closes #31903

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>


Co-authored-by: Marius Stedjan <marius@stedjan.com>
2019-03-18 09:58:45 +00:00
Odoo Translation Bot fd97b5b12a [I18N] Update translation terms from Transifex 2019-03-17 06:01:58 +01:00
William Henrotin 150d7730f8 [FIX] delivery: free_over management
The commit 9a9cb9e refactored the way delivery carrier price
are added on sale orders. The management of free delivery price
was not taken into account past then.
This commit put the free price message directly on the sale order line
and on the wizard. The carrier price is showed on the wizard but is 0 on
the SO.

Task : 1943480

closes odoo/odoo#31315

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-03-15 14:21:56 +00:00
qsm-odoo 0c6e0d660e [FIX] website_event, *: review some design
* base

With https://github.com/odoo/odoo/pull/30559, the event pages were
a bit redesigned (even though the original goal of the task was to
focus on the mobile registration). This commit reviews part of the
redesign (titles too big, misalignment, ...).

closes odoo/odoo#31914

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-18 12:28:20 +00:00
Robot Odoo b07dfedbd3 [FIX] lunch: make it work on mobile
This module didn't worked on mobile: user cannot select the products or
see their cart.

This commit reworks the LunchKanbanWidget template and introduces a
dedicated template for mobile. This template introduces a button at the
bottom of the screen to toggle the "cart" widget on mobile (hiding it by
default).

It tries to make the best use of the existing Bootstrap classes allowing
to have a more responsive layout and reducing the custom CSS required by
this module (both in desktop and in mobile).

This commit adds a decent JS tests-suite (mobile & desktop) to this
module as the existing one left substential parts of the UI untested
(opening wizard when clicking on a kanban record, cart's lines content,
clear cart button, widget structure and content based on the state...).
Those tests are also less based on DOM nodes order/tag names and use
instead dedicated classnames.

It also modifies the LunchKanbanRecord click handling to had a dedicated
event handler instead of overriding the default _onGlobalClick() and
make it more testable.

Finally this commit also remove unused code.

Task ID: 1945032

closes odoo/odoo#31428

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-19 12:11:28 +01:00
Pierre Paridans bdc0b4b892 [FIX] lunch: make it work on mobile
This module didn't worked on mobile: user cannot select the products or
see their cart.

This commit reworks the LunchKanbanWidget template and introduces a
dedicated template for mobile. This template introduces a button at the
bottom of the screen to toggle the "cart" widget on mobile (hiding it by
default).

It tries to make the best use of the existing Bootstrap classes allowing
to have a more responsive layout and reducing the custom CSS required by
this module (both in desktop and in mobile).

This commit adds a decent JS tests-suite (mobile & desktop) to this
module as the existing one left substential parts of the UI untested
(opening wizard when clicking on a kanban record, cart's lines content,
clear cart button, widget structure and content based on the state...).
Those tests are also less based on DOM nodes order/tag names and use
instead dedicated classnames.

It also modifies the LunchKanbanRecord click handling to had a dedicated
event handler instead of overriding the default _onGlobalClick() and
make it more testable.

Task ID: 1945032
2019-03-19 09:26:08 +00:00
Robot Odoo 7e35c40c5a [MERGE][IMP] website_slides_survey: handle certification re-enroll/purchase flow
Task #1945036

Purpose
======

If the user fails his last attempt at a course certification, we remove him from
the members of the course (and he has to enroll again).
He receives an email in the process notifying him of his failure and suggesting
he enrolls to the course again.

The purpose is to have a 'certification flow' where the user can re-purchase the
certification when they have failed it.

This could lead to some issues if the course containing the certification also has
other slides with content because the user will not have access to them after failing.
This also prevents configuring courses with multiple certifications since the membership
will be removed at the first failure.

These use cases are considered "non standard" by the business and are thus not handled
in the code. We assume that users will configure their courses "correctly".

closes odoo/odoo#31484

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-19 10:11:09 +01:00
Aurélien Warnon 199ecdd30f [IMP] website_slides_survey: handle certification re-enroll/purchase flow
Task #1945036

Purpose
=======

If the user fails his last attempt at a course certification, we remove him from
the members of the course (and he has to enroll again).
He receives an email in the process notifying him of his failure and suggesting
he enrolls to the course again.

The purpose is to have a 'certification flow' where the user can re-purchase the
certification when they have failed it.

This could lead to some issues if the course containing the certification also has
other slides with content because the user will not have access to them after failing.
This also prevents configuring courses with multiple certifications since the membership
will be removed at the first failure.

These use cases are considered "non standard" by the business and are thus not handled
in the code. We assume that users will configure their courses "correctly".
2019-03-18 14:46:32 +00:00
Aurélien Warnon 3f6d09037d [FIX] product: make product_template_attribute_value tree not editable
Purpose
=======
The product.template.attribute.values can't be edited in an inline tree view
because we need to be able to define exclusions for them in the form view.

closes odoo/odoo#31601

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-18 13:41:34 +00:00
Aurélien Warnon 99bae2cdb7 [FIX] product: fix _name_search to include dynamic product variants
Targets commit d3530eb07e

Purpose
=======
- The _name_search of product.template fallbacks by default on product.product
  In case there are no product.products yet (dynamic product variants configuration), we need to
  include the base product.template _name_search in the results
2019-03-18 13:41:33 +00:00
Pierre Paridans ec88b4e1a2 [FIX] hr_recruitment: scope kanban record's width
Module's css rules shouldn't override globally the one from 'web'.

closes odoo/odoo#31538

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-18 13:51:33 +00:00
Antoine Guenet becfef8f7b [FIX] web_editor: properly start website edit mode as restricted editor
It was impossible to open the website's edit mode as a user with
"restricted editor" permissions. The reason was that wysiwyg_multizone
was trying to manipulate data that is not injected into the html node
when `editable` is false (see `website.layout` template).

closes odoo/odoo#31702

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-03-18 09:32:14 +00:00
Pierre Paridans 6506cfd775 [FIX] lunch: remove unused code 2019-03-18 08:36:42 +00:00
Aurélien Warnon 2fb9fe279a [FIX] survey: prevent certification email from being sent twice
Purpose
=======

The certification email template had both "email_to" and "partner_to" fields set
and that implied the mail being sent twice.

This commit removes the "partner_to" field to fix it.
2019-03-18 08:03:46 +00:00
Swapnesh Shah 0719559904 [FIX]website: Themes should be installed from website_theme_install only
closes odoo/odoo#31854

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-14 17:04:04 +00:00
Christophe Simonis 15a78da0c9 [FIX] account: avoid using non existant field in test
Oversight of previous forward-port.
2019-03-19 10:36:17 +01:00
Christophe Simonis bd63913326 [MERGE] forward port branch saas-11.3 up to 4e39328a76 2019-03-18 20:03:24 +01:00
Christophe Simonis 4e39328a76 [FIX] mrp: use correct XMLID in test
Oversight of previous forward-port.
2019-03-18 17:55:50 +01:00
Christophe Simonis a73a47d692 [FIX] account_asset: correct forward-port 2019-03-18 17:27:21 +01:00
Christophe Simonis 9b6e37a983 [MERGE] forward port branch 11.0 up to 7e33b54771 2019-03-18 16:51:57 +01:00
Toufik Ben Jaa ec327d3f86 [FIX] project: Access to attachments with CDN
- The attachments in the tasks page on the portal can be accessed by
  clicking on them.
  They are delivered by the controllers at URL `/web/content/XXXXX`.

  By default when enabling the Content Delivery Network feature on the
  website module, the content delivered by the controller
  `/web/content/` is done through the CDN which has no user account,
  thus may not have access to the attachment.

  To fix the issue, we disable the CDN feature for the attachments in
  the tasks portal page.

  OPW-194571

closes odoo/odoo#31924

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-18 15:33:14 +00:00
Nans Lefebvre eee6e26b37 [FIX] mail_enterprise: display all attachements in preview widget
If res_id is not defined, this method used to crash.
Made obvious by commit a26496b6e7,
which added a call to that function in the main controller of web.

opw 1950403

closes odoo/odoo#31923

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-18 15:27:20 +00:00
Adrien Dieudonne 7e33b54771 [FIX] barcodes: let focus in number, password, tel, phone inputs
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

closes odoo/odoo#31841

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-03-18 13:16:57 +00:00
Christophe Simonis 2940ee6b35 [MERGE] forward port branch saas-15 up to c6353942ff 2019-03-18 14:17:54 +01:00
Christophe Simonis c6353942ff [MERGE] forward port branch saas-14 up to 5162ca7be7 2019-03-18 10:53:01 +01:00
Christophe Simonis 5162ca7be7 [MERGE] forward port branch 10.0 up to 36ba37a7a1 2019-03-18 10:20:06 +01:00
Xavier MorelandDaniel Reis 1f008a439a [FIX] stock: inefficient traceability domain
PR #31086 converted the not-downstream traceability domain to use a
filter instead as =/!= False on an o2m can lead to memory issues due
to the way they're currently implemented / transformed. This also
converts the downstream versiom just in case and to limit deviations
between the branches.

Co-Authored-By: Daniel Reis <dgreis@sapo.pt>

closes odoo/odoo#31901

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-03-18 08:53:21 +00:00
qsm-odoo 2a39ab0579 [FIX] web_editor: handle snippet option submenus of submenus
Commit https://github.com/odoo/odoo/commit/8ca92330b367d54fddf1c02089ee9d0bc3edbfdc
did not think about submenus inside submenus, which is the case in the
website animate option. This made snippets potentially have multiple
animations on them, with undesired behaviors.

This commit also accordingly reviews the _setActive method for the
select-class option and also adapts following the recent forward-port of
https://github.com/odoo/odoo/pull/31440

Related to task-1929133

closes odoo/odoo#31477

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-15 13:58:50 +00:00
Nicolas Martinelli 36ba37a7a1 [FIX] base: default rate
We set the default rate to be 1.0 instead of 0.0, since a rate of 0.0
doesn't make sense.

Partial backport of 298491597c

opw-1949866

closes odoo/odoo#31866

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-15 09:58:51 +00:00
Christophe Simonis ff1bca32f3 [MERGE] forward port branch 12.0 up to a26496b6e7 2019-03-14 17:43:32 +01:00