Commit Graph
133862 Commits
Author SHA1 Message Date
Xavier Morel e95ccf0908 [FIX] *: domains should not have as many binary operator as there are terms
* modify client-side domain normalisation to error if the domain is
  invalid (not enough terms / segments for the number of operators)
* add better error reporting to attrs / modifiers parsing
* add a few layered error augmentation to provide clearer context
  e.g. "error: invalid domain <thing>" is helpful but "error while
  parsing modifiers for field foo: modifier invisible: invalid domain
  <thing>" is much more helpful
* rework _evalModifiers to deduplicate it in order to more easily
  implement this contextual augmentation
* test that improper domains are properly found improper
* fix a bunch of incorrect attrs domains
* also removed an apparently undefined (& unused) "options" argument
  to a _applyModifiers call

closes odoo/odoo#44642

Related: odoo/enterprise#8175
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-12 09:32:17 +00:00
Romain Derie 968638aa1a [FIX] website: prevent undefined in publish toastr
d92f76592c introduced a toastr when publishing a record.
It was designed for the topbar publishing toggle button, but some other
templates ended up also using that feature.
As those templates were missing `data-description` which contains the model
business name, it would show `You've published your undefined`.
This is only related to a very few places having a publish button inside the
page.

This commit fixed that by ensuring every publish button template have the
necessary code.
Also, a fallback is added in case tha `data-description` is missing somehow.

task-2191735

closes odoo/odoo#45141

X-original-commit: 4ab6e36b739060eb16e97eac502fd087a072abf3
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-12 07:53:51 +00:00
jvm-odoo a0e2c8a765 [FIX] mrp: populating bom lines on import
Issue

	- Install MRP
	- MO > Import with BOM

	The lines are not populated but it
	was the case in v12.

Cause

	In 7206b385b5, the lines generation
	are done in a onchange but they are
	not trigerred in imports

Solution

	Call the onchange manually when we
	are in an import case

OPW-2188066

closes odoo/odoo#45118

X-original-commit: 26c44fae1ad8a3ac2d79d9673255aef12fddeb17
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-02-11 16:22:51 +00:00
Santiago Acosta y Lara fe8036537d [FIX] stock: move line: uom mismatch in _action_done
Before this patch, validating an unreserved move of a dozen while 12
units were reserved resulted in a quant with 0 unit as quantity and 11
units as reserved quantity.

closes odoo/odoo#45132

X-original-commit: bf7d76a7127521ba17f29bc470c3d551cc9988d5
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-11 18:33:25 +00:00
Sébastien Theys 4c492a1989 [FIX] hr: restore chat button on employee form
[1] transformed the button to be `a` instead of `button` for validation reasons
however `header` only renders `button` tags so the chat button was not visible
anymore.

[1] eb2f0aabcf

closes odoo/odoo#45129

X-original-commit: 0075dc37b07b1e81ff8c20e5af49173bf69d55ed
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-02-11 18:11:10 +00:00
fja-odoo 729e8c9124 [FIX] website: hide move arrows for image gallery carousel items
Bug introduced with https://github.com/odoo/odoo/pull/38997

closes odoo/odoo#45125

X-original-commit: ffffa1c0ab84bbfe8950a0e31feb39e3a3b188bb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-11 17:35:41 +00:00
fja-odoo 1262648486 [FIX] web_editor, website_form: fix submit btn edit
The edition of the submit button's text was broken.

Part of https://github.com/odoo/odoo/pull/44907

closes odoo/odoo#45124

X-original-commit: 85966ac29b53d9e1c2ad1efb2c35ab13c9baae89
Related: odoo/enterprise#8360
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-11 17:35:07 +00:00
fja-odoo 07bb2e4591 [FIX] website_form, *: add submit btn position option
* = website_crm, website_hr_recruitment, website_sale

It is now possible to change the position of the submit button via
the left panel. Indeed switching to a non-horizontal form left the
submit button aligned with the labels which thus appeared broken.

Part of https://github.com/odoo/odoo/pull/44907
task-2191409

X-original-commit: 60b4c8d04006736be573189accd0dccaafafa651
2020-02-11 17:35:06 +00:00
Victor Feyens 25d70fc5c9 [FIX] account: account.bank.statement.cashbox multi record creation
account.bank.statement.cashbox model is verified at create/write
and updated accordingly but may crash on multiple record creation/update.

