Commit Graph
136328 Commits
Author SHA1 Message Date
qsm-odoo 117552f097 [FIX] web_editor: properly cover modal snippets
When a snippet contains a modal, the editor overlay should not cover the
0-height wrapping div but the modal element itself.

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

X-original-commit: bc055e7822b9b2e7f8f9608e335456a71d7896a1
2020-06-09 10:52:26 +00:00
Christophe Simonis 4fda0f43b7 [FIX] l10n_it_edi: use algorithmically correct VAT numbers in demo data
Avoid warnings at module install.

closes odoo/odoo#52683

X-original-commit: 5299dd45f07894d46b68feabe581fe5fbee03981
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-06-09 10:44:18 +00:00
Xavier Dubuc c50cc1ddac [FIX] web: QUnit.only detection is now back in business
Assets bundle names have been changed in #48676 but QUnit.only uses check was
still using old names. This commit makes that check use the new names.

task-2274185

closes odoo/odoo#52687

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-06-09 11:10:40 +00:00
Yannick Tivisse 893ec20236 [IMP] various: Add date filters on search views
PURPOSE
=======

The task aims at adding date filters across various modules in preparation
for the 'time range' feature rework on task 2245719

https://www.odoo.com/web#id=2245719&action=327&model=project.task&view_type=form&cids=1&menu_id=4720

SPECIFICATION
=============

New date filters to compensate the deprecated time ranges feature:

See task's pad for the complete details

closes odoo/odoo#52398

Taskid: 2263661
Related: odoo/enterprise#10938
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-09 10:50:17 +00:00
Julien Mougenot a3e5ac19b2 [REF] web: update control panel doc
Class documentation for the control panel component has been updated
to reflect the changes on the comparison menu and the advanced search.

closes odoo/odoo#52662

Related: odoo/enterprise#11022
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-06-09 09:24:21 +00:00
qsm-odoo b61a3c9744 [FIX] web_editor: restore invisible snippet activation
The loading effect of the left panel was conflicting with the invisible
snippet activation. This is to be reviewed with the new UI anyway, so
the loading effect is just removed in that case for now.

closes odoo/odoo#52676

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-09 09:36:05 +00:00
Nicolas Martinelli 7087116ad3 [FIX] sale_stock: find stock moves linked to invoices
In order to find the stock moves linekd to SO line, there is no need to
go through the order and the pickings. Indeed, the SO lines have a
direct link to the stock move lines.

On ~14500 invoices, the duration of the process goes from 90 to 30
seconds.

opw-2266052

closes odoo/odoo#52666

X-original-commit: 155e456a64c54d2c5fdd4078381ed8c1fad28334
Related: odoo/enterprise#11023
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-09 09:08:08 +00:00
Martin Trigaux 8458c58436 [IMP] website_form: avoid string concatanation
This is a slow operation and string join is significantly faster
https://stackoverflow.com/a/3055541/1398110

This can make a noticable difference when processing a long form

Courtesy of Nils Hamerlinck

closes odoo/odoo#52664

X-original-commit: 87a2702fdabdcfeb774ddfb9db2e28bdd5595f9a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-09 08:47:07 +00:00
Katherine Zaoral fc83be07b9 [FIX] l10n_ar: fix the purchase vat taxes accounts
The accounts of these taxes were inverted for the invoices and refunds.
now are properly configured.

closes odoo/odoo#52121

X-original-commit: 0a8303b8cfbaa087ab89dcb56afbfe15d50bd1a2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-28 15:25:03 +00:00
Michael Mattiello (mcm) 1019e1529c [FIX] web: update owl to last version
This commit updates owl from v1.0.8 to v1.0.9.

closes odoo/odoo#52657

X-original-commit: 584b1f428ace121b125699ee93ee500fe069a5bd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-09 08:04:03 +00:00
Andrea Grazioso (agr-odoo) 95324638c7 [FIX] product: on CoA choose do not create pricelist if already present
Create a new company with it's currency
A default price list has been created for this company in this currency
Install the "customizable Chart of Account" under the settings tab, Accounting
By installing this CoA, Odoo creates a new pricelist, in Dollars,
that overwrites the one in the currency of the country.

