Commit Graph
143109 Commits
Author SHA1 Message Date
Aaron Bohy 2e30e4237a [REF] web: manifest: simplify assets_backend 2021-06-18 21:31:26 +02:00
Anh Thao Pham (pta) c047c85208 [FIX] base,web: fix display of images of contact's children upon change
Scenario:
- Go to Contacts
- Open a contact
- In "Contacts & Addresses" tab, add a child and configure its image
- Once child form is saved, image of the child is not displayed in the
kanban view used for children
It will only appear once the main contact form is saved.
The same issue occurs when editing a child image.
The new image will only be shown once the main contact form is saved.

The issue at the creation is due to the fact the function retrieving
the URL of the image tries to generate the URL from record id, which
is not set.  It should use raw data of image in this case.

For the edition, it is due to the fact that the child form is changing
image_1920 field while the kanban view used for children is displaying
image_128 field.  image_128 is a related field to image_1920, but it
does not appear in the child form.  It is therefore not recomputed (by
onchange) when image_1920 is modified.  Adding it in the child form view
solves the issue.

opw-2516188

closes odoo/odoo#72375

X-original-commit: 7eac23573c77415c84cb9c234c8063d4c68be425
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-06-18 16:38:08 +00:00
Nicolas Lempereur 4aa89f146e [FIX] website_slides: can edit frontend enroll message
The frontend enroll message was display as a `<small/>` tag, but it
seems that lxml HTMLParser parse it wrongly, for example:

  html.tostring(html.fromstring('<small data-oe-model="test"><p></p></small>'))

returns:

  '<div><small data-oe-model="test"></small><p></p></div>'

So branding attributes like data-oe-model that are on small tag are not
found on root node that has become a `div` tag after parsing => this causes
a traceback error when saving a change in this part.

Fix: use small as wrapper for `<div/>` tag that is treated correctly by
HTMLParser (span is also treated correctly but div makes more sense
here).

opw-2573955

closes odoo/odoo#72315

X-original-commit: 6334c7282c19362ca8bc79dbaefe3d38c055e746
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-06-17 18:37:44 +00:00
Arthur Detroux (ard) f3d840d1a6 [FIX] mass_mailing: make editor perform cleanForSave on save
Before this commit, when editing a mass_mailing template, on save,
the editor would not tell the snippet menu to perform a cleanForSave
which it should normally do for the option to properly prepare to save.

Bug discovered while working on task-2327045
Ideally, would need to be backported but requires a different fix in the
old editor.

closes odoo/odoo#72346

X-original-commit: 639b6a55586107bd3d855d322c1102df101eb079
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-18 12:08:45 +00:00
Aurélien (avd) 54e06aa28d [FIX] account: Fix reconciliation with multi-currencies but balance = 0
This commit fixes the case when the reconciliation never ends due to an infinite loop.
This happens when we attempt to reconcile two journal items having differents foreign currencies but an amount_residual = 0.0.
In that case, partials are created everytime with zero amount, zero debit_amount_currency and zero credit_amount_currency.
We don't need to handle such reconciliation because exchange difference journal items are always created using the same foreign currency as the originator line.

The way the reconciliation is made for reversal moves is also edited by this commit to avoid reconciling lines on the same moves but with different currencies.

closes odoo/odoo#72266

X-original-commit: 1231d54b8c2084db6ffb9551af7ed4ee9e31a95a
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-06-18 12:22:05 +00:00
Anh Thao Pham (pta) 9ea04fa4b2 [FIX] account: fix taxes set on invoice sections & notes at creation
When adding a section or a note on an invoice, default taxes are set on
the account move line, making the corresponding Tax Group to appear on
the invoice.

opw-2541722

closes odoo/odoo#72337

X-original-commit: a8d3f466dfffca08214acecf08ec298e3ace6272
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-06-18 10:40:07 +00:00
xO-Tx 79685b5bdf [FIX] tools: keep image option related attributes
- Change an image option in mass mailing editor (e.g. Quality)
- save
- edit -> The option can't get the new applied value.

The body_arch's field used in mass mailing editor is
sanitizing attributes and as a consequence, option related data
attrs are removed on save.

task-2327045

closes odoo/odoo#72311

X-original-commit: 7c5666611363a73bc6fef070565039cf065a0176
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-17 16:26:16 +00:00
Oussama MESSAOUDI 0f7fda60d0 [IMP] website: improve items snippet
- New and multiples pictures
- Empty URL instead of odoo.com by default