The `for` loop on `self` didn't use the specific records yielded but the `self` recordset.

closes odoo/odoo#45116

X-original-commit: af8367734c69dfeb0a1e1f029009f6da98449d0b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 16:16:05 +00:00
Victor Feyens fe7b0e828f [IMP] base: UI improvement
closes odoo/odoo#43676

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-11 14:48:52 +00:00
Victor Feyens 27650db8bb [IMP] base: onchange cleanup 2020-02-11 14:48:52 +00:00
Bhavita Bhattandjpr-odoo c1a1e47b52 [IMP] website_livechat,website_forum: option hidden after installation
In this commit we deleted tour file of website_forum beacause
of the changes applied on  forum icon of new click button,
live chat icon disappear after livechat module installed and
modified livechat channel data for auto-publish channel.

task-2088546
closes #40085

Related: odoo/enterprise#6639
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:10 +00:00
Bhavita Bhattandjpr-odoo 4e340cc5f0 [IMP] website: improve code for duplicate and new page
in this commit, throw the wizard to enter the new page name, while duplicating
page button and new duplicate page button added in the page properties dialog.
updated the test case related to duplicate page along with duplicate menu
consideration.

task-2088546
closes #40085

Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:10 +00:00
Bhavita Bhattandjpr-odoo 4e162a4e75 [IMP] website, website_link: improve frontend config screens
Following things are done in this commit:
1. changed some labeling and string for more readable and helpful to the user
2. added extra width to the text box
3. added publish/unpublish option for mobile view.
4. track page option auto-activated for any new page,event,job offer,course,
   blog.

task-2088546
closes #40085

Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:00 +00:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
RATIONALE

Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case

  * using the template in the composer on a single record: it is displayed
    in the rendered template in the composer, meaning people could change it.
    This behavior is interesting as it allows to see the email content;
  * using the template in the composer in mass mail mode: it is not displayed
    as only the raw jinja is displayed. It is therefore not obvious that it
    will be appended to the body of the mail. People could add it manually and
    have 2 signatures as a result;

A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.

Behavior will therefore be

  * use a template -> specify signature usage in it manually through jinja;
  * do not use a template -> signature added in sent emails;

SPECIFICATIONS

Remove user_signature.

Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.

Quickly clean some signature integration.

LINKS

Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761

Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-02-11 14:01:13 +00:00
Sébastien Theys 5018b01dc7 [IMP] mail, test_mail, hr_holidays: remove obsolete out of office
The customizable "out of office" text was removed from the editable views as
part of task-2053585, but some places in the code were still using it, even
though it was never set anymore.

This commit removes the obsolete code.

Part of task-2171864

closes odoo/odoo#44968

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-02-10 13:05:04 +00:00
oco-odoo b7ade94c30 [FIX] account: correctly round amounts to compute matched percentage
Before that, depending on rounding errors on floats, it was possible to end up with a matched percentage of 0.999999999 instead of 1.0 on an account move in case of full reconciliation. This could in turn cause problems with cash basis taxes, when checking what proportion of the move is reconciled.

closes odoo/odoo#45094

X-original-commit: 958bee9cf9f770351fbc346a081cfe059a911b3f
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-11 13:08:38 +00:00
Raphael Collet fd30d29d3c [FIX] core: log import traceback in debug mode
This is a followup of 1d553eea7b.

Systematically logging import tracebacks can fill up log files, and
waste disk space.  We therefore log those tracebacks in DEBUG mode, so
that they can be activated only when needed.

closes odoo/odoo#45075

X-original-commit: 017e3d798c55b1bdac221aea76d3d944f045ee65
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-11 11:39:25 +00:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00
Victor Feyens a247d64377 [MOV] account,sale --> (account,sale)_intrastat: intrastat code.
closes odoo/odoo#44858

Related: odoo/enterprise#8277
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 09:25:20 +00:00
Victor Feyens a8ecefcd94 [IMP] sale_coupon: batch coupon cancellation. 2020-02-11 09:25:19 +00:00
Yannick Tivisse 65b7d1f1ea [IMP] sale_coupon: Allow helpdesk users to send coupon by email
Purpose
=======