Avoid creating the new pricelist if there is already a
pricelist for the current company in the company currency

opw-2221854

closes odoo/odoo#52429

X-original-commit: dc0d6af54f56bf6e576013d67cf44b5cd3608351
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-08 08:15:06 +00:00
1c522ee778 [ADD] odoo-bin cloc cli subcommand.
Odoo cloc is a tool to count the number of relevant lines written in Python,
Javascript or XML. This can be used as rough metric for pricing maintenance of
customizations.

It has two modes of operation, either by providing a path:

    odoo-bin cloc -p module_path

Or by providing the name of a database:

    odoo-bin cloc --addons-path=dirs -d database

In the latter mode, only the custom code is accounted for.
Both modes can be used simultaneously.

Files that cannot be parsed are shown at the end of the report.
Parsing can fail due to syntax errors or excessive file size.

closes odoo/odoo#52635

X-original-commit: ae858c3ac66267b4726db459032b91a6be1cc1d6
Related: odoo/enterprise#11018
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Co-authored-by: Thibault Francois <tfr@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2020-06-09 00:30:55 +00:00
fja-odoo 061ff011df [IMP] base, website: fix prewebsite specific views
Things to know about specific views:

Since the introduction of website specific views, we can have multiple
views that are related to a website (specific views). These views have
no xml_id as it is only set on the original view (generic view).
We rely on the view's key to identify related views as it is the same
for all specific views of a generic view. Also the key is equals to the
xml_id.

When a generic view is updated, we will check if the specific views have
the same values as the generic view. If it is the case, the value that
are the same are considered updatable and are updated on both the
generic and specific view. Else these are considered as noupdate.

When a generic view is created we will check if the potential parent
generic view has specific views. If it is the case we will create a copy
of the created view for each specific view.

The issue:

The method that checks if a created/updated view has specific views is
located in website. When we update a module, each modules are
initialized and updated in a specific order. If a generic view that has
specific views located in a module loaded before website this view's
specific views will not be updated/created as the method does not exist.
This issue is mainly affecting portal views at the moment.

The solution:

For write:
We now COW(copy on write) the views in base module, meaning this will
apply to all qweb views that are duplicated and not only the website
specific ones.

For create:
We  will create the generic view as before but wait until we have
updated all the modules to gather all generic views that are supposed
to have a specific view but don't and create the specific views.
This will result in a change of behavior being that if a specific view
that have a parent is deleted it will be recreated on update
(same behavior as a generic view).

closes odoo/odoo#52629

X-original-commit: b1a90ee2bb441aa52e3cf4607c43fb464b55b1d7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: fja-odoo <fja-odoo@users.noreply.github.com>
2020-06-08 17:23:59 +00:00
Goffin Simon 54c828bcba [FIX] sale: Duplicated Sale Order Sequences through Imports
Steps to reproduce the bug:

- Let's consider a company C in the Arab Emirates(AE) with l10n_ae
- Let's consider a customer C1 from AE (as country) and Abu Dhabi (as state)
- Let's consider a customer C2 from AE (as country) and Dubai (as state)
- Let's consider that the current user has no right in accounting
- Let's consider the SO sequence with no_gap and with next_number=1
- Create a product P with 5% dubai tax
- Create SO1 for C1 with P (next_number=2)
- Create SO2 for C2 with P (next_number=3)
- Export SO1 and SO2 xlsx file F
- Import F

Bug:

An error message appeared in the logs:
odoo.addons.base.models.ir_model: Access Denied by ACLs for operation: write, uid: 6, model: account.tax

because odoo tried to write on the field invoice_repartition_line_ids computed from function compute_all on model account.tax

The next_number was 4 instead of 5 because the update made in function _update_nogap was rollbacked
due the Access Denied

opw:2266048

closes odoo/odoo#52588