task-2471323

closes odoo/odoo#70528

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-17 14:39:43 +00:00
Antoine Vandevenne (anv) 1f0a6167d6 [FIX] payment_{ogone,payulatam}: use the document name in the reference
Before this commit, the implementation of Ogone and PayU Latam's
requirements regarding the transaction reference was preventing the
computation of the reference prefix from being based on the related
document (invoice, SO).

This commit attempts to compute the reference based on the document if
no reference prefix is provided, before applying the said requirements.

task-2494916

closes odoo/odoo#72291

X-original-commit: f18a1d67b769ea69a07fb3c0343e092038df5c93
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-06-17 13:32:07 +00:00
Stéphane Debauche 5813242fe0 [FW][FIX] crm: dot not sync the phone / email from False to an empty string
Bug
===

1. Create a new database from the database selector
2. Do not select a country for your company
3. Install CRM
4. Create a new opportunity and select your company
5. The sync "warning" will be displayed, and it should not

The reason for that is the phone of the company is an empty string and the
phone of the lead is False. So we try to sync them and we show the warning
message even if for the user, nothing will happen.

This commit fixes that behavior by correctly checking that False / empty
strings are considered as equal.

UPDATE

In this commit we also display warnings about update only in edit mode to
avoid displaying irrelevant information to the user. Indeed email and phone
will be propagated at save, aka in edit mode.

TaskID-2499659

closes odoo/odoo#72286

X-original-commit: efea8fce6c7cb6e40b590cd827fe22e134cc3d13
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-17 12:38:34 +00:00
Victor Feyens 2e3dac8da0 [IMP] *: do not filter the taxes twice for nothing
Since _filter_included_tax_company filters the taxes of other companies,
there is no need to give taxes from other companies if the filtering was
already done.

closes odoo/odoo#71591

Related: odoo/enterprise#18670
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-06-17 12:14:36 +00:00
Victor Feyens 7ab7bd92ea [FIX] point_of_sale: onchange call order
_onchange_qty should be called after the price_unit change to compute 
the amounts correctly.
2021-06-17 12:14:36 +00:00
Victor Feyens 9df95cb554 [FIX] pos,repair,sale(_*): multi-company taxes management
Since product can be shared between multiple companies, their taxes m2m
fields may hold taxes from multiple companies.  When working in sudoed
or multi-company environments, those taxes were incorrectly filtered and
taxes from other companies may erroneously impact records from other
companies.

This commit ensures that the product taxes are properly filtered to only
consider the ones from the current/record company.
2021-06-17 12:14:36 +00:00
Victor Feyens 2d43dc2afd [IMP] account,*: clean map_tax definition
product and partner parameters are leftovers of an older definition of
map_tax, and can now be safely removed.
2021-06-17 12:14:36 +00:00
Romain Derie 4a1c516b01 [FIX] *: search_view_id expects an id/name pair
Passing an id directly to `search_view_id` is not working. It is silently
ignored.
The framework js code expects an id/name pair, as described in the ORM doc.

Most of the time, this will be unoticed as the specified search view being
ignored, the default one will be used instead, which is often the same one as
there is only one search view.

Only 3 occurences are real misbehavior.

Note that the `name` of the pair is useless, you can just pass the ID in an
array.

Working:
'search_view_id': [123, 'search'],
'search_view_id': [123],

Not working:
'search_view_id': 123,

closes odoo/odoo#72247

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-17 10:38:18 +00:00
Jeremy Kersten 1dccc0bc81 [FIX] base: avoid crash due to generation of key with model
Until now, when you create a view of type qweb with a model, we use the model
as first part to generate the key. Since this model can contains dot, it is
wrong and we got some key like ir.ui.view.gen_key_xyz

This bug has been seen with commit ee8756b311
which make the installation of website & sale_timesheet impossible in dev mode.

  File /home/odoo/addons/base/models/ir_ui_view.py, line 294, in _compute_arch
    arch_fs = get_view_arch_from_file(fullpath, xml_id)
  File /home/odoo/addons/base/models/ir_ui_view.py, line 166, in get_view_arch_from_file
    module, view_id = xmlid.split('.')

  Too many values to unpack

Now we never try to make key beautiful. At first view it doesn't bring any
advantage, but only bug.

