Commit Graph
127612 Commits
Author SHA1 Message Date
Nicolas Martinelli e3b25b402c [FIX] sale: date on portal
It is more logical to display the order date on the portal rather than
the create date. Indeed, all computations (e.g. currency conversion) are
performed with the order date, not the create date.

opw-1966040

closes odoo/odoo#32973

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-26 08:40:51 +00:00
Odoo Translation Bot 3ac23bef79 [I18N] Update translation terms from Transifex 2019-04-28 01:34:21 +02:00
Lucas Perais (lpe) c6f1921beb [FIX] account_asset: asset report shows only non archived assets
Make a PO then an invoice with a product that will create an asset
cancel the invoice
Open the Assets Analysis report

Before this commit, the asset lines corresponding to the invoice
are shown

After this commit, they are not shown (only non archived assets are by default)

OPW 1974344

closes odoo/odoo#32955

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-25 14:15:50 +00:00
William Henrotin a981196c8f [FIX] mrp: unlink workorder lines in post_inventory()
Posting intermediate inventory in a manufacturing order using workorder
need to delete all the remaining workorder lines.
The post_inventory method create new raw moves for the remaining quantities
then reserve those quantities. The reservation will create new workorder lines

If the old workorder lines are not purged, the workorder will be asked to produced
too much.

closes odoo/odoo#32948

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-25 09:53:01 +00:00
Romain Derie f0bc5e0b52 [FIX] web_unsplash: correctly load images after credentials
Since media dialog and unsplash refactoring (1f847a1e2e, 78a30d44c) there was a
bug after adding credentials.
Indeed, when doing a search for the first time and no credentials are set, it
shows a form to add the missing credentials.
When saving those, it should automatically perform the initial search now that
the credentials are set.
But it was not the case anymore, it would keep reloading the credential form.
User would have to close and reopen media dialog.

closes odoo/odoo#32943

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-25 08:53:00 +00:00
Denis Ledoux b11930047f [MERGE] forward port branch 12.0 up to c9913152ec 2019-04-26 18:14:18 +02:00
Gert Pellin 26c4acc761 [FIX] point-of-sale: discount line on ticket
Before this fix an extra line with the price without discount will be
printed even if there is no discount on the product.

After this fix the line will only be printed if there is a discount.

The error occured due to the use of t-else instead of t-elif.

closes odoo/odoo#32989

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-26 13:44:33 +00:00
Xavier Morel 617ba2887a [IMP] base: avoid unnecessary exists in Contact HTML formatter
Protactively checking exists() seems unnecessary, it's likely that the
widget would be called on an empty recordset but seems very unlikely
that it'll be called on a missing record. The commit which added the
exists() call performs significant refactoring/rewrite and doesn't
explain why this exists() call would be useful.

Since exists is not cached and qweb field converters are not batched,
saves a large number of queries when formatting a series of addresses
e.g. with 99 hr.job, /jobs goes from ~170 queries and ~100ms spent in
SQL to ~70 queries and ~60ms spent in SQL.

Though the total performance improvement is very limited as even with
odoo/odoo#32985 the endpoint takes ~700ms (with the aforementioned 99
hr.job visible to the current user).

closes odoo/odoo#32986

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-26 12:24:04 +00:00
Christophe Monniez 4c35983d08 [FIX] packaging: avoid jinja2 asyncsupport in py2exe
Since 78ba90d5, when building the windows package, py2exe fails to
compiles jinja2 asyncsupport module. Even tough jinja detects the
environement, py2exe tries to compile the async part. The problem comes
from the fact that async keyword was introduced in python 3 and we use
py2exe with python 2.7.

With this commit the async part of jinja is execluded from py2exe.

closes odoo/odoo#32913

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-25 08:46:50 +00:00
Lucas Perais (lpe) 7f6309c60c [FIX] account_check_printing: print checks action defaults
Because of c56b746221
server action "state" (what it should execute) defaults to
Update a record

This commit corrects the check printing action accordingly

OPW 1972938

closes #32928
2019-04-25 09:34:14 +02:00
William Henrotin 18171b1e52 [FIX] mrp: wrong use of self
The method _workorder_line_ids() is defined on mrp.workorder while `self`
is an instance of change_production_qty wizard in this case. Without this
commit, changing the quantity to produce of a manufactoring order with workorders
already planned raised a traceback.
2019-04-24 14:03:06 +00:00
Christophe Simonis 60e71302a3 [MERGE] forward port branch saas-12.2 up to 243a4ae5cb 2019-05-13 11:02:27 +02:00
Christophe Simonis 243a4ae5cb [MERGE] forward port branch saas-12.1 up to 330b99f60c 2019-05-10 15:20:01 +02:00
Olivier Colson 3936d655c4 [IMP] account, l10n_*: v13 taxes
- Add repartition lines on taxes