X-original-commit: e009c3a0df12801e06a4e2301f888ca77bb24946
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-08 11:21:24 +00:00
jvm-odoo 6ac5b14d52 [FIX] mail: fix mark several messages as read
Issue

	- Install Discuss & any app with a chatter
	- Have 2 session, admin & demo
	- Clear admin systray messages

	As demo:
		- Discuss > #general
		- Ping (@...) admin 2 times

	As admin:
		- Go in the app you installed
		- Open systray messages
		- Mark messages as read

	It doesn't work

Cause

	When marking as read we get the message-ids as a string
	and if you have several ids it will be ["1,2"] which is
	not supported by the back-end

Solution

	The back-end should receive an array like [1, 2]

OPW-2234671

closes odoo/odoo#52608

X-original-commit: fbe91697fb1bc2ade5eba034b97bd671eeaf200b
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-08 13:44:26 +00:00
Elmeri Niemelä 4c5a219f02 [FIX] l10n_fi: Add missing account.account.tags on chart of accounts
closes odoo/odoo#52625

X-original-commit: b10561cb448e45c7037b3b82920c7d4791f3ca82
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-08 16:09:13 +00:00
qsm-odoo a33e23da74 [FIX] web_editor: restore crop widget backdrop color
Revert https://github.com/odoo/odoo/commit/14c8b285ef3e11cf8a8387bb211272e6456e4d42
which fixed a scss compilation error but changed the design by mistake.
The 4 digits hexa was not supported in old sass compiler so we use a
rgba() value instead.

closes odoo/odoo#52622

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-08 15:11:19 +00:00
Nasreddin (bon) c503faab53 [FIX] base: User loses company access when merging the related contact
Issue

	- Create a second company
	- Create user with access to main and second company
	- Go to "Contacts" app
	- Edit contact of the new user, and under the "Sales & Purchases" tab,
	  ensure that the company field is set
	- Create a new contact with same email of the new user
	- In list view, select both contact related to new user
	- Click on Action->Merge Selected Contacts, then merge contacts

	User has no more access to both companies, only company related to
	merged destination Contact/Partner.

Cause

	All related companies are unliked from user, and instead overwrited
	with one company related of the merged destination Contact/Partner.

Solution

	Instead of unlink all companies, we will only add the contact company
	to the allowed companies of the user.

opw-2269397

closes odoo/odoo#52620

X-original-commit: e00b23b73f00fb24b2771ea8894031b35204e65e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-08 15:04:06 +00:00
fja-odoo 315346ad28 [IMP] website_form, *: add field type to form
*= website_hr_recruitment, website_sale, website_crm

Adding 2 new types of fields: tel, url
email, url and tel type can now be applied on existing char fields.

task-2213083

closes odoo/odoo#50891

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-08 14:47:58 +00:00
Siddarth Gajjar 27b3326b58 [IMP] utm: remove 'New' stage from templates
- This commit removes the "New" stage from UTM Campaign Templates
  since it's already included by default and is not mandatory.

TaskID: 2252069
Closes https://github.com/odoo/odoo/pull/51439

closes odoo/odoo#51439

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-21 11:10:27 +00:00
qsm-odoo 7813f7b555 [FIX] web_editor: fix color classes for non-background properties
The computed preview for non-background properties (e.g. borders) was
wrong in the left panel since the color presets classes were considered
by mistake.

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

closes odoo/odoo#52605

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-08 13:19:21 +00:00
qsm-odoo a3362275c5 [FIX] website: add missing 'o_cc' class on some elements
Part of https://github.com/odoo/odoo/pull/52605
2020-06-08 13:19:07 +00:00
Jeremy Kersten 14c8b285ef [FIX] web_editor: fix typo in color code
closes odoo/odoo#52601

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-08 12:39:46 +00:00
Elmeri Niemelä 58c80ae0ec [FIX] l10n_fi: Legal VAT requirements for invoice PDF
Add tax goups.

Closes #51568
opw-2269294

closes odoo/odoo#52598