closes odoo/odoo#72238

Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-06-16 14:08:08 +00:00
Goffin Simon c31b688f66 [FIX] mrp: Unbuild serial number
When a serial number SN is trying to be consumed and has been unbuilt in the past,
an evaluation is used to check that the # of times SN was unbuilt is equal to
the # of times SN was consumed. However, when counting the unbuild SN it did not take into account if
it was from an unbuild order.

opw:2510294

closes odoo/odoo#72272

X-original-commit: 47d6ff49b19e68d84a68d8c4b999cb6115398805
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-06-17 10:36:18 +00:00
Patrick Hoste afd250d825 [IMP] website_event_exhibitor: display only published sponsors in sponsor footer
Purpose is to have sponsors always behaving like other website records, aka
not published are not displayed. It allows manager to create sponsors without
having them displayed on frontend while not completely ready to do so.

Add field in search as well as in form view, allowing to better distinguish
sponsors ("display in footer") from exhibitors (classic website published
button with redirection to frontend page).

Task ID-2558875
PR odoo/odoo#71787

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-17 11:06:49 +00:00
Thibault Delavallée 9a479f5ef6 [IMP] website_event_exhibitor: improve sponsor type management
Choose lowest sponsor type as default when creating a new sponsor. Purpose
is to avoid being blocked by required fields. Choosing the lowest available
sponsor type allows to ease discovering the feature without breaking any
feature.

Also set a default sequence when creating a sponsor type to avoid jump
effect on list view: always send new sponsor types at the end.

Also set default ribbon as no ribbon to avoid a "void" entry in ribbon style
when creating new sponsor types.

Task ID-2558875
PR odoo/odoo#71787
2021-06-17 11:07:09 +00:00
Patrick Hoste 54e8a81809 [FIX] event_sale: correctly use event_ok instead of event_id for event-based SO lines
When confirming a sale.order that includes a product that is either an
event registration or an event stand it shows the event edit registration
wizard which has no sense for the event stand part.
Fix the event_configurator_tour since the autocomplete showed the wrong
product at the first place.

The test was based on the event_id field of the sale.order.line but should
be based on the event_ok field instead.

Also add more text to the tour so the autocomplete shows the right product
at first place.

LINKS

Task ID-2318655
Task ID-2558875
PR odoo/odoo#71787
2021-06-17 11:06:49 +00:00
Romain Derie 819725c725 [FIX] sale_coupon: align stat button with act_window results
Before this commit, the number you saw on the stat button was not always
the same as the number of sale order you would see when you clicked on it.
Indeed, there was a domain force on the action to only show confirmed orders,
while the stat button was counting quotations too.

Fixed #70911

closes odoo/odoo#72249

X-original-commit: 79afc80e5b4f45c6bc716f55a21f8a2b478e49f6
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-06-16 18:13:04 +00:00
Djamel (otd) ff29ec7064 [FIX] website_slides: hide the "Go to website" button if the slide is not saved
Steps to reproduce the bug:
- Go to Elearning > choose any course or create a new one
- Click on “add content” :
    - Add a title to slide
    - Click on "Go to Website"

Problem:
An error is triggered because we call the "create" method to save the slide, which tries to access the “channel_id”, the course ID in which the slide will be added. However, the field is not set in values.
The "create" or "write" function in "slide_channel" must first be called to save the course, which will then call the create function in "slide_slide"

Solution :
Hide the "Go to website" button as long as the course is not created and therefore has no id

opw-2526541

closes odoo/odoo#72199

X-original-commit: e412ba4898e35c8519adafb05407bdb78f311c09
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-06-15 18:31:14 +00:00
Romain Derie 3a05934cb9 [IMP] website: hide link preview when typing on mega menu
The link preview is a bit messy inside a mega menu.
Hiding it during typing clears the UI.

task-2566651

closes odoo/odoo#72009

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-16 13:46:47 +00:00
Denis Ledoux b06e4454d5 [FIX] registry: check_foreign_keys, constraint names are limited to 63 chars
When computing the foreign key name,
`check_foreign_keys` didn't take into account the limit of 63 characters
for constraint names.

Because of this, some constraints were dropped and recreated
over and over while they were correct, during install and upgrades.

For instance, when installing `base`
when adding the foreign key for which the name was computed
`base_partner_merge_automatic_wizard_res_partner_rel_base_partner_merge_automatic_wizard_id_fkey`
Postgresql created the constraint under the name
`base_partner_merge_automatic__base_partner_merge_automatic_fkey`
and therefore, as the name did not match,
the constraint was dropped and re-created.

