Commit Graph
152957 Commits
Author SHA1 Message Date
Camille Spiritus 8852ff2767 [FIX] account: coa search functionality crashing
Searching for anything in the Chart Of Account view would make a stacktrace appear.

FIX -->  classic domain names instead of 'str(self)+'%''

Task-2951261

closes odoo/odoo#97991

Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-11 19:15:01 +02:00
Panagiotis Kyriakou 06b81a71aa [FIX] sale_project: reduce the activities displayed on project update
This commit changes the activities that are displayed on the project update.
(Both in the table of the project update form view and on the right panel in project update)
Specifically it reduces the sale order items to only the ones that are directly
related to the project (the project itself or its tasks)

A test was modified in order to accomodate the change.

closes odoo/odoo#97985

Signed-off-by: Xavier <xbo@odoo.com>
2022-08-11 19:14:57 +02:00
Victor Feyens f5310d21c4 [FIX] sale_margin: forbid manual cost specification
Considering recent recurring bug reports and the fact that bridge modules
now automatically compute the cost considering logistics, timesheets & expense
flows, the ability to manually edit the cost on a sale.order.line is now disabled.

In most cases, manually specified costs are automatically reset because of
stock/timesheets/expenses added dependencies on the purchase_price field.

Also adapt existing tests and use the new Sale tests common.

closes odoo/odoo#97977

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-08-11 19:14:54 +02:00
David MonjoieandNicolas Bayet 0755d72433 [FIX] web_editor: fix colorpicker reverting history
The colorpickers forcefully reset the current history step to revert the
color change while previewing colors. This works when the only change in
the current step is in fact the colorpicker. If other changes already
existed in the current step however, they will be reverted as well. This
commit fixes the issue by introducing the concept of stashing mutations to
avoid that these be reverted. They can be unstashed later on when the
system is done abusing the revert mechanism.

task-2921844

closes odoo/odoo#97973

X-original-commit: cc280522d590c3ed257e7c6c495008e8986b2bf3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2022-08-11 17:57:34 +02:00
David MonjoieandNicolas Bayet 0c22f04354 [FIX] web_editor: fix link tools losing selection
When clicking the link tools button, the focus is set inside the URL
input, changing the selection temporarily to that input. This means that
if the user clicks any other button from the toolbar right after using
that input, a command would try (and refuse) to execute outside the
editable area.

The link tool is now destroyed when clicking other buttons of the
toolbar, thus either validating the link or reverting it, and the
selection is reset accordingly.

The toolbar buttons are now correctly bound on click rather than some
being bound on mousedown and some on clicks, like colorpickers, which
would result in weird behavior such as a mousedown handler modifying the
dom which changes the layout so the mouseup event is on another node and
the click is not fired anymore. This commit streamlines the behavior to
use click so that this issue does not occur anymore.

task-2921844

X-original-commit: 798e3d0eb0017e05261ca0a0c5e29706629f0350
Part-of: odoo/odoo#97973
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2022-08-11 17:57:34 +02:00
Antoine Guenet 85b1592b80 [FIX] web_editor: prevent toolbar disappear on click link tools button
When clicking the link tools button, the listener on `body` clicks is
triggered and we check if the toolbar should appear or be hidden. This
check should be skipped whenever we click in the toolbar but this was
checked via the selection on the global document rather that on the
editable's owner document, resulting in an oft-empty selection object.
As consequence, the checks were done and the toolbar was hidden, whereas
it should remain shown.

task-2921844

X-original-commit: f74184b4f98772949040eeea94e389b425fc3265
Part-of: odoo/odoo#97973
2022-08-11 17:57:34 +02:00
Antoine Guenet 457095b393 [FIX] web_editor: ensure link preview placeholder on empty label
When opening the link tools with a collapsed selection, we have an empty
link, which is ugly with its dashed border around an element of width 0.
This inserts a placeholder space composed of two nbsps so that the
dashed border is correctly rendered.

task-2921844

X-original-commit: a1a3fc850fe50284441f74afb43ac06b0ae2d6c4
Part-of: odoo/odoo#97973
2022-08-11 17:57:34 +02:00
Antoine GuenetandNicolas Bayet 720d46db4c [FIX] web_editor: adapt link on input url in link tools
The link tools were made so that one needed to validate the URL they
input before it was applied to the DOM. But this was awkward, especially
when the selection was collapsed and we counted on the URL input to fill
the link's label.

We need to pause history steps however, otherwise each change will be
its own step in the history and the user will have to undo as many times
as the number of characters that were entered.