X-original-commit: 9b08ee1da02022b2c41c12e39b8dc92148ffda69
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-08 12:23:04 +00:00
Martin Trigaux eaaa251ce1 [FIX] website_mail_channel: filter on found channel
Before this commit, controller did
1. search all channels with an alias
2. search on the messages on mail.channel
3. map the number of messages with the channels

The issue was that the list of messages in step 2 includes more
channels than the ones found in step 1.
The list of messages may be very big and some groups may be retrieved
while not used in the small list of channels with an alias.

This commit should improve performances while accessing the /groups
page.

closes odoo/odoo#52593

X-original-commit: 60e806f4ea8ce75390eb59620ec61a39b4d3ccd2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-08 11:53:07 +00:00
Odoo's Mergebot c4be0a8e57 [IMP] website_forum: optimize query
Optimize queries
Fix multi-forum / mutliwebsite in child count
Use stored field when possible
Avoid forum count on each request (rarely updated)

closes odoo/odoo#52539

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-08 14:53:07 +02:00
Mohammed Shekha 030d8ec6f0 [FIX] web: hide list selection box after multi record save
Before this commit, list selection box was not hidden after multi
record edition.

task-2266999

closes odoo/odoo#52590

X-original-commit: ac46e9f82b7cbfc55f395b66b2011399b9f972f1
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-08 11:29:59 +00:00
fja-odoo 9ffd3cda87 [FIX] base: fix the burmese translation iso
The burmese ISO 639-1 code is "my" which conflicts with the page /my
We will now use the ISO 639-3 code "mya" for the url_code.
https://iso639-3.sil.org/code/mya

closes odoo/odoo#52571

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-08 10:15:24 +00:00
Odoo's Mergebot 12a860b61c [MERGE] website_slides: allow to contact responsible and request access to course
PURPOSE

Before this merge, a user could not contact a course responsible to ask him
to join. With this merge he is be able to do it.

SPECIFICATIONS: ACTIVITY

Add activity_search method in mail.activity.mixin to ease searching on
automated activities (code refactoring mainly).

Add possibility to choose a source / request partner on an activity. It allows
to know if an activity is linked to a customer or a requesting partner.
Com
SPECIFICATIONS: SLIDES

Change the message 'Contact website administrator' to 'Contact Responsible'.

Add the name of the course responsible in the course description panel. When
clicking on its name it opens a modal to request access to the course. It
creates an activity linked to the customer and assigned to the responsible.

When hovering the 'You're enrolled' button the fa-check icon changes to a
fa-times icon to show that you can unsubscribe when clicking.

LINKS

Task ID : 2127364
Community PR odoo/odoo#40708
Upgrade PR odoo/upgrade#1101

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-08 13:32:15 +02:00
Patrick Hoste 786374399e [IMP] website_slides: add possibility to request access to private course
PURPOSE

Before this commit, a user could not contact a course responsible to ask him
to join. With this commit he is be able to do it.

SPECIFICATIONS

Change the message 'Contact website administrator' to 'Contact Responsible'.

Add the name of the course responsible in the course description panel. When
clicking on its name it opens a modal to request access to the course. It
creates an activity linked to the customer and assigned to the responsible.

When hovering the 'You're enrolled' button the fa-check icon changes to a
fa-times icon to show that you can unsubscribe when clicking.

LINKS

Task ID : 2127364
PR : #40708
2020-06-08 10:43:53 +00:00
Jeremy Kersten 2c85c1cb6e [FIX] website: create page link on 404 in post
closes odoo/odoo#52576

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-08 10:16:51 +00:00
Andrea Grazioso (agr-odoo) 4e8501c4c9 [FIX] account: avoid hiding 'Amount Matching'
Go to Reconciliation Models > Invoices Matching Rule
Set the parameter 'Amount Matching'
Set 'Partner Is Set & Matches'
Save
Edit
Unset 'Partner Is Set & Matches'

'Amount Matching' will switch to invisible but is not disabled.
Removing the invisibility check so that the field is always
editable

