Commit Graph
124874 Commits
Author SHA1 Message Date
mreficent bef385d3d1 [IMP] hr_holidays: typo in action xmlid
closes odoo/odoo#30900

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-13 10:24:26 +00:00
Pierre Masereel 5e58be6508 [FIX] stock: show all not scrapped move
When a move is created in a picking through the scrap button, it must
not be visible in the picking, and should be accible through the
stat button showing the srap.

Now to hide, those moves from the picking view, we are checking that the
move has a different picking type than the one on the picking, which can
lead to invisible moves, that are not in the picking view because they
have a different picking type and not in the scrap stat button because
they don't have scrap object.

To fix this behavior, we are hiding from the picking the ones having a
scrap object linked instead of the one having a different picking type

closes odoo/odoo#31810

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-03-13 10:43:36 +00:00
Vincent Schippefilt 3f8b04484b [REF] doc: add async javascript code section
in javascript Cheatsheet, add a bunch of example about asynchronous code

closes odoo/odoo#31716

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-13 14:34:05 +00:00
Christophe Simonis 44515bc7be [MERGE] forward port branch saas-12.2 up to c9f832d9f0
closes odoo/odoo#31790

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-13 14:24:51 +00:00
Cedric Snauwaert bf69975b54 [FIX] account: reconciliation popover with lines detail was empty
commit 4697d74480 update our bootstrap version to 4.3.1, one change of that version is that
bootstrap now escape the content of popover and title removing the table element. https://blog.getbootstrap.com/2019/02/13/bootstrap-4-3-1-and-3-4-1/
This result in the popover in the reconciliation widget being empty.

Therefore since the content of the popover was safe as it was rendered by Qweb.render, we disabled completely the sanitizer
for the popover in the reconciliation widget.

closes odoo/odoo#31797

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-12 15:40:01 +00:00
Cedric Snauwaert 4e110972fa [FIX] account: fix error when trying to open manual reconciliation from accounting menu
closes odoo/odoo#31785

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-12 10:30:33 +00:00
Yenthe666 0d33e7d28c [IMP] base: use sequence widget on view tree in action form
To reorder views using drag and drop

closes odoo/odoo#31437

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-12 16:02:28 +00:00
Yenthe666 fd24c240fb [IMP] base: improve source term
Use the "There are" form when followed by plural

closes odoo/odoo#30731

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-12 16:06:08 +00:00
wan 54a5fc7302 [IMP] account: allow to filter by account code in reconciliation widget
Task 1945477

closes odoo/odoo#31589

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-12 10:18:22 +00:00
Romain Derie c9f832d9f0 [FIX] test_website: restore test now that fix has been forward-ported
Commit ef03db9ed added back the reset_templates functionality and some tests in
Odoo 12.0.
Commit fcb972db9 skipped one of the tests in Odoo saas-12.2 as there was a race
condition (new editor).
Commit 7c045dda0a fixed the race condition in Odoo 12.0 even if the error never
showed, it was safer.

Now that the fix got forward-ported to Odoo saas-12.2, we can add back the
skipped test.

closes odoo/odoo#31780

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-12 10:17:27 +00:00
Aaron Bohy 5ee9e1d200 [FIX] web: correctly display crashes in firefox
After the update of jQuery, crashes were no longer displayed (in
dialogs) on browsers using the unhandled-rejection-polyfill lib
(e.g. firefox). This was due to a bad conversion from ES6 to ES5.

Issue reported on the jquery update pad.

closes odoo/odoo#31767

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-12 09:46:04 +00:00
Christophe Simonis 8f1daaf937 [FIX] {,test_}mass_mailing: set mail.mass_mailing subject
Field is required.
2019-03-11 15:44:32 +01:00
Christophe Simonis 71faa19af0 [MERGE] forward port branch saas-12.1 up to 2b3296bbf8 2019-03-11 14:42:34 +01:00
Robot Odoo 0c1eff0d95 [MERGE][IMP] survey: apply small tweaks on survey views (certification)
Purpose
======

This merge implies several small tweaks on the survey views, mainly to add support for the new certification fields.

Show the quizz_passed field in the answers views
-------------------------------------------------------------------

The quizz_passed field is now more important because it determines whether
a certification has been successfully taken or not.

The quizz_passed field is added in:
- The search view of user_input
- The list view of user_input
- The form view of user_input (along with the score)

Fix survey statistics computation
-------------------------------------------

Fix the shared dict in the survey statistics computation that
causes surveys to incorrectly share the same stats when computed in batch.

Add a stat button on survey to show the certified count
------------------------------------------------------------------------

Add a stat button on the survey form view showing the amount
of answers with the quizz_passed field set to True.
It allows to quickly see people that have been granted the certification.