closes odoo/odoo#72234

X-original-commit: 43a4738ebf8a74a389b99f8f58330b3044beaa0c
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2021-06-16 13:15:26 +00:00
Robin Heinz 4cd9bb5552 [FIX] point_of_sale: reprint in manage order
The printer dialog was not shown when going through the manage order if there
was no printer connected.

In order to fix this issue, the tryReprint doesn't check anymore if a printer is
connected or not. It'll print via printer if connected or show the the printer dialog.

closes odoo/odoo#72230

X-original-commit: 7a7aacedde81998ec0f1a7f3283337236e56de42
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2021-06-16 12:18:46 +00:00
Raphael Collet b840d33946 [FIX] base: translations of field labels in views
The commit e123aa2f30 optimizes the call
to fields_get() made in the NameManager to post-process the combined
arch of a view.  The optimization consists in avoiding translations,
with the assumption that the result is only used for validations.  It
turns out that the regular post-processing actually returns the field
descriptions as part of the result of fields_view_get().

We fix this mistake by keeping the optimization only when the flag
'validate' is true, so that the regular post-processing of a view
returns field descriptions with the expected translations.

closes odoo/odoo#72216

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-06-16 09:25:11 +00:00
Younn Olivier 3e82c26c06 [FIX] website: correctly destroy autohideMenu widget
When changing the color of the header with the custom colorpicker and
saving the changes, the autohideMenu widget was destroyed before
finishing the rendering.

The commit fixes the destroy method of this widget, testing if the
variables are defined before using them.

task-2519545

closes odoo/odoo#72193

X-original-commit: c003c8d0620c6eda8f8b482d7519ca00a3007d03
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-15 17:42:02 +00:00
Younn Olivier f9133d1300 [FIX] website_blog: fix covers background color
The background color displayed on the blog posts list page was static,
instead of being the background_color_class saved from the
CoverProperties. Also, on the blog post page itself, the two were
combined which made no sense.

Part of https://github.com/odoo/odoo/pull/71593
task-2497846

closes odoo/odoo#72186

X-original-commit: b3ebc427fd519c29788eadedfca2f956e3695a3e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-15 16:36:31 +00:00
Younn Olivier a18b14d72f [FIX] website_blog: fix cover display on posts list page
This commit fixes a bug happening when changing the background with the
CoverProperties SnippetOption from the blog posts list page.
As it selects the default sizing class and applies it, the min-height
css property was applied and breaking the layout.

The covers min-height is now set as !important to not be overriden in
that context.

Part of https://github.com/odoo/odoo/pull/71593
task-2497846

X-original-commit: aa9591bf546729162f44d1f34cbee094131aba73
2021-06-15 16:36:30 +00:00
Younn Olivier e13924253e [FIX] website_blog: fix blog cover height on post page
As [1] added `!important` flag on .o_full_screen_height and
.o_half_screen_height global classes, the current override in
website_blog was not effective anymore.

Also, the value of the height override is also changed to offer more
differences. Also, simply restoring the old rule would "restore" 13.0
databases but "break" 14.0 databases which relied on it. So a compromise
between both was chosen.

[1]: https://github.com/odoo/odoo/commit/7cc6fdf36569be85e995c962321f2926822ac604

Part of https://github.com/odoo/odoo/pull/71593
task-2497846

X-original-commit: 3929eece7face5f6ed497a119787cd841b917c08
2021-06-15 16:36:30 +00:00
Robin Heinz 003b7fb8b6 [FIX] point_of_sale: Add missing t-key in templates
closes odoo/odoo#72212

X-original-commit: f1c3c531c2fdfcfff3bacf2dda8609a7d1bb0cb4
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-06-16 07:43:04 +00:00
Adrien Widart 13266efa6b [FIX] resource: allow a working time of 24 hours
It is not possible to define a working time that lasts a whole day. This
can lead to calculation errors.

To reproduce the error:
(Need mrp,hr_payroll)
1. In Settings, enable:
    - Work Orders
2. Create a Work Center WC
    - Working Hours: <Create and Edit>
        - 2 shifts:
            - Monday, From 0 To 24
            - Tuesday, From 0 To 24
3. Create a routing R:
    - Add an operation:
        - Work Center: WC
        - Default Duration: 1440 (i.e., 24h)
4. Create a Bills of Materials BM
    - Routing: R