Helpdesk users don't have the right to write on a coupon.

When sending a coupon by email, the coupon is marked as 'sent'.

Allow users to send coupons by executing the state change in sudo.

closes odoo/odoo#45091

Taskid: 2179609
Related: odoo/enterprise#8143
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-11 12:49:27 +00:00
Wolfgang Taferner 8496ffbc03 [FIX] stock: filtered related product_id field will overwrite on create
Assume a situation where you trigger a method which is going to create a
nested picking with move_lines included and having a filter set which
means that your context includes {'default_product_id': 20}

{
 'location_dest_id': 9,
 'location_id': 19,
 'move_lines': [(0,
                 0,
                 {'location_dest_id': 1,
                  'location_id': 2,
                  'name': u'name',
                  'partner_id': 1,
                  'product_id': 10,
                  'product_uom': 1,
                  'product_uom_qty': 1.0})],
 'origin': u'Origin',
 'partner_id': 1,
 'picking_type_id': 59
}

Before the creation of the objects it will inject the default product in
the top level of the dict which should create a picking with one or more
move_lines.

Based on this this injection will overwrite all product_id values of the
created move lines as the picking is created last and the default value
will write ALL move lines with this specific product from the context.

closes odoo/odoo#45076

X-original-commit: 1da687b644e581081ce21687c5eb32285c872a2a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-11 11:39:58 +00:00
jvm-odoo d8dc4cbafc [FIX] web_tour: fix too much tips on appswitcher
Issue

	- Deactivate demo data
	- Install several modules (e.g. Sales, Helpdesk)
	- Go on Home
	- Hard refresh

	All tours' tips are shown

Cause

	In 02dab5dc88, we wait the DOM to be ready.
	The DOM wasn't ready in previous version, this is
	why it seems to work.

	As the DOM is ready, in check_for_tooltip we
	have a visible trigger so trigerred = true
	and the tip is activated.

	If you activate the debug mode, the DOM is
	not ready too, this is why it works fine
	in debug mode.

Solution

	I don't think that not waiting the DOM to be
	ready is good so I think we should keep that
	and handle the case when we update the tours
	from the _register method. So that, we use
	the else part of the update method which
	will break after a tip has been activated.

OPW-2188525

closes odoo/odoo#45073

X-original-commit: 5f0451c54cb785cc940b78a489316bed5ad9d888
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-11 11:38:27 +00:00
Goffin Simon 669bb4ca41 [FIX] sale_management: No discount displayed in option products
[FIRST ISSUE]

Steps to reproduce the bug:

- Create a pricelist PL with 50% reduction on all products.
- Create a SO with PL
- Add an optional product P

Bug:

 The price is correct for P  but the discount displayed was 0%.

[SECOND ISSUE]

Steps to reproduce the bug:

- Add the option line to the order

Bug:

A new line was create for P in the SO with the correct price but the discount was not displayed

PS: The discount field on the model sale.order.option has been implemented to add a new discount
to the displayed price unit of the option. But it has not been implemented to show the discount computed with
the pricelist.

opw:2186470

closes odoo/odoo#45056

X-original-commit: bcb304bbad3d10ca5efc7411fff4c9efff8fa6b3
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-11 10:32:57 +00:00
Nicolas Martinelli 12af185961 [FIX] api, product: search by pricelist
- Activate variants and pricelists
- Go to Product > Products Variants
- Search for anything on the 'Pricelist' filter

A traceback is raised: 'Can only create cache keys from hashable
values...'.

This comes from the following change:

https://github.com/odoo/odoo/blob/4b06fe19fa68255b7982d15e5847da2f6d6209fd/addons/web/static/src/js/views/control_panel/control_panel_model.js#L962

It returns a list instead of a string. Since a list is not hashable, it
causes the issue.

There are not much solutions since the context key `pricelist` can be a
`list` or an `int` (an ID). We force the cache key conversion to a tuple
to avoid the `TypeError` and handle the `list` use case (which was
broken on top of crashing).

opw-2187757

closes odoo/odoo#45064