task-2921844

X-original-commit: 226c4c4032c26d3d8f622b29fb151fa8e78ba70a
Part-of: odoo/odoo#97973
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
2022-08-11 17:57:33 +02:00
Antoine Guenet a98d10a75d [FIX] web_editor: only correct triple click when triple click
The triple click correction algorithm in `getDeepRange` is supposed to
do be triggered only when a selection spans multiple nodes and ends at
position 0 of a node. But it only checked the end of the selection and
failed to check if the selection actually did span multiple nodes.

task-2921844

X-original-commit: 22fdcc0d09e232c481f05eefdb2e60ba1cea4f10
Part-of: odoo/odoo#97973
2022-08-11 17:57:33 +02:00
Xavier Morel 5c02342704 [FIX] auth_totp: fix the incomplete fix
The previous pass in #97567 missed a small window of race condition
in *closing the fecking dialog*. Apparently that's still not
instantaneous enough and it's possible to have the check trigger in
the interval between clicking the button and the dialog being
completely torn down.

Add an explicit test for this to the existing `closeProfileDialog`
utility function.

closes odoo/odoo#97969

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-11 17:57:23 +02:00
Stefan-Calin Crainiciuc (stcc) 2e6b64cfab [FIX] mrp: correct barcodes on production order report
Steps to reproduce:

- Inventory app > Settings > enable barcode scanner
- Manufacturing app > Create a new manufacturing order
- Under components, add a product that has a barcode
- Save > Print > Production order

The barcodes of the products on the report all encode the
same (incorrect) value, which is the manufacturing order name.

This commit changes the barcode value to the corresponding
barcode string of the products.

opw-2930848

closes odoo/odoo#97968

X-original-commit: 71d4d977d42e69e8e3d7e069098707b84812ee07
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: stcc-odoo <stcc@odoo.com>
2022-08-11 17:57:20 +02:00
Antoine Guenet b0d068a83c [FIX] web_editor: create a td for Bootstrap grid col offsets on convert
When converting Bootstrap grids to tables for e-mail compatibility, we
need to take into account Bootstrap offsets on columns. We were doing
this by adding that offset to the column but we actually need to create
an extra column instead.

task-2936705

closes odoo/odoo#97962

X-original-commit: 8beb7ac47c4cc86822bbc42b67ce5f6a44d41626
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2022-08-11 17:57:17 +02:00
Antoine Guenet f53e0da42d [FIX] web_editor: properly convert heights of masonry cells
Masonry's top inner container needs to have a 100% height to properly
size its contents.

task-2925779

X-original-commit: 717672d56958915084d98d69246c9e7e986fabab
Part-of: odoo/odoo#97962
2022-08-11 17:57:16 +02:00
Antoine Guenet 40324a03a6 [FIX] web_editor: properly switch background types in mass_mailing
The option to switch background types depends on CSS which was in the
website builder but absent from mass_mailing.

task-2925779

X-original-commit: 63595109516ec3f40be74115ce6cf8894977a727
Part-of: odoo/odoo#97962
2022-08-11 17:57:16 +02:00
Antoine Guenet 4897f23296 [FIX] web_editor: properly convert incomplete Bootstrap rows
When we convert Bootstrap grids to tables for e-mail compatibility, we
need to complete rows whose column sizes don't add up to 12. The way it
was, the last column was stretched to fill up the row, which is wrong as
it can affect the width of its contents.
With this commit, a new, empty column is appended to the row to fill it
up without affecting the existing rows. This is a more accurate way to
emulate the behavior of Flexbox.

task-2936705

X-original-commit: 462b698732dbc0e71972ddbe86c687f4bb3f9492
Part-of: odoo/odoo#97962
2022-08-11 17:57:16 +02:00
Benoit Socias 4c7074c454 [FIX] website: fix image alignment in search results
Since [1] when Bootstrap 5 was introduced, the images of search results
are not aligned anymore. This is because the detail part of the result
has been set to `flex-grow-1`.

This commit restores the former flex parameterisation through a new
class. The fix is applied both on the autocomplete results template and
the hybrid results element template (used to render `/website/search`).