- Link account tags directly to account.move.line; remove the tag_ids field from account.tag

- Add a new report engine dedicated to tax reports, directly generating account tags. It is called as an alternate mode of generic tax report, with a dedicated "Use tax grids" toggle.

>> The biggest change lies in the way the new tax report computes its values.
Everything is now aggregated directly using the tags set on the account move lines. Thanks to that,
modifying the configuration of a tax today will not impact the report for the previous periods anymore.
This is a big improvement, as it means the report will keep on reflecting the values that were submitted
to the state before, whatever the configuration change.

- Add an audit char field to account.move.line telling with tax grids are impacted by the line, with the corresponding amount

- Modify the behavior of cash basis taxes: the cash basis account is now used as the transition account, while the regular account given in tax declaration is used to store the final entry (it was the opposite before)

- Modify every l10n_* module in order to keep them consistent with these changes

closes odoo/odoo#32833

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-10 11:52:58 +00:00
Laurent Smet 574295df57 [FIX] account: fix usage of include_base_amount taxes in invoices
Suppose 3 taxes, all with include_base_amount checked:
- 21%
- 21% TVAC
- 12%

Suppose an invoice with 3 lines, one per tax, all with quantity = 1:
- price_unit = 100 with 21%
- price_unit = 121 with 21% TVAC
- price_unit = 100 with 12%

- Validate the invoice and take a look to the taxes set on taxes journal entries:
Originator Tax: 12%
Taxes: /

Originator Tax: 21%
Taxes: 12%

Originator Tax: 21% TVAC
Taxes: 21% 12%

... instead of:
Originator Tax: 12%
Taxes: /

Originator Tax: 21%
Taxes: /

Originator Tax: 21% TVAC
Taxes: /

-opw: 1861177
2019-05-09 11:56:39 +00:00
Laurent Smet 4523a11bed [FIX] account, point_of_sale: Fix complex taxes computation
The previous _compute_all wasn't able to get the right results in case of complex
taxes computation.

See tests for examples.

task: 39945
2019-05-09 11:56:39 +00:00
Priyanka Kakadiya 1ab4b61059 [FIX] website_sale_comparison: re-enable test
This reverts commit b5684105b1.

Closes https://github.com/odoo/odoo/pull/31961
task-1950702

closes odoo/odoo#31961

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-09 14:19:26 +00:00
Priyanka Kakadiya ee94decd30 [FIX] web: disable sanitization for bootstrap popover
Since saas-11.3:
Bootstrap sanitizer sanitizes html and removes attributes which are not
defined in whitelist, here is the documentation link:
https://getbootstrap.com/docs/4.3/getting-started/javascript/#sanitizer

Restore sanitize=false for bootstrap popover.

A scenario where the sanitizer will break a popover: compare 2 products
and open Compare popover and try to delete a comparison item from the
popover -> item can not be deleted because data-product_product_id has
been removed by sanitizer and so the item can not be deleted because
deletion logic depends on data-product_product_id.

Reference commit: https://github.com/odoo/odoo/commit/36caf5fc16b5a95a0bf37f08f0caf974683b2df6

Closes https://github.com/odoo/odoo/pull/31961
task-1950702
2019-05-09 14:17:05 +00:00
Toufik Ben Jaa 9530f1071d [FIX] mail: avoid crash when calling channel_info in mail.channel
- If a channel has only the current user as the partner the method `channel_info` crashes.
This can happen in the case of a partner talks to an other partner in
discuss.
Then these two partners are merged using the CRM partner merge
feature.

The channel has now the same partner in the channel twice.
The current code doesn't handle this case and crashes.

closes odoo/odoo#33274

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-09 11:10:12 +00:00
Xavier Morel 1121f01196 [FIX] bus: crashmanager popup if beep can't be played
According to MDN, HTMLMediaElement returns

> A Promise which is resolved when playback has been started, or is
> rejected if for any reason playback cannot be started.
>
> Note: Older browsers may not return a value from play().

Since un-resolved un-handled promises re-raise and trigger the crash
manager, this is extremely noticeable if the browser doesn't support
the media type or is not currently allowed to play
medias (e.g. configured to prevent auto-play).

This just avoids the error, but eventually it might be useful to
display a toast noting the user could allow sounds iff the rejection
reason is NotAllowedError. This fix would probably be implementable /
implemented on older revisions (which might have the issue, just not
as prominent as unhandledrejection is not hooked into the crash
manager).

