Commit Graph
126208 Commits
Author SHA1 Message Date
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
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
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
Christophe Simonis 2420492c26 [FIX] purchase_stock: adapt newly added test
Set properties directly on product category instead of via (readonly)
related fields on product template
2019-05-03 16:33:02 +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
Christophe Simonis 62017de41e [MERGE] forward port branch 12.0 up to d7c0c5c127 2019-05-03 09:16:50 +02: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
Jeremy Kersten 9c1ad3604e [FIX] website_forum: fix translation from faq
Since the refactoring of forum, faq sanitize is set to False.
The editor of the faq can make what he want...

But disable sanitize will break the translation since fields.py has code:
```python
     def _setup_attrs(self, model, name):
        super(Html, self)._setup_attrs(model, name)
        # Translated sanitized html fields must use html_translate or a callable.
        if self.translate is True and self.sanitize:
            self.translate = html_translate
```

Now we don't become html_translate magically, but we need to specify it
in the field definition direclty.

Courtesy of @mart-e

This commit closes opw-1978662

closes odoo/odoo#33112

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-05-02 12:46:13 +00:00
Jorge Pinna Puissant d7c0c5c127 [FIX] account: sign columns amount_untax and amount_tax
In the tree view for account.invoice, two columns are signed
(amount_total and residual) and two columns are not signed
(amount_untaxed and amount_tax).

Now, all the columns with numeric values are signed.

This commit reverts the commit : 622af0b7cc

opw-1964348

closes odoo/odoo#33097

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-02 08:58:54 +00:00
Nicolas Martinelli da342a549f [FIX] mrp_byproduct: Put Away Strategy
- Create 3 products:
  C1, no tracking
  P1, tracked by lot
  P2, tracked by lot
- Create a BOM: to product 1 unit of P1, use 1 unit of C1. It also
  produces 1 unit of P2 as byproduct.
- On the Stock location, create a Put Away Strategy to send:
  P1 to Shelf 1
  P2 to Shelf 2
- Create a MO, validate until then end

P1 is correctly sent to Shelf 1, but P2 is sent to Stock instead of
Shelf 2.

No call is performed to `get_putaway_strategy` at move line creation.

opw-1972130

closes odoo/odoo#33109

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-02 12:05:56 +00:00
Nicolas Martinelli 033a7fab4d [FIX] account_cancel: In Payment
Allow the cancellation of invoices 'In Payment', since there is no good
reason to not be able to do it.

opw-1981682

closes odoo/odoo#33093

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-02 06:36:40 +00:00
Goffin Simon ff83914752 [FIX] portal: Hide messages when unpublished for portal
Steps to reproduce the bug:
- Create a SO and go to my/account
- Share the SO with a portal user P
- Go to on the website
- Write a message in the chatter and unpublish it
- Log as P and go to the SO

Bug:

The unpublished message was displayed.

Same logic as: https://github.com/odoo/odoo/commit/d79678fdd5faccffff65a439653fa5d639a3d3c4

opw:1969524

closes odoo/odoo#33053

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-05-02 08:24:08 +00:00
Julien Castiaux 81877310bc [FIX] web: ignore field message_attachment_count in debug menu
Open a record with a chatter (ie an opw task), add an attachment, enable
debug mode and click on "Set Defaults" in the debug tools, traceback.

The `message_attachment_count` field is a special view added by the
chatter on the form view. This field exists on the view but is absent on
the list of field listed by the XML file. Setting a default value on
that special field is not supported.

opw-1972372

closes odoo/odoo#33044

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-05-02 07:25:13 +00:00
Pierre Masereel 49fdd155f7 [FIX] website_sale: handle free SO
When a sale order is free, no transaction are created but you are
redirected to the page '/shop/confirmation' that display a transaction
and lead to bad displaying because there are no transaction.

To fix this behaviour, we redirect to the portal view of this sale order.

We've also added the 'href=#' on the button link to have it written in
white.

closes odoo/odoo#33019

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-02 09:47:38 +00:00
Graeme Gellatly 8e0610f609 [FIX] account: Correctly Filter Product Taxes in Multicompany Case
Steps to reproduce:
- Create a product as user for Company A.
- Set a tax on it for Company A.
- As a user in company B, set a default tax for the account associated with the product and/or company.
- As a multicompany user of Company A and B, in company B, create an invoice with the product.

When the onchange is triggered - no tax.

https://github.com/odoo/odoo/blob/11c950ef23faefb5b826c7fb6eb0dccb8e345ca0/addons/account/models/account_invoice.py#L1644-L1654