This also reverts commit 61f1ca63e5dc27e06c855bb09b18bf4897e8ab1f.
Due to a misunderstanding this solution was chosen while the real
intention was to always show the field

opw-2261134

closes odoo/odoo#52264

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-08 08:02:46 +00:00
Nidhi Patel 91029b2b32 [FIX] mail: channel #general with default messages
Before this commit, when starting a new database with demo data,
the default channel `#general` had no messages initially.

The demo data defines default messages in this channel, but were
incorrectly linked to this channel, resulting in this channel
containing no messages initially.

The messages did not define `channel_ids`, so it was considered
empty. This field is essential for displaying the message in
channel, so by being omitted these messages are not properly linked
to channels.

This commit fixes the issue by correctly linked this demo messages
to this demo channel, so that `#general` now contains some messages
initially. This commit also removes unused context
`mail_notify_noemail`.

Task-Id 2186300

closes odoo/odoo#49539

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-08 09:36:25 +00:00
Martin Trigaux c9f93eb639 [FIX] tools: remove max language length constraint
There is no reason for this constraint to be. Languages with a code
longer than 5 do exists in standard, (e.g. ar_001, sr@latin)

Introduced at 004a0b996f

Fixes odoo/odoo#52558

closes odoo/odoo#52569

X-original-commit: 54340487adaed962750c9719fb50fc7e000da476
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-08 09:00:02 +00:00
Katherine Zaoral 308b1d9b09 [FIX] l10n_ar: fix misspelling error in translations
closes odoo/odoo#52346

X-original-commit: fe6330ade22efec61b18792b3a930afd7c473328
Related: odoo/enterprise#10911
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-08 08:48:49 +00:00
Jeremy Kersten 0d25f4f801 [IMP] website_forum: store the forum_count
Cannot be a one2many, since website_id=False means that it is for all websites
2020-06-08 07:43:07 +00:00
Jeremy Kersten f553d871fa [FIX] website_forum: child_ids from current forum only
Before this commit, we got all post where parent_id = self.id, whatever the forum_id from the post
2020-06-08 07:43:07 +00:00
Jeremy Kersten 1b7f55a15e [IMP] website_forum: perf - replace any by in
Usinf of any seems not efficient in this case

> timeit.timeit('any(7 == o for o in [1,3,5,7,9,12])', number=10000000)
6.556934245978482

> timeit.timeit('7 in set([1,3,5,7,9,12])', number=10000000)
2.78867393406108

> timeit.timeit('7 in [1,3,5,7,9,12]', number=10000000)
0.534781630965881
2020-06-08 07:43:06 +00:00
Jeremy Kersten 52a0406a2c [IMP] website_forum: delay the set_viewed
Try to make the update the latest possible, to minimize risk of concurrent
update.

Since it is not critical to loose a view, add the old value in where clause, to
try to decrease the risk to alter at the same time a same row.
2020-06-08 07:43:06 +00:00
Jeremy Kersten 84ff744eb0 [IMP] website_forum: perf - use the stored field instead to recompute it 2020-06-08 07:43:06 +00:00
Jeremy Kersten d8e2cd2082 [IMP] website: perf - is_public_user use cached user_id on website 2020-06-08 07:43:06 +00:00
Patrick Hoste ad8c53ac2c [FIX] website_slides: changes enroll_msg default value
SPECIFICATION

Changes enroll_msg default value to 'Contact Responsible' instead
of testing if it was empty or not. Since the FieldHtml widget sets
the default value to '<p><br></p>' it was never empty.

LINKS

Task ID : 2127364
PR : #40708
2020-06-08 07:14:14 +00:00
Patrick Hoste 2aa150e195 [IMP] mail: add possibility to choose a source / request partner on activity
PURPOSE

Allow to know if an activity is linked to a customer or a requesting partner.

SPECIFCIATIONS

Add a partner_id field on mail.activity model. It will be used notably in
website slides to know who triggered an "request access" activity. It
can also be used in various business flows when assigned user is different
from the "source" or "requesting" partner.