X-original-commit: ec0a8767143b4c4818418281803c4f52fefa8d2a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-11 11:05:09 +00:00
Hardik Prajapati a43f857423 [IMP] base_vat: replace vatnumver by stdnum library.
Python module vatnumber doesn't seem maintained anymore. Therefore, we should:
    - call directly stdnum (which is maintained and mostly used everywhere in vatnumber)

Also improve stdnum import, vat fix method and vat expected formats

task-1915371

closes odoo/odoo#36978

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-05 10:39:39 +00:00
Andrea Grazioso (agr-odoo) 825b227d5c [FIX] account: fix invoice report total incorrect
Go to Accounting / Reporting / Management / Invoices
Select Pivot view
Add "Total" measure
expand results adding "invoice #" and product

Total will be incorrect because it is summing up the value reported from
several lines of the query in which the total is taken as the invoice
total, so it will display total * # lines.

Using the price retrieved from the single lines fix the issue, but it
needs to be converted according to the currency rate of the invoice.

Moreover the test need to be modified because the amount_total variable
of the report should NOT be the move amount_total but the amount from
all the lines converted in company currency

opw-2187369

closes odoo/odoo#45050

X-original-commit: 1558bb2a62cf169e6b19a2aa4dd92fcd8ff1b25a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-11 09:16:03 +00:00
Sebastien LANGE 479cb5bfcd [CLA] Update Subteno IT CLA
closes odoo/odoo#44823

X-original-commit: 633d1f3e661fe5f0f8ef1098ece9aa69b39bf26d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-02-07 08:05:15 +00:00
Sebastien LANGE cf32ec388c [FIX] stock: Correct forecast quantity with view location
Usecase to reproduce:
- Set the lot_stock_id as a view location
- Create a PO and validate it

-> The forecast quantity on stat button is correct but it's missing in
the forecast quantity report.

It happens because the condition for stock_move is based on valuation
strategy. However it's not correct since it's not True that a product
is in the stock if it's valuated (as subcontracting, owner, ...)

In order to fix it uses the warehouse in order to define if a move is in
or out (the same way than the _get_domain_locations on product).

X-original-commit: d7da1b733b4cece73d26805e6371499026bed0cd
2020-02-07 08:05:15 +00:00
Richard Mathot 9e78d55344 [FIX] models: ignore dependencies of fields inherited from custom fields
When adding a custom field, the ORM also adds it to all the inherits'ed
models, but with the state `base`, because those inherited fields are
automatic (created by the ORM).  However, dependencies are enforced for
`base` fields, while they can be ignored for `manual` ones.  This is a
problem when a custom field is fucked up: its inherited fields will make
the registry crash.

We fix the issue by not enforcing dependency check on fields inherits'ed
from custom fields.

opw-2191114

closes odoo/odoo#45024

X-original-commit: 2db0787dc9e8717200aaf1d71ac64df1c17f4143
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-10 16:22:24 +00:00
jerome hanke (jhk) aea622b8c5 [FIX] l10n_be: dutch translation update on financial report - bis
Steps to reproduce:

- have Odoo with Dutch language and install Belgian accounting
- print "Periodieke BTW aangiften" report
- the report is wrongly translated

see this document for reference:
https://financien.belgium.be/sites/default/files/downloads/165-625-richtlijnen-2016.pdf%22

related pr: https://github.com/odoo/enterprise/pull/8233
opw-2176688

closes odoo/odoo#45009

X-original-commit: 32b385b71e338a5a1884dfa08bc0fd7860dd97ce
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-10 15:11:49 +00:00
Julien Castiaux 450263338c [FIX] web: attach the trad alert to the form
The translation alert dialog was attached to the entire view in case no
status bar was found. This resulted in the following layout on large
screens:

    chrome
    --------------------------------------
    | alert dialog | form view | chatter |
    |              |           |         |
    --------------------------------------

Whereas when a status bar was set on the form view, the rendering was as
follow:

    chrome
    --------------------------------------
    |        status bar        | chatter |
    |       alert dialog       |         |
    |        form view         |         |
    --------------------------------------

The fix make sure the alert dialog is always placed just above the form
view just like when there is a status bar.

closes odoo/odoo#44878