[1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968

task-2951028

closes odoo/odoo#97944

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-11 17:57:09 +02:00
Samuel Degueldre 173441ea79 [FIX] auth_signup: fix notification close button position
Since the bootstrap5 merge, dismissible alerts need to have a special
class for its close button to be positioned correctly. That button also
no longer needs to contain its own cross as it is added by bootstrap.
The class for such close buttons has also changed. This commit fixes
that.

closes odoo/odoo#97939

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-11 17:57:05 +02:00
tsm-odoo 1766c6997a [FIX] bus, mail: fix model definitions setup moved in wrong module
The model_definition_setup has been moved in [1] but adds some models
to be fetched that are not related to the bus module. This would lead
to error in single module builds.

closes odoo/odoo#97937

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-11 17:57:02 +02:00
Thibault Delavallée 6ca272aa05 [FW][FIX] sms: correctly render body in mass sms
When sending SMS on several records in comment mode (aka: post sms message
in batch) the body is sent as it is. This does not happen frequently as
default usage is either

  * comment on a single record -> body is rendered by onchange / compute;
  * mass SMS on several records -> body is rendered for all records then
    sent to all recipients;

Using comment mode in mass is not common, and is mainly achieved through
handcrafted actions. However this can be fixed by correctly rendering the
body before posting on all records.

Use addition of records instead of OR to keep ordering of created
messages when using SMS composer.

Spotted during Task-2613245 (Server actions mail update / cleaning)

closes odoo/odoo#97787

closes odoo/odoo#97890

closes odoo/odoo#97931

X-original-commit: odoo/odoo@1778a2c1b2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-11 17:56:59 +02:00
Thibault Delavallée ab97d81620 [FW][FIX][IMP] test_mail_full: improve tests for rendering in mass mode
Purpose is to enable dynamic rendering in mass comment mode. This highlights
an issue, as currently when using the comment mode on several records body
is not rendered, just sent as it is. This means raw dynamic code could be
sent.

Also cleanup some invalid setup (not enough records for mass) that skipped
some tests.

Spotted during Task-2613245 (Server actions mail update / cleaning)

X-original-commit: odoo/odoo@d5a1c5768b
Part-of: odoo/odoo#97931
2022-08-11 17:56:59 +02:00
xO-Tx 8a3c882de8 [FIX] website: adapt new page dialog UI
The goal of this commit is to fix "New Page Dialog" margin issue
related to the use of '.form-group' CSS (dropped on BS5) and replace
it with a simple row gutter.

closes odoo/odoo#97919

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-11 17:56:54 +02:00
Louis Wicket (wil) 52e6e0ce54 [IMP] mail, *: move channel_type field from Thread to Channel
As the name suggests, `channel_type` only makes sense for Channel.
This commit moves `channel_type` from Thread to Channel.

* = im_livechat, test_discuss_full

Part of task-2948676.

closes odoo/odoo#97779

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-11 17:56:51 +02:00
William Henrotin 360924b4b7 [FIX] mrp: do not compute unit_factor at mrp install
Installing mrp on a large database will take lots of time computing the
unit_factor of stock_moves created in stock. As this value is only
needed in mrp, this commit bypass the computation for moves that have
been generated before the mrp installation

closes odoo/odoo#97750

Task: 2918852
X-original-commit: a2f064446b1e232efc3e6924879f63b79e0bc986
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-08-11 17:56:48 +02:00
FrancoisGe 87ee170473 [FIX] web: toggle a bool in a x2m with the view in edition
Before this commit, in a form view in edition, if you clicked a toggle
boolean in an X2many, the view was saved. A toggle boolean should not do
a save if the main view is in edit mode.

The solution is to save the record only if the view's root datapoint
is in edition.

How to reproduce:
- Go to a form view in edit mode with an X2many that contains a toggle
   boolean field.
- Click on the toggle boolean in the x2many

Result before:
    The view is saved.

Result after:
    The view is not saved and is still in edit mode.

closes odoo/odoo#97673

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-11 17:56:44 +02:00
Rémy Voet (ryv) f80d8e00e4 [IMP] *: optimize redundant calls to exists()
Making a `exists()` on a record got by a `search()` is useless and
lead to a extra useless query. Remove them.

closes odoo/odoo#97482

Related: odoo/enterprise#30133
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-11 17:56:38 +02:00
Julien Castiaux 4ec4ca4a83 [IMP] base: cover filestore gc with tests
closes odoo/odoo#96242

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-08-11 17:56:31 +02:00
Odoo's Mergebot ea85539c9b [IMP] mass_mailing,mass_mailing_themes: snippets adjustments
In order for all snippets to be better supported by the builder and its new design-tab, some changes were needed.
A lot of snippets used bootstrap classes (ex: for text alignment), these have been replaced by inline styles so they can be overridden by the editor.
The templates have also been adapted so as to use the newest versions of these snippets.

task-2835454

closes odoo/odoo#95940

Related: odoo/upgrade#3762
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-11 17:56:28 +02:00
David Monjoie 1898b2dba1 [FIX] mass_mailing: remove noupdate on mass_mailing attachments
Part-of: odoo/odoo#95940
2022-08-11 17:56:27 +02:00
Elisabeth Dickinson 4b5ac5d21e [IMP] mass_mailing_themes: update template thumbnails
Part-of: odoo/odoo#95940
2022-08-11 17:56:27 +02:00
Elisabeth Dickinson 4bd33d9abd [IMP] mass_mailing_themes: fix footers according to snippets
Part-of: odoo/odoo#95940
2022-08-11 17:56:27 +02:00
Elisabeth Dickinson 1aa9961996 [IMP] mass_mailing_themes: correct headers' logo area
There was a mistake on the sizing of the columns. To make room for more
social icons, the logo's column is reduced while the social
column is enlarged.

Part-of: odoo/odoo#95940
2022-08-11 17:56:27 +02:00
Elisabeth Dickinson d6eb4e3a68 [IMP][REM] mass_mailing_themes: rename images and remove unused images
In the previous version of the mail builder, the snippets had different
styles and images according to the selected template.
Now the snippets just use the default image so there's no need for
duplicates in the templates' folders.

The snippet `two_cols` no longer exists since the new version of the
mail builder, its images have been removed.

The header snippet uses the user's company logo, not the template's
default logo. If no logo image is used in the template,
there is no need for it in the folder.

The remaining images have been renamed for more consistency, except for
logo images that are .png format; these must have custom names (not
starting with `s_default_image_xxx`, as this forces .jpg).

Part-of: odoo/odoo#95940
2022-08-11 17:56:26 +02:00
Elisabeth Dickinson b218de746f [IMP] mass_mailing_themes: replace all px-3 classes with inline style
Part-of: odoo/odoo#95940
2022-08-11 17:56:26 +02:00
Elisabeth Dickinson 48d17c3ac8 [IMP] mass_mailing_themes: adapt templates after snippet adjustments
Part-of: odoo/odoo#95940
2022-08-11 17:56:26 +02:00
Elisabeth Dickinson 715e73b01e [IMP] mass_mailing: add padding-x option to snippets
An extra option is added in order to have control over the paddings.
Snippets using the `px-3` class have had it replaced with inline styles
and now have the padding option in the builder.

This was initially done for the media_list snippet, but it seems it's
useful for many more snippets.

Part-of: odoo/odoo#95940
2022-08-11 17:56:26 +02:00
Elisabeth Dickinson fcbcd9f2b7 [FIX] mass_mailing: properly allow global customize separator styles
This is an addition to commit 098202ba584ca6ba3544ccd00397578f5deb12ad
The design tab allows the customization of the separators' border-style
and width as well as color, but this is currently broken because it gets
overridden by the default styles of the snippet, which has higher
specificity.

Part-of: odoo/odoo#95940
2022-08-11 17:56:25 +02:00
Elisabeth Dickinson a559fe4aae [MOV] mass_mailing: rename, move and remove images
Old thumbnails for deprecated snippets have been removed. The
other snippet thumbnails have been grouped together in same folder.

Some images are unnecessary since the new mail builder, some are simply
not used anywhere.
The references snippet is limited to four images, adding more columns
will copy the last column's image, so no need for images 5 and 6.

The basic template doesn't allow snippets - the editor doesn't even
appear - since no snippets can be added, their images are unnecessary in
the templates image folder.
In all cases, the drag&dropped snippets, even from other templates,
use the theme_default images and not the templates' images.

Move all images in snippets_demo folder to theme_default folder

For more consistency, default images have been renamed according to
their snippet names

Part-of: odoo/odoo#95940
2022-08-11 17:56:25 +02:00
Elisabeth Dickinson 73160feed7 [IMP] mass_mailing: revamp of the event snippet
This snippet is now similar to the one being used in the web editor.
What was once a single event on three columns is now two events on
two columns.
The snippet's thumbnail has been redesigned to correspond to the
snippet's new design.

Part-of: odoo/odoo#95940
2022-08-11 17:56:25 +02:00
Elisabeth Dickinson 2815fe0807 [IMP] mass_mailing: remove data-snippet attribute on snippets
We shouldn't add a data-snippet in the declaration of a snippet,
as they are meant to be drag & dropped, the editor/right panel is going
to add that for you. We generally add them when we copy paste a snippet
definition into another view directly in our sources (ie: template)

Ref: https://github.com/odoo/odoo/pull/87059#discussion_r866903584
Part-of: odoo/odoo#95940
2022-08-11 17:56:25 +02:00
Elisabeth Dickinson d5c7f2b208 [IMP] mass_mailing: title snippet improved
Bootstrap text align class is replaced with inline style

Part-of: odoo/odoo#95940
2022-08-11 17:56:24 +02:00
Elisabeth Dickinson 128e3baca8 [IMP] mass_mailing: text_highlight snippet improved
Replace bootstrap class for text alignment with inline styles
Remove Horizontal alignment on whole snippet to allow individual 
alignment on <h3> and <p> elements.

Part-of: odoo/odoo#95940
2022-08-11 17:56:24 +02:00
Elisabeth Dickinson 14ee23fa0a [IMP] mass_mailing: text_block snippet improved
Remove unnecessary classes

Part-of: odoo/odoo#95940
2022-08-11 17:56:24 +02:00
Elisabeth Dickinson bffada1463 [IMP] mass_mailing: showcase snippet revamped
There used to be a middle column to allow for a border between
the two columns, but this was selectable (not editable) with the mailing
builder.
`.o_no_editable` or other similar classes didn't seem to work.
Instead, the snippet has been revamped by removing the middle column and
adding a right border to the second column on each row.
This border is not yet editable in the builder, so the user cannot
adapt the width/color/style yet.

Bootstrap classes for text alignment have been replaced w/ inline styles

Part-of: odoo/odoo#95940
2022-08-11 17:56:24 +02:00
Elisabeth Dickinson b52806fcf0 [IMP] mass_mailing: references snippet improved
Replace bootstrap class for text alignment with inline style

Part-of: odoo/odoo#95940
2022-08-11 17:56:23 +02:00
Elisabeth Dickinson f6c49e8c40 [IMP] mass_mailing: rating snippet improved
Changed `h4` to `h3`.
Removed padding when inside another snippet which already has its own
padding.

Part-of: odoo/odoo#95940
2022-08-11 17:56:23 +02:00
Elisabeth Dickinson 2a29f373f0 [IMP] mass_mailing: product_list snippet improved
Replaced bootstrap classes by inline styles and removed
`.o_default_snippet_text`.
Wrapping the `<a>` in a `<p>` allows the user to align the button
separately from the text.
On mobile, the columns are stacked, the paddings top and bottom are thus
moved to the columns to allow top and bottom spacing between them.

Part-of: odoo/odoo#95940
2022-08-11 17:56:23 +02:00
Elisabeth Dickinson fd22c5f974 [IMP] mass_mailing: picture snippet improved
Replaced bootstrap classes by inline styles and removed unused
`.figure-caption` class.

Allow columns and give image `max-width: 100%`

As the "thumbnail" option (in the image's Style option) is to be removed,
the `.img-thumbnail` class has been removed from the image.

The result can be done with the "padding" option already available on
images and the "border" widget that is to be added for its border-radius
option.
It is only missing a background-color to get the same result as the
styling given with the removed `.img-thumbnail` class.

Note: The styles are directly applied to the image element but Outlook
would need the styles to be applied to a wrapping element instead.
Outlook doesn't support styling directly on images.

Part-of: odoo/odoo#95940
2022-08-11 17:56:23 +02:00
Elisabeth Dickinson 125bf5552e [IMP] mass_mailing: numbers snippet improved
Replaced bootstrap classes by inline styles and removed
`.o_default_snippet_text` and `.s_number` classes which aren't needed.

`<h5>` is no longer supported, it's been changed to `<p>`.
Added `.o_cc` on columns to allow background color edition with builder.

Part-of: odoo/odoo#95940
2022-08-11 17:56:22 +02:00
Elisabeth Dickinson e4cb8959cb [IMP] mass_mailing: media_list snippet improved
Padding improvements and removal of margin-bottom as this can't be done
with the builder.

Part-of: odoo/odoo#95940
2022-08-11 17:56:22 +02:00
Elisabeth Dickinson cd65d800b4 [IMP] mass_mailing: image_text and text_image snippets improved
Replaced bootstrap classes by inline styles.
Added .o_cc on columns to allow background color edition with builder.

Part-of: odoo/odoo#95940
2022-08-11 17:56:22 +02:00