On click, the stat button redirects to the answers list view with the "Quizz passed"
filter defaulted to True.

Task-1936539

closes odoo/odoo#31467

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-11 13:07:38 +01:00
Aurélien Warnon 7070fa3219 [IMP] survey: rename 'Survey' to 'Certification' when relevant
Purpose
=======

This commit reworks some views to rename 'Survey' to 'Certification'
for a better visual integration of the new certification flow.
2019-03-11 10:46:11 +00:00
Christophe Simonis 2b3296bbf8 [FIX] web: use stricter css selector in new test
It allow not matching the dropdowns of the search view.

closes odoo/odoo#31738

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-11 10:16:53 +00:00
Odoo Translation Bot ae8aac2a18 [I18N] Update translation terms from Transifex 2019-03-10 06:02:07 +01:00
Christophe Simonis 2c5c9b8342 [MERGE] forward port branch 12.0 up to c023d0784f 2019-03-08 17:56:14 +01:00
Sébastien Theys 2f932e3a46 [IMP] web: add filename to qweb image widget
It's better to always have a relevant name in the image URL for SEO.

Also make sure there is always an alt on the image.

closes odoo/odoo#31705

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-08 15:41:52 +00:00
svs-odoo 08866930ed [FIX] *: no tracking for consumable product
Before this commit, you can configure tracking for consumable type
product. Now, tracking and date settings are hidden when the product's
type is set on consumable.
Also, resets tracking when change type on consumable.

We chose to not enforce this constraint in the model because we consider
it a bit overkill and we did not want to block migrations.

Task #1938594

closes odoo/odoo#31355

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-08 15:52:36 +00:00
Christophe Simonis c023d0784f [MERGE] forward port branch saas-11.3 up to ecd8c023b7 2019-03-08 16:10:55 +01:00
Toufik Ben Jaa 7d4ca67680 [FIX] website_links: links fetching not working
- The fetch of recently/most clicked links was not working due to the
  fact that the widget handling this feature had not parent, thus not
  having access to ajax.rpc to make rpc calls.

closes odoo/odoo#31712

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-08 14:54:37 +00:00
Thibault Delavallée 57004e22b0 [FIX] website_slides_survey: avoid issue when fetching certification information
Information was already present, let us use it instead of having access issues
on membership.

Commit linked to task ID 1941250 and PR #31708.

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-08 14:51:25 +00:00
Thibault Delavallée bccfe8a418 [IMP] website_slides: display a flag for unpublished lessons in course list view
It helps course maintainers understanding the state of their lessons.

Commit linked to task ID 1941250 and PR #31708.
2019-03-08 14:51:25 +00:00
Thibault Delavallée 6b7eeac56d [FIX] website_slides: fix domain computation of a channel slide list
When displaying a channel content all its slides are displayed in a
list view or cards view. Even slides current user cannot read because
he is not member of the channel are displayed, even if there is no link
(and access rights prevent them for effectively accessing the slide).
Purpose is to display a channel content without giving access through
ACLS at its slides.

However this domain computation was not correctly matching real use case
 * publishers should see everything;
 * public users should not see unpublished slides;
 * members not publishers should not see unpublished slides unless they
   uploaded it;

Commit linked to task ID 1941250 and PR #31708.
2019-03-08 14:51:05 +00:00
Thibault Delavallée edf68bde6c [REF] website_slides: extract code to have slides per category
Purpose of this commit is to have a method allowing to fetch slides
and have them ordered by category with some info on the category. It
fully supports uncategorized slides.

This commit also fixes the lessons list view of a training course. When
having rights to edit the channel the category name was not editable.
We now use a real browse record allowing to edit the category names
directly in this reorderable list view.

Commit linked to task ID 1941250 and PR #31708 .
2019-03-08 14:46:32 +00:00
Antoine Guenet c9b1401a23 [FIX] web_editor: update the handle on click input node in website edit
When clicking on a snippet containing an input node on Firfeox, the
handle wouldn't appear as expected. This is due to trying JQuery (but
not only) trying to modify properties that are restricted on Firefox but
not on Chrome. The error message still appears from time to time due to
Summernote using `document.getSelection`, which is problematic with
Firefox. This will be fixed with the next version of the editor. In the
meantime the direct effect of that error (the handle issue) is fixed
with this commit.

The standard target (`Event.target`) is now looked for in first position
instead of non-standard 'Event.srcElement` (IE alias for `Event.target`)
then `Event.originalTarget` (Mozilla-specific) and finally
`Event.target` (standard). `Event.originalTarget` is restricted on
Firefox so it was giving the same cryptic error as mentioned above
("Error: Permission denied to access property", which generally points
to same-origin policy violations).