Its because first we evaluate product taxes for all companies, if none then the account, if none again then the company.
Then they are filtered by company, but in reality the only taxes that need filtering are product taxes (as account
taxes and company taxes should already belong)

fixes #27696

opw:1963881

closes odoo/odoo#33013

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-29 12:55:45 +00:00
Nicolas Martinelli c9d98ec511 [FIX] payment_authorize: missing fields
- Activate Invoice Online Payment
- Set Authorize to pay through Odoo (S2S)
- Create a new customer (do not give portal access)
- Create invoice -> send to them
- Open invoice in incognito mode
- Try to pay invoice online with Authorize

An error is raised:

The transaction cannot be processed because some contact details are
missing or invalid: City, Country. Please sign in to complete your
profile.If you don't have any account, please ask your salesperson to
update your profile.

The error is quite confusing, and the user is missing the main point: he
needs to sign in.

There is no reason to display the fact that contact details are missing
for a public user, so this part is now shown only if the user is logged
in.

opw-1981003

closes odoo/odoo#33116

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-02 13:23:35 +00:00
Christophe Simonis 4a380414a7 [FIX] mrp: reset lines when quantity change in produce wizard
Error revealed by c6d718f211
2019-05-02 15:36:35 +02:00
Christophe Simonis 1fac2e8c05 [FIX] stock: use correct group xmlid
Oversight of previous forward-port.
2019-05-02 13:37:30 +02:00
Christophe Simonis 3ca58705c9 [MERGE] forward port branch saas-11.3 up to 2c68df0ab4 2019-05-02 13:16:27 +02:00
Christophe Simonis 2c68df0ab4 [MERGE] forward port branch 11.0 up to 82c901c937 2019-05-02 10:59:21 +02:00
Christophe Simonis 82c901c937 [MERGE] forward port branch saas-15 up to d5a1ad566b 2019-05-02 09:39:20 +02:00
Christophe Simonis d5a1ad566b [MERGE] forward port branch saas-14 up to 5728e39181 2019-05-02 09:31:13 +02:00
Christophe Simonis 5728e39181 [MERGE] forward port branch 10.0 up to 903fec011d 2019-05-02 08:48:46 +02:00
Nicolas Martinelli 848a1b970b [FIX] account: multi-click in reconciliation
- Open the bank reconciliation widget
- Throttle the connection
- Click multiple times on the same move line in order to select it

The line is added multiple times to the statement line.

We mitigate the behavior thanks to a `debounce`.

Fixes #33000
opw-1978551

closes odoo/odoo#33020

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-02 06:22:22 +00:00
Swapnesh Shah 8fdfd4a77c [FIX] project: Fill date_last_stage_update when needed
Before this commit, the date_last_stage_update field in fill everytime at task creation. This does not make sense if ther is no project linked to the task or if there is no stages associated to the project/task.

This commit populates the date_last_stage_update field only when needed. So, we can now have newly created task without date_last_stage_update filled.

closes odoo/odoo#31999

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-01 19:07:50 +00:00
Cas Vissers 3f8a5e466d [FIX] sale_timesheet: extract the check on write in a function
On write, a check is done that raises
'You can not modify already invoiced timesheets …'.
We put that check in a function so that this behaviour can be extended.
(restricted by an override, or relaxed by not calling the super)

opw 1974968
closes #33057

closes odoo/odoo#33092

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-02 06:13:00 +00:00
Odoo Translation Bot 903fec011d [I18N] Update translation terms from Transifex 2019-05-01 02:43:48 +02:00
Goffin Simon 2efcefb504 [FIX] l10n_ch: Error when saving a email template
Steps to reproduce the bug:
- Configured bank account for CHF with all the ISR related informations
- Click on "Send & Print" on a customer invoice with that bank account
- Save the email template

Bug:

An error was raised because the key 'attachments' didn't exist in the variable
rslt.

opw:1970005

closes odoo/odoo#33042

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-30 09:27:13 +00:00
Julien Castiaux 27e4d3bb1c [FIX] models.py: invalid write order in inherits
Create a model and extend this model using an inherits. Define a
constraint in the inherited model that uses a field of the parent model.
Create a valid element using the inherited model then write an invalid
value. This pass the constraint although it should raise an exception.

The problem resides in the `write` function of `models.py`. It first
write values on the inherited model then write values on the parent
model. The order is wrong, it should write on the parent model first
then on the child model.

The solution is to change the order fields are written: first we update
child references to their parents, then we update the parents, then we
update the child.

opw-1962705

closes #32919

closes odoo/odoo#33003

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-30 14:34:19 +00:00