5. Create a MO:
    - Bill of Material: BM
    - Plan From: Next Monday
6. Save, Mark as ToDo, Plan

Error: Since the operation should last 24 hours, the end time should be
the same. However, the Planned Date field is incorrect: the end time is
one minute too late. This error is even more noticeable when increasing
the quantity to be produced.

On step 2, when setting the 'Work to' field to 24, it automatically
becomes 23:59. The first consequence is directly observable on working
time form: we should have a total of 48 hours/week but the current total
is 47.98 hours/week. Another consequence is the end of the planned date
(as described above).

OPW-2462094

closes odoo/odoo#72210

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-16 07:09:22 +00:00
AaronHForgeFlow 3095789b72 [FIX] sale_mrp: stock_account_get_anglo_saxon_price_unit on multicompany environments
closes odoo/odoo#72192

X-original-commit: 76584fda6b33a951d04d501313d5e2a564a9f6c2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-15 17:24:36 +00:00
Yannick Tivisse 919b8ac501 [IMP] ir_qweb_fields: Don't return empty addresses
Purpose
=======

If the contact widget is used on a template, the 'fa-map-marker' icon
will be displayed, even if the address is empty.

This is most probably coming from this commmit: https://github.com/odoo/odoo/commit/62d73253f355fc857cfc6ca11bd5259957a94474#diff-c4cf79d0ff0cb8f7ca865fdfac774ce8fd95c800471a0932d126acb6fd8e7c27R613-R614

If the address is only composed of empty strings separated by \n, return an empty string.

closes odoo/odoo#72167

Taskid: 2572149
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-15 11:13:05 +00:00
Sébastien Mottet (oms) 4769c4623f [IMP] website: configurator move skip button in first screen
The skip button of the configurator's first screen has been moved beside
the 'let's do it' button for more visibility.

task-2518565

closes odoo/odoo#72191

X-original-commit: e6871f1991a951391fe1942f86ed208385d31b38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-06-15 17:08:58 +00:00
Cedric Prieels (cpr) e8c586b6d4 [FIX] portal: fix portal searchbar
Small fix which removes an error when the user tries to search for an element using the enter key.
task-2508883
Related PR: https://github.com/odoo/odoo/pull/70305

closes odoo/odoo#71753

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-15 09:03:57 +00:00
oco-odoo a6b4893c57 [FIX] account: taxes: ignore taxes configured as not to be affected by previous taxes when generating tax_ids on tax lines
Consider the following example:

1) Create tax ONE, 10%, include_base_amount=True
2) Create tax TWO, 20%, is_base_affected=False

Create an invoice with just one line of 100€, with taxes ONE and TWO (in this order).

The journal entry then contains:
- The payable/receivable line => 130
- The base line => 100
- The tax line for ONE => 10
- The tax line for TWO => 20

The bug this commit fixes concerns the tax_ids set on tax lines. In our example, none should be set, since tax TWO is not affected by ONE. But tax line for ONE actually had tax_ids=TWO, hence impacting TWO's base. This was wrong; the base for TWO is 100, not 110.

closes odoo/odoo#72063

X-original-commit: ff2d1728c835e7d43638502d69245291d0fa3c59
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-06-11 14:46:42 +00:00
Jairo Llopis e7f22391ef [FIX] sale: do not grant access to purchase invoices by default
Sales people should only access customer invoices by default.

Notice that [the equivalent rule in the `purchase` module][1] makes more sense.

[1] https://github.com/odoo/odoo/blob/e2247a860d3d4931d641928a6313bef4649e0edf/addons/purchase/security/purchase_security.xml#L62

@Tecnativa TT30228

closes odoo/odoo#72002

X-original-commit: dde96d6601d6b63762c6a57a8e0260eabad81289
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-06-10 16:08:07 +00:00
Nicolas Lempereur 435a9fd314 [FIX] website: timeline widget has vertical line
In fb556ed09c7e the middle vertical line is removed from the timeline
widget because the display was changed to table.

We need display:block so this commit override the value (adding
"height:100%" also fixed it but not for all browser (eg. in safari)).

opw-2558670

closes odoo/odoo#72198

X-original-commit: 7971bcc3ed2c14254b089a6871d151952b4c4d62
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-06-15 18:24:33 +00:00
Jairo Llopis ba812ddd99 [FIX] sale: improve compute expected date performance
Without this patch, each time the compute reaches the line with `.filtered()`, it needs a new fetch from the database. With too many sale orders, this becomes a bottleneck.