closes odoo/odoo#33260

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-08 14:23:53 +00:00
wan 1679b0e926 [FIX] account: action was taking unexisting parameter
Somehow this worked before and isn't working now but that parameter is never used

closes odoo/odoo#33214

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-09 07:08:45 +00:00
wan 766f8c42a9 [FIX] base: html field was used instead of m2o
Original PR: https://github.com/odoo/odoo/pull/31597

The html sanitizer could have unwanted bahavior, and using a html field should be unneccesary

closes odoo/odoo#33143

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-05-07 10:51:15 +00:00
Alexandre Kühn 893e07e590 [IMP] im_livechat,web: use nicer placeholders for livechat
In the context of a livechat session, a placeholder that looks like a
person is better than a generic "missing picture" one, when the user has
no public avatar.

In order to allow a different placeholder without exposing a public
placeholder parameter, a separate route is introduced for the
purpose of displaying user avatars:
/web/partner_image/<id>/<field>/<model>
and can be simplified to:
/web/partner_image/<id> for loading a partner avatar (`image_small`).

The common part of the /web/image route was moved into a helper
function that is not directly exposed.

Task-ID 1924666
Closes #32664

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-05-08 10:35:37 +00:00
Alexandre Kühn 9e067d7d9d [FIX] web: safe open image placeholder
Before allowing custom placeholders, make sure the placeholder images
are accessed safely, using the proper util methods.

Task-ID 1924666
Closes #32664
2019-05-08 10:35:37 +00:00
wan c1ef82225e [FIX] l10n_be_edi: removing tax duplicate
If the account was not set on the new move line, a onchange added a new tax line leading to a duplicate
Also enforce the company on the tax selection

closes odoo/odoo#33250

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-05-08 11:04:54 +00:00
Christophe Simonis b5684105b1 [FIX] website_sale_comparison: deactive test
The feature is broken in version saas-12.3 and need to be fixed.

(hopefully) deactivate the test temporary.
2019-05-07 18:47:50 +02:00
Christophe Simonis 691bfde022 [FIX] account_check_printing: adapt test
Avoid having vendor bills and supplier refunds in the same payment
batch.
2019-05-07 14:35:12 +02:00
Christophe Simonis 106dffe479 [FIX] board: adapt test to new version
Oversight of previous forward-port.
2019-05-07 11:42:58 +02:00
Christophe Simonis c32b7e54a5 [FIX] stock: Allow multi-create on stock.warehouse 2019-05-06 16:16:52 +02:00
Julien Castiaux 2b080256dd [FIX] sale_coupon: print report in customer lang
Before this commit, coupons were printed using the connected user language
instead of the customer language.

opw-1970448

closes odoo/enterprise#4142

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>

X-port/Cherry-pick of odoo/enterprise@5a4ce5a3bc
2019-05-06 15:18:28 +02:00
Christophe Simonis 406b2850b5 [FIX] web: render new tests async
Oversight of previous forward-port.
2019-05-06 15:04:26 +02:00
Christophe Simonis aeb5166a2c [FIX] sale_{management,product_configurator}
Correct forward-port of 29052c5328
2019-05-06 13:04:44 +02:00
Gorash e244fa23ad [FIX] web_editor: drop an image in the 'mail.compose.message' modal
Issue: Can not drop an image into the modal's editor because the server
request a positional res_id arguments.

closes odoo/odoo#33232

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-05-06 10:32:42 +00:00
Gorash eaeff40236 [FIX] web_editor: drop an image in the editable area
Issue: can't drop a image if the editor is not focused or if the editor is
empty
2019-05-06 10:29:23 +00:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
Odoo Translation Bot 78b3b650b0 [I18N] Update translation terms from Transifex 2019-05-05 06:07:56 +02:00
Christophe Simonis 04acf0cc7c [MERGE] forward port branch saas-12.1 up to 2420492c26 2019-05-03 18:47:49 +02:00
qmo-odoo 8d9c054842 [FIX] website_slides: fix various quiz issues
This commit fixes a few issues with quizz

  * change background-color to white in fullscreen mode;
  * prevent going up to the top of the page when selecting an answer;
  * highlight selected answers in fullscreen;
  * fix the display of already completed quizzes

Commit linked to task ID 1978530 (fixes linked to internal testing).