Ref:
- https://developer.mozilla.org/en-US/docs/Web/API/Event/srcElement
- https://developer.mozilla.org/en-US/docs/Web/API/Event/originalTarget
- https://developer.mozilla.org/en-US/docs/Web/API/Event/target
- https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection#Related_objects
- https://developer.mozilla.org/en-US/docs/web/javascript/reference/errors/property_access_denied

closes odoo/odoo#31710

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-08 14:41:49 +00:00
Christophe Simonis ecd8c023b7 [MERGE] forward port branch 11.0 up to e5f93b83c6 2019-03-08 15:08:16 +01:00
Christophe Simonis e5f93b83c6 [IMP] base,account: unmute logger
Since 8da3750cee, logger does not need to
be muted anymore.

This reverts commits c3764265de and
1693a27f28.
2019-03-08 14:59:01 +01:00
Christophe Simonis fabbcf1579 [MERGE] forward port branch saas-15 up to 21c84f1532 2019-03-08 14:10:38 +01:00
Christophe Simonis 21c84f1532 [MERGE] forward port branch saas-14 up to b47749effd 2019-03-08 13:09:26 +01:00
Christophe Simonis b47749effd [MERGE] forward port branch 10.0 up to 88de931141 2019-03-08 13:08:58 +01:00
Thibault Delavallée 7afd23e56c [FIX] website_slides: various fixes
Display
 * improve color of trophy displayed on top of course main page (success if
   course done, warning while working on it);
 * correctly fetch and display karma/xp points on course lesson list. It is
   either gain of next try, either awarded points depending on slide
   completion;
 * fix control buttons in course main page (prev, next, set done,
   set completed, fullscren), notably correctly set them disabled;

Linting / Code
 * put demo in no update;
 * rename some parameter in website_slides_survey to avoid conflict between
   quiz (on a slide) and certification (a survey);

 Commit linked to task ID 1941250 and PR #31697.

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-08 11:15:07 +00:00
David Beguin 523c1276a1 [IMP] gamification : move rank demo data into data
In order to se the 'next rank card' and the user karma on user's profile page,
not only the first rank is needed but also higher ranks. Otherwise everyone
will be 'Newbie', even the admin.

Moreover it is easier to update existing data for things like rank than having
to figure out how it works.

Task ID : 1941250
PR #31697
2019-03-08 11:15:07 +00:00
David Beguin f38a81f981 [IMP] website_slide_survey : set slide completed when quizz_passed
This commit sets the completed flag to True for a slide of type certification
when this certification is succeeded (quizz_passed set to True).

Also, the Download certification button has been added to the fullscreen mode
if the certification is passed by the user.

Task ID : 1941250
PR #31697
2019-03-08 11:15:07 +00:00
David Beguin 6091062e66 [IMP] website_(profile, slides): add custom pager to show on all users / courses pages
If there are too much users to show on the page and to avoid performance
issues, a pager is now applied on the all users page.

A new pager based on website_pager is added in order to ease the navigation
through the potential high number of pages. 'Go to first page' and 'Go to last
page' buttons have been added and the design of the pager have been adapted
to be more integrated into the new eLearning platform.

Also add the pager on the slide page if search category is applied. The pager
was already computed in the controller but not displayed.

Task ID : 1946160
PR #31697
2019-03-08 11:14:45 +00:00
Aurélien Warnon db53057528 [IMP] survey: add a stat button on survey to show the certified count
Purpose
=======

This commit adds a stat button on the survey form view showing the amount
of answers with the quizz_passed field set to True.
It allows to quickly see people that have been granted the certification.

On click, the stat button redirects to the answers list view with the "Quizz passed"
filter defaulted to True.
2019-03-08 11:00:06 +00:00
Aurélien Warnon 1932e25f68 [IMP] survey: show the quizz_passed field in the answers views
Purpose
=======

The quizz_passed field is now more important because it determines whether
a certification has been successfully taken or not.

This commit adds the quizz_passed field in:
- The search view of user_input
- The list view of user_input
- The form view of user_input (along with the score)
2019-03-08 11:00:06 +00:00
Jairo Llopis 8da3750cee [FIX] core: remove extra exception log, redundant in P3
Reverts 2b1d3ff82d introduced in 10.0 via