LINKS

Task ID : 2127364
Community PR odoo/odoo#40708
Upgrade PR odoo/upgrade#1101
2020-06-08 07:14:06 +00:00
Patrick Hoste 7e61793ad7 [IMP] mail: add activity_search method in mail.activity.mixin
PURPOSE

After this commit it will be easier to find all the corresponding automated
activities in a model.

SPECIFICATIONS

Add an activity_search method in the mail.activity.mixin model to ease
the searching on mail.activity corresponding to the model. It is already
inlined in activity_reschedule and activity_feedback.

LINKS

Task ID : 2127364
PR : #40708
2020-06-08 07:09:30 +00:00
jvm-odoo 17e409181e [FIX] web_editor: fix duplicated pasted image summernote
Issue

        - Windows > Chrome or Firefox
        - Any chatter > Open full screen
        - Paste any image

        The image is pasted twice

Cause

        Summernote adds the image but
        the browser event adds it too

Solution

	I applied the fix that summernote did
	summernote/summernote/commit/6e432941af17c5fee0877d9ff54b6ace65fbdb4b

OPW-2267712

closes odoo/odoo#52532

X-original-commit: 2b4b2ce8660326b1cb53b5624690718b89aaceda
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-05 15:24:05 +00:00
Samuel Degueldre aa8d2a8be2 [IMP] web_editor, *: move image optimization feature to left-panel
*: website, mass_mailing

In continuity with the nline crop, in an effort to make the image
workflow as seamless as possible in the website editor, the image
optimization feature has been moved out of the modal which could be
opened through the media-dialog and into the left panel.

This commit adds a quality slider and a width selector, as well as a
preview of the image's weight to the left panel, and removes the
image_optimize dialog.

This commit also introduces the possibility to add a color filter on
images.

Part of https://github.com/odoo/odoo/pull/51517
task-2192755

closes odoo/odoo#51517

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 18:11:53 +00:00
Samuel Degueldre c2de755bc6 [IMP] web_editor, *: change image cropping from modal to inline widget
*: base

Previously, cropping an image was done inside of a modal window, turning
it into an inline widget makes the editor feel more integrated and
allows you to better see the result of cropping directly in the page,
it's also less intrusive to the user's edition workflow.

At the same time, the way cropped images are saved was refactored to use
the new original_id field on ir_attachment, as the old system was
creating problems.

Part of https://github.com/odoo/odoo/pull/51517
task-2192755
2020-06-05 18:11:42 +00:00
Samuel Degueldre 59cd23a4df [MOV] web_editor: rename crop_dialog.js in preparation for inlining
In the next commit the crop functionality will be made into an inline
widget instead of a modal dialog, as such, the name no longer makes
sense.

Part of https://github.com/odoo/odoo/pull/51517
task-2192755
2020-06-05 18:11:34 +00:00
Samuel Degueldre 629a93274e [REF] web_editor: remove relics of filter feature
Previously, the media-dialog had a "filter" feature, where when changing
a background image for example, all backgrounds would show first in the
media-dialog. However, because this required to load all public
attachments in the database it was causing issues and was removed. The
backend code for this feature however was unfortunately forgotten, this
commit removes that code.

Part of https://github.com/odoo/odoo/pull/51517
2020-06-05 18:11:25 +00:00
Samuel Degueldre a904a63833 [FIX] web_editor: fix layoutInfo is null traceback
When attempting to update its UI in reaction to events, summernote tries
to make layout info for the event target, this relies on finding this
information on one of the target's ancestors. In some cases, elements
can be removed from the DOM between the moment the event was triggered,
and the moment summernote attempts to create the layoutInfo, resulting
in layoutInfo being null.

This commit prevents tracebacks from happening in such cases by checking
that a layoutInfo was actually returned, and if not, aborting the UI
update that relies on it.

closes odoo/odoo#52541

X-original-commit: 3e999db0c114d51102ae51f870f98a4cc276c4b4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 16:33:21 +00:00