closes odoo/odoo#33140

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-03 13:01:10 +00:00
qmo-odoo ef3ccce079 [FIX] website_slides_survey: fix some certifications issues in eLearning frontend
This commit fixes a few issues with courses which have certification

 * fix links to already passed certifications: currently it crashed, now it
   redirects to the certification end screen;
 * "Begin your certification now" green box link now has same behaviour
   as links in the list view. It redirects to either the start certification
   screen or the first slide in fullscreen mode. Moreover once the user has
   started the course (at least one completed slide) this box disappears as
   it is not really useful anymore;

Some dead code is removed.

Commit linked to task ID 1978530 (fixes linked to internal testing).
2019-05-03 12:43:01 +00:00
Toufik Ben Jaa 69cd8bc675 [FIX] survey: allow survey user to test a survey
- When tyring to test a survey as a "Survey User" you are redirected to the
  homepage.
  This is due to a faulty access rights check that only allows "Survey
  Managers" to test them.

closes odoo/odoo#33132

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-03 08:44:07 +00:00
qmo-odoo 9d26c122ab [FIX] website_slides: fix the end course button
This commit fixes the "End Course" button displayed after successfully passing
a quizz. Before this commit, the button didn't do anything, now, it redirects
to the slides homepage.

ommit linked to task ID 1978530 (fixes linked to internal testing).

closes odoo/odoo#33133

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-03 09:52:02 +00:00
Aurélien Warnon bf3ed3fc7c [FIX] website_slides: fix courses completion on user profile page
This commit fixes the courses (slide.channel) completion displayed on the user
profile page. It uses the number of completed slides instead of the percentage
of completion. This is due to the completion field having been updated
recently to store number of completed slides instead of a computed percentage
for performances reasons [1]

Commit linked to task ID 1978530 (fixes linked to internal testing).

[1] See 534822e54c
2019-05-03 09:43:27 +00:00
qmo-odoo 8af1fe54ad [FIX] website_slides: Add back the slide type icons in the lists
This commit adds back the slide type icons on the sidebar list
in fullscreen and not fullscreen mode.

Commit linked to task ID 1978530 (fixes linked to internal testing).
2019-05-03 09:43:18 +00:00
qmo-odoo fa24d7df3a [FIX] website_slides: fix join course widget selector
This commit fixes the selector for the slide_course_join widget. This issue
comes from the removal of the selector 'o_wslides_wrap' recently removed
when cleaning the DOM [1].

Commit linked to task ID 1978530 (fixes linked to internal testing).

[1] See e5c7e43c71
2019-05-03 09:43:15 +00:00
qmo-odoo f4b5b709a1 [FIX] website_profile: allow administrators to update profiles
Before this commit, only the users who validated their email could change
their own profile. In addition to that behavior we let administrators update
all profiles.

Commit linked to task ID 1978530 (fixes linked to internal testing).
2019-05-03 09:43:12 +00:00
Cédric Snauwaert e5fc295645 [FIX] account: move activities from account_journal to account_move
Because functionnal specs changed after we merged the task...

Follow-up of task 1911260

closes odoo/odoo#32904

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-02 13:35:02 +00:00
Kishan Gajjar 8e7a9b5046 [FIX] website: restore Facebook snippets in edit mode
Facebook snippets' related widgets must be instantiated in edit mode.

This was broken when the feature which disables the widgets in edit mode
by default was introduced with https://github.com/odoo/odoo/commit/335a505d1f9b6a978c0fe0f6ea760a45b0d0a67f.

closes odoo/odoo#32921

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-29 10:23:35 +00:00
Mohammed Shekha faf63c2c60 [FIX] website_sale_delivery: fix public user access error on carrier
When public user is on payment page '/shop/carrier_rate_shipment' controller is
called to get delivery carrier rate. But public user has no access right on
`delivery.carrier`

closes odoo/odoo#32977

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-26 10:42:28 +00:00
Jeremy Kersten 4d9179f1ae [FIX] website_forum: quick fix layout
Add missing row that make column ugly
add missing fa-icon that make no icon visible
add missing row that make forum name one by line
...

closes odoo/odoo#32975

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-26 08:57:03 +00:00
Olivier Colson b1530265e4 [FIX] purchase: anglosaxon accounting: fix wrong computation of prod qty when multiple stock move
Have a PO with a product in automated valorization, and average as method of valorization
Validate and receive *partially* (create backorder)
invoice with a different price than the PO
Receive the backorder
Invoice the rest, also with a different price than the PO

Before this commit, wrong amounts were written in the account.move corresponding to the invoice.
In particular, the payable account's amount was erroneous because it is computed to balance the move
As a result, the bill showed an amount due different from its total, even though nothing was reconciled with it.

After this commit, the payable entry and hence the amount due on the invoice are correct

OPW 1967289

closes odoo/odoo#32920

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-24 13:17:22 +00:00