It was relatively useful in Odoo 10.0 because in Python 2 the exception
was missing a root cause traceback. But Python 3 includes exception
chaining by default, so it comes for free.
See [PEP3134](https://legacy.python.org/dev/peps/pep-3134/)

On top of being redundant in P3, it can also break some testcases
by causing an extra ERROR log entry, even when the final exception is
expected and caught. So it's simpler to remove it.

closes odoo/odoo#31699

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-08 10:46:23 +00:00
Romain Derie 88de931141 [FIX] payment_authorize: use SHA-512 instead of MD5 as not supported
Authorize.Net is phasing out the MD5 based hash use for transaction response
verification in favor of the SHA-512 based hash utilizing a Signature Key.

Instead of hashing with md5 the transaction key, it is now required to hash
the signature key (binary format) with SHA-512.

Support for MD5 will be dropped the 7th March 2019 for sandbox environment and
the 28th March 2019 for production environment, initially planned for the 14th.

Note that as of February 11, 2019 authorize removed the ability to configure or
update MD5 Hash setting in the Merchant Interface.
Merchants who had this setting configured have been emailed/contacted.

opw-1943030

Usefull links:
https://developer.authorize.net/support/hash_upgrade/
https://support.authorize.net/s/article/What-is-a-Signature-Key
https://support.authorize.net/s/article/MD5-Hash-End-of-Life-Signature-Key-Replacement
https://support.authorize.net/s/article/Do-I-need-to-upgrade-my-transaction-fingerprint-from-HMAC-MD5-to-HMAC-SHA512-and-how

closes odoo/odoo#31642

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-03-08 10:14:57 +00:00
Fabien Pinckaers 48ab39131a [IMP] base: upgrade button shows an on premise pricing to avoid confusion
closes odoo/odoo#31692

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-08 07:23:20 +00:00
David Monjoie 455a9c9d58 [FIX] web_editor: fix non-deterministic tests
Those tests were skipped because they were failing
non-deterministically.

This commit aims to make them deterministic by putting back some
guard promises that were lost during the jquery update adaptation.

This commit also fixes a lingering issue with one of the asserts.
We observed that sometimes, the "alt" and "title" attributes where
both present on the element but displayed in different order in
the string returned by wysiwyg.getValue(). This is because there
is no set order in the attribute returned by jQuery.html().
Because of that, I replaced the simple sring test by a thorough
manual comparison of the result that is expected to be equivalent.

closes odoo/odoo#31671

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-08 09:00:31 +00:00
Aaron Bohy 0bc24a78a2 [FIX] web,*: adapt autocomplete dropdowns after jquery update
*partner_autocomplete,test_main_flows

In jQuery 3, the active element in autocomplete dropdowns is no
longer identified with class 'ui-state-focus' on the <li/>, but
with class 'ui-state-active' is on its child <a/>. Moreover, the
background color of the active element is now set on the <a/>
instead of the <li/>.

This rev. adapts scss rules accordingly, and selectors in the
main_flow_tour.

Issue reported on the jquery update pad.

closes odoo/odoo#31693

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-08 07:25:39 +00:00
Thibault Delavallée 20e68b3297 [REF] website_slides: rework standard lesson page view
Purpose of this commit is to perform a cleaning and upgrade of the lesson
view in front-end when not using the fullscreen mode. This page had not
been updated since eLearning addition.

A method is added on slide model to have a protected method computing quiz
related information on a given set of slides, notably potential karma gain,
gained karma and number of attempts. It is mainly a code move from controllers
now working in batch.

Some linting is also done, notably a badly-named file.

See original eLearning task for main specifications [1].

Commit linked to task ID 1941250 and PR #31657.

[1] See task ID 1902304

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-07 19:51:33 +00:00
Yenthe666 0a37729ea9 [IMP] base_import: clarify error message in xls import
When an import failed because of a specific cell, the error was
   Error cell found while reading XLS/XLSX file: #N/A

Add the line and column index in the error for better debugging
Translate error message

Cherry-pick of odoo/odoo#30729 in master

Closes #30729

closes odoo/odoo#31677

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-07 16:30:16 +00:00
Yannick Tivisse 24b3b91ca7 [FIX] l10n_be_hr_payroll: Make module not auto-install
closes odoo/odoo#31675

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-07 15:43:46 +00:00
cristinamartinrod ca1b201cec [FIX] website_mass_mailing: translate button
The text was in a value tag, making it untranslatable

Closes odoo/odoo#30774

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-07 15:36:58 +00:00
Pedro M. Baeza 98b2784d1e [CLA] backport of e78af353fc to 10.0
Include cristinamartinrod in CLA of Tecnativa

Needed for odoo/odoo#30774
2019-03-07 15:36:47 +00:00
Rémi Rahir cc54194e13 [FIX] website_sale: filter fiscal positions on company
When creating a cart on the website, the website company was not
considered which could end up with the selection of a fiscal position
linked to a wrong company since the method is called in sudo.

closes odoo/odoo#31673

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-03-07 15:38:10 +00:00
Vincent Schippefilt 7221aa7db4 [FIX] account: add missing class on section and note field
after the update of jquery, all promises are asynchronous.
In the invoices, a class was added to the section and note field before
it was rendered.

To fix this, we are now waiting for the rendering to be completed before
adding the class.

closes odoo/odoo#31666

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-07 14:50:31 +00:00