Now, before getting to that line, Odoo knows that it'll need all sale.order.line records, so it can fetch them all at once.

In a production database, loading the sale.order list goes down from 7s to 500ms with this patch.

@Tecnativa TT30390

closes odoo/odoo#72141

X-original-commit: 7969a052a19f3572e4819d163f969ae02bc8a80e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-06-14 15:50:17 +00:00
Thibault Delavallée f27b186a63 [FIX][IMP] mass_mailing: make document fields required on trace model
Traces are always linked to documents as mailings are sent on
documents. Those fields should be required to ensure database
coherency.

Task ID-2525759

closes odoo/odoo#71786

Related: odoo/upgrade#2513
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-15 11:46:51 +00:00
Odoo's Mergebot bc95997644 [MERGE] (test_)mail: improve activities tests and access checks
Overall purpose of this merge is to add some tests on activities notably
about ACLs and access to records.

See sub commits for more details.

Task-2272475

closes odoo/odoo#71131

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-15 15:06:43 +02:00
Brieuc-brdandqsm-odoo ebc56f7605 [IMP] web_editor: add label for animated shapes
This commit adds a little label on the top corner of animated shapes
previews.

Part of #70843
task-2319488

Related: odoo/design-themes#17
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-06-15 12:17:41 +00:00
Brieuc-brd 0da5c12179 [IMP] web_editor: reorder the list of shapes
Reordering the names (data-select-label) in snippets.xml
to have a more logical list.

Part of #70843
task-2319488
2021-06-15 11:53:50 +00:00
Brieuc-brd 50458a208d [IMP] web_editor: clean and improve shapes
1. Change some shapes to apply correctly the color presets:
e.g. the default color of the shape erased the background
color of the preset.
2. Improve some shapes to have a better render by changing
the colors and/or adding animations.
3. Some svgs could give the same result. To have a clean list,
many svgs were combined.
4. Letting the old svg files to assure the compatibility with themes.
5. Improve the preview of some shapes for a better reading.

Part of #70843
task-2319488
2021-06-15 11:53:50 +00:00
xO-Tx 9017745fd1 [IMP] web_editor: add animated shapes
The goal of this commit is to add a new page to the shapes
(Floating shapes) and new animated shapes in the current
categories.
Colors should be, as other shapes, linked to the theme.

Part of #70843
task-2319488
2021-06-15 11:53:50 +00:00
Munaf Khan 292ffeec00 [FIX] various: avoid scroll for button(s) within mail templates
Right now, for notifications handled by odoo (which are being displayed on
discuss app / object chatter), few of the buttons have unexpected scroll
(mostly the CTAs that redirect to record / portal views) and ruins the UI.

This commit fixes the issue by improving such templates by using proper
paddings on the button.

TaskId:2518863

closes odoo/odoo#70083

Related: odoo/enterprise#18225
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-15 08:34:37 +00:00
Ivan Yelizariev b35d0509a3 [FIX] web_tour: use .concat to avoid max call stack error
Variable `mutations` may have thousands of records. Using `.push(...mutations)`
would lead to error

STEPS:
* install website_sale
* create many categories:

```
for x in range(0, 4000):
    env['product.public.category'].create({'name': str(x), 'parent_id': 9})
```
* open /shop
* click [Edit]

BEFORE:

```
Uncaught RangeError: Maximum call stack size exceeded
```

---

opw-2515707

closes odoo/odoo#72169

X-original-commit: 853a2cab3f896e99d5a4c498eea6ebf02e787b94
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-15 11:26:16 +00:00
Raphael Collet 7fca29b443 [FIX] base: useless view validations when validate=False
When a view is created/modified, it is required to validate it, the
validation checks the syntax, the inheritances, the fields, etc. When a
view is rendered there are a few more steps to perform like to (dis)able
the `edit` button from a view form if the user only have `read`
accesses. Those postprocess are useless when the view is validated and
should only be performed when the view is rendered.

closes odoo/odoo#68469

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-06-15 08:44:03 +00:00
Raphael Collet 4f22ae270a [FIX] base: compute view.xml_id only when needed
This is a pure technical fix, computing `view.xml_id` is only needed
when there is a problem with the view.  Computing the `xml_id` is not
free, as it needs to be retrieved from the database.  During a regular
installation, there should be no problem, the view is validated without
errors or warnings.
2021-06-15 08:44:03 +00:00