Task: 2075172
X-original-commit: dacdc30681510e9c2db23610c5be5285a72a8949
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-02-07 14:32:58 +00:00
Yenthe666 20ff585c2b [IMP] purchase: remove double context key
Before this commit the purchase_rfq action had two context keys
defined. One being empty {} and one with quotation_only set to
True. After this commit there is just one context (the one that is
actually used and applied) on the action.

Empty key added in 12.0 at 6138686d41b
Second key added in 13.0 at b5cea7e2b6

closes odoo/odoo#44990

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-11 07:42:54 +00:00
sndandNicolas Martinelli f7eb653e7a [FIX] google_calendar: synchronization cron timeout
In a database with many users / events to synchronize, the cron
`ir_cron_sync_all_cals` may time out. Consequently, even if a `commit`
is performed for each user, some users are never synchronized.

In this commit, we first sort the users by last synchronization date,
meaning that all users will ultimately be synchronized, even if the cron
times out. On top of that, we introduce the context key
`last_sync_hours` to prevent the synchronization in case the cron is
restarted after timeout.

opw-2158372

closes odoo/odoo#45032

X-original-commit: 2f21def63c61324e2286dbee6abead091171a041
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2020-02-10 17:38:28 +00:00
Joren Van Onder 7d254d3e36 [FIX] hr_contract: provide filters for the activity widget
Without these magic filters the various options in the activity
widget (late, today, future) will show all activities instead.

opw-2172833

closes odoo/odoo#45036

X-original-commit: 081cb02d554760be1da0d4d10ad9a287c7bf462e
Signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
2020-02-10 19:42:01 +00:00
Yannick Tivisse 19482aff8e [FIX] sale_timesheet: Fix undeterministic crashing test
Purpose
=======

Launch the test at 00:05:00.

Then when opening the advance payment wizard, the field
date_invoice_timesheet would be set to yesterday, instead of
today.

Adapt the default value on the wizard, and the related tests.

closes odoo/odoo#45023

Taskid: 2178983
X-original-commit: 0a46e92cf742ca811b1685860619dba1d0dc7bd5
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-10 16:21:03 +00:00
Johan Demaret Rivarola 0d5fcdc1c7 [FIX] base: clear cache before read access check
When reading binary content such as `image_128` on `res.users`,
`AccessError` should be raised when necessary.

Steps to reproduce:
  - Populate cache in superuser mode.
  - Access cached field with public user.
  - Read access is allowed but should not.

Concrete example:
  - Unpublish `demo` user.
  - Access `/slides` with `public` user.
  - The template data is generated as `sudo`.
  - The same data is then accessed as `public`.
  - AccessError should be raised when requesting
    `/profile/avatar/<int:user_id>` but is not.

Closes #43826

closes odoo/odoo#45033

X-original-commit: e0112db4d6131751475365ab4c42de848f925dce
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-02-10 17:43:11 +00:00
Samuel Degueldre 7cc6fdf365 [FIX] website_blog: fix next post loading animation
Previously, when clicking on the next post at the bottom of a blog post,
a spinning loader circle would always appear in the bottom left of the
screen in an incorrect position. This commit removes that spinner.

This commit also adds support for the half-screen cover size, which
until now would animate as though it was full screen. All in all this
just makes the transition animation much more seamless, which was the
point of having it in the first place.

task-2166790

closes odoo/odoo#44198

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 17:03:33 +00:00
Denis Ledoux 6caecbc86d [FIX] doc: typo in 398a3d7efeef379c524d2c417f5dbec94fb2915a
closes odoo/odoo#45025

X-original-commit: ba1acb26608eed6c1eeff7effc07451efe4dfa79
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-02-10 16:23:48 +00:00
Romain Derie e05bf2e230 [FIX] website: delete page on cascade when deleting a website
The user is never able to delete a website, since there is at least one page,
the homepage, which is bootstraped during website creation.
From that point, even if nothing was done on that website, it was not possible
to remove it.
As website deletion is already a technical thing (debug mode), and since
website.page do not make sense without their website, removing those on cascade
will allow the user to remove a non-modified website.

task-2092845

closes odoo/odoo#45018

X-original-commit: ba6206baae7e3defbb6d28bcfe48eb5bed38d4c7
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-10 15:48:36 +00:00
Romain Derie 9894b36ea7 [FIX] website: prevent crash when 'force_website_id' has been deleted
As an admin or website publisher, you have the possibility to switch website in
the navbar. This will force a website in your session*.

If this website is removed at some point, your session will be broken as the
dispatch will lead to a traceback, trying to read un unexisting website.

* There is other way to have the website forced in the session: theme install,
  go to website from settings, create website from settings..

opw-2092845

X-original-commit: 835d1201b8a26168bb003a5fc664e692005cb0a2
2020-02-10 15:48:35 +00:00
qsm-odoo 0ac7d67c5f [FIX] web_editor: fix gallery blocking the editor after image reordering
When snippets deeply alter the DOM (e.g. image reordering in gallery),
the related option might be destroyed since they are referencing old
DOM. If such a case occurred, the destroyed option was still waiting for
an option update response by the editor before being considered as
finished... which then never occurred and blocked the editor.

closes odoo/odoo#44998

X-original-commit: 9eeea4c4107dc15984c475582d5ee58a17cd2568
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 14:28:34 +00:00
Kevin Baptiste 32a8b4dce3 [IMP] crm: make unlink optional in merge_opportunity
closes odoo/odoo#44997

X-original-commit: a8094108a4e469f5bc4a3ba541ede7a61f28d522
Related: odoo/enterprise#8311
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-10 14:27:58 +00:00
jvm-odoo de7a0b3240 [FIX] website_blog: fix share link on blog posts
Issue

	- Install Blog
	- Go on a Blog post
	- Customize > Enable Share links & Sidebar
	- Click on a social share link

	Redirected to #

Cause

	The website_blog.js has been refactored fron v12
	to v13, it seems that the onShareLink method has
	been forgotten in the event handlers.

Solution

	I added it and make it working with the actual view.

OPW-2170706

closes odoo/odoo#44992

X-original-commit: 0e90afb789690be3723f0c3522b50b2ce7dfb8e5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 14:11:01 +00:00
Samuel Degueldre 99427c2c5a [FIX] web_editor: fix apply-to methods not being awaited
When the apply-to data attribute was first introduced, a mistake was
made when storing the results of the methods calls, using _.each instead
of _.map to associate each target element with the promise of the method
execution, as a result, Promise.all would resolve immediately instead of
waiting. While there are no currently documented bug caused by this,
they are just waiting to happen.

This commit fixes that.

closes odoo/odoo#44988

X-original-commit: 32271be1f696c11b3e5157426b8f7c9efa93134b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 13:48:40 +00:00
fja-odoo 574bf9bb12 [FIX] web_editor: fix color palette custom color behaviors
Selecting a css color equals to a theme color via the custom color
was not selecting the theme color.

Opening and closing the custom color without picking a color was
unselecting the selected color.

Now the custom color picker has the selected color as default even if it
does not appear in the palette as selected. This was appearing in the
parallax snippet as no custom color is displayed.

closes odoo/odoo#44986

X-original-commit: 0c8be24ac72c223c12eadbdcf635628f203a6766
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 13:48:19 +00:00
qsm-odooandfja-odoo ed999bc88e [FIX] web_editor: fix image removal inside image gallery
Since we use Promise instead of jQuery deferred, the onRemove method
class was no longer triggered before the actual removal of the elements.

Original fix with https://github.com/odoo/odoo/pull/43918
This PR is the same with the async/await form, not breaking the history
of half of the removeSnippet method's lines.

closes odoo/odoo#44963

X-original-commit: 37941159c82d487ff172f0e6b27028f23ab32810
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: fja-odoo <fja@odoo.com>
2020-02-10 11:43:00 +00:00
fja-odoo 1ebc4661dc [FIX] web_editor, *: unblock editor after any option dialog closing
*: website

Some dialog promises were not resolved on close, blocking the editor.

closes odoo/odoo#44953

X-original-commit: 20f97470cdc59a817526305806e94b222f26a0f2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 10:54:02 +00:00
Swapnesh Shah 591861faf0 [IMP] base: Use correct reference
Follow-up on https://github.com/odoo/odoo/commit/22f02af6bf002324ebafc38d4eefeda60063247a
Use the correct reference for the file.

closes odoo/odoo#44919

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-08 15:00:26 +00:00