Commit Graph
155397 Commits
Author SHA1 Message Date
Renaud Thiry 96c8dd3ca8 [FIX] web_editor: onAttachmentChange only composer
Due to a previous fix, attachments uploaded through media dialog would appear in the attachments of mail marketting.
That fix prevents attachments from 'dangling' and being garbage collected later.

That fix is now limited to the mail composer in this commit as attachments are only garbage collected for that model, for now.

related commit: c112361bf9e2f5e7b087c5e5b9a31879856b1da4

task 3003939

closes odoo/odoo#103038

X-original-commit: 69fdca133b06eb66443635bc52d380233580ef51
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-11 14:10:25 +02:00
Demesmaeker 52d46e1e76 [IMP] sale: invite to complete address
task-3002442

closes odoo/odoo#103036

X-original-commit: 2618d1b740d5d291b29a96601f8af08ffc470473
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2022-10-11 14:10:23 +02:00
Demesmaeker 95048fff04 [IMP] web_tour,*: add dynamic step skipper in tours
Some onboarding tours were conflicting between themselves, with some
common steps. This commit introduces the possibility to skip a step
depending on the current DOM, making dynamic tours and ensuring tours
compatibility

task-3002442

X-original-commit: 1e4fb74f2cb8d500effa54d548dc9c29f12b32c1
Part-of: odoo/odoo#103036
2022-10-11 14:10:23 +02:00
Antoine Guenet dc18de099e [FIX] web_editor: prevent editing non editable media
Prior to this fix it was possible to edit a media that was not editable
because no check existed for such a thing.

task-2962912

closes odoo/odoo#103035

X-original-commit: ddade4346347266b7f699d05865578dc96e2bf98
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2022-10-11 14:10:19 +02:00
Chong Wang (cwg) 7718fe9508 [FIX] core: assert translated fields cannot have size
Translated fields are stored as jsonb columns. Since jsonb columns don't have
size, the size attribute for Char field doesn't work. Setting the size attribute
for a Char fild should raise an error

closes odoo/odoo#103031

X-original-commit: 763fbb1c68385f202f5118fac5bc8b23b8760220
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-10-11 14:10:16 +02:00
Chong Wang (cwg) 25e4a53753 [FIX] core: fix search domain containing empty False None
For non-translated field, when search(['name', 'in', list_right])
The behavior of False and the behavior of None in list_right should be the same.

Translated fields need customized process for 'in' operator

X-original-commit: a9a3c666f08c5612432dba40a69c7cfdc54ba96e
Part-of: odoo/odoo#103031
2022-10-11 14:10:16 +02:00
Chong Wang (cwg) 105e0b9ef2 [FIX] core: search translated fields with characters needed to be escaped
The trigram index function jsonb_path_query_array("column_name", '$.*')::text
uses all translations' representations to build the indexed text. So the
original text needs to be JSON-escaped correctly to match it.

X-original-commit: 7547df664945dddcb839e4903068f7f25ecfc08c
Part-of: odoo/odoo#103031
2022-10-11 14:10:16 +02:00
Chong Wang (cwg) db8545eb5f [FIX] privacy_lookup: skip query translated fields
Usually, a user name is not translated, and will not be stored in another
translated field.

X-original-commit: 1c3d14a384d5e7b86c2304ee6061855c5f448048
Part-of: odoo/odoo#103031
2022-10-11 14:10:15 +02:00
Chong Wang (cwg) be1eed6cd7 [FIX] core: fix search for translated field
make searching translated field language dependent
add an extra filter using trigram index to speed up '=' and 'like' search

X-original-commit: 5b6f0a9e5f9d60735e306709a3e7d7ac46a586be
Part-of: odoo/odoo#103031
2022-10-11 14:10:15 +02:00
Chong Wang (cwg) bde30899a4 [FIX] core: new PO file overrides old ir_translation
Before: while upgrading to 16.0, the PO file is loaded before migrating
ir_translate. As a result, old translations from ir_translation
override the new translations imported by new PO files.

After: translations imported by the PO file take priority over the
translations migrated from the ir_translation table.

X-original-commit: 178270eff48221537a4efba1ad8fa0b53a1516f2
Part-of: odoo/odoo#103031
2022-10-11 14:10:15 +02:00
Younn Olivier d3a3397c4d [FIX] website: prefer requested action url over last url
Before this commit, there was a conflict between 2 of the ways to open
the WebsitePreview iframe.

First, introduced with [1], when a user click on the 'edit in backend'
systray button, the URL he was on is stored to be used later if the user
click on the "Website Preview" breadcrumb. When he will click on that
breadcrumb entry, we want him to go back to where he was, not on the
homepage.

Second, some records in form views have a "Go to website" stat button
that will go to the website preview action, loading the iframe with the
URL of the record from the form view.

Before this commit, the second flow was not working if the user
previously click on "Edit in backend" on a record (first flow
described).
Indeed, if that "last url" was set, it would always be used, ignoring
the requested one from the second flow.

Step to reproduce:
- Go to a record in the website preview, like a product
- Click on edit in backend
- You land on the product form view, and that url was saved in JS
- From there, navigate to another record through the form view, like a
  m2o relation or a stat button, or by whatever other mean, but don't
  hard reload the page (F5)
- For the example, let's say you landed on a blog post record
- Click on "Go to website" on that blog post form view
-> You land on the product page you were initially, not on the requested
   blog post page.

Courtesy of @rdeodoo

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#103010

X-original-commit: 7cd55e8a1d9516a6f457320064160328a49210f9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-11 14:10:09 +02:00
Paolo Gatti 957b1b5ca0 [FIX] l10n_it_edi: demo data from US gets an Italian VAT number
Fixing some demo data from US having an Italian VAT.
Also, a partner's name and VAT has been changed not to be too similar
to one of our actual clients. Now the Engie Italia's VAT is used.

closes odoo/odoo#102989

X-original-commit: d169552778dff396ef28bd7b76500db8dca32879
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-10-11 14:10:06 +02:00
Alexandre Kühn cf34560383 [FIX] im_livechat, *: Fix broken test page of chatbot
*: website_livechat

Task-3006246
Task-3010911

closes odoo/odoo#102985

X-original-commit: 59002571344405ce4fb691761f62d4fb909ffc17
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-11 14:10:02 +02:00
Alexandre Kühn 47acff4b16 [FIX] hr: no crash when opening chat from employee kanban
Task-3013832

closes odoo/odoo#102988

X-original-commit: 1b7f5b1018d7f321b1386661f562aa576d1f4e1f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-10-11 13:16:19 +02:00
Alexandre Kühn c9dbb8e36b [FIX] mail: do not refocus search bar on click category bar
Before this commit, when clicking on category in category bar,
the search bar was (re-)focused.

It was flickering, especially when device prompt a soft keyboard,
such as on mobile.

This commit fixes the issue by not (re-)focusing the search bar
when clicking on a category from the category bar.

Task-3013819

closes odoo/odoo#102987

X-original-commit: 61790c029b3b78c2a099ec72b0d688c28d803374
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-10-11 13:16:16 +02:00
Alexandre Kühn 6650188d2c [FIX] mail: no crash when click on failure in mobile
Before this commit, when clicking on a mail failure in
the messaging menu in mobile, it crashed.

`NotificationGroupView` is already destroyed, so it crashed
due to attempting to access a field (`messaging`)

Task-3013202

closes odoo/odoo#102986

X-original-commit: 73b94715f0d0086d361937491c27c611a03a9f67
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-10-11 13:16:14 +02:00
Odoo's Mergebot c4febbbe3a [FW][MERGE] UI css fixes
Followup of #102259

Instead of adding a class to remove field borders, we want the opposite: hide the borders by default, except when specified specifically with a `.o_field_highlight` class (on a parent or the field itself). This makes it much easier to add field borders on specific parts of the ui (just add the class in the template), rather than having to _remove_ the class through a js override, which is far less discoverable.

I converted all the new rules to work opposite as before, same for the JS logic which added the class based on mobile device detection (size + touch support).

closes odoo/odoo#102977

Forward-port-of: odoo/odoo#102823
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 13:16:11 +02:00
Antoine Vandevenne (anv) c4b78c203a [CLN] payment(_*): clean view hooks and split files per model
When the payment views were updated with commit odoo/odoo@f7b8f075, a
hook was improperly renamed to `code`, which doesn't help to figure out
its purpose. This commit renames it to `provider_credentials` which
better fits its role.

While doing so, the view files are also renamed and/or split by model to
increase their readability.

closes odoo/odoo#102976

X-original-commit: 49d126d4fce18761d0261adac00e115b840b9b47
Related: odoo/enterprise#32662
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-11 13:16:07 +02:00
luvi e4ff2afaec [FIX] web: correct form style in x2ManyDialog
Since o_form_view class was not placed on the right element, as the
form is displayed in a dialog, some styles were not applied in x2Many
dialogs using a form view. Now, the selector matches all cases and
dialogs will be stylized as expected, since the class is placed on the
dialog container instead of the first div.

Now, we are consistent both for dialogs and standard form views.

Tests have been adapted to work as expected.

closes odoo/odoo#102953

X-original-commit: af67305b43d51e1669df19d376d9bda7418ba863
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-10-11 13:16:02 +02:00
Odoo's Mergebot 740dd7fb8a [FW][IMP] web,*: dark-mode
Introduce dark-mode for enterprise odoo webclient.

enterprise:
- https://github.com/odoo/enterprise/pull/31128

task-2710677

closes odoo/odoo#102868

Forward-port-of: odoo/odoo#99755
Related: odoo/enterprise#32617
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-11 13:15:57 +02:00
Pierre Paridans dd9877e080 [REF] web,*: each module handle its own dark mode variables
Instead of having a dedicated module for all-things dark mode related,
this commit moves the (S)CSS files into their respecting modules and
uses `web` and `web_enterprise` to provide the base infrastructure for
the dark mode (cf. dedicated assets bundle).

Note:
Don't forget that you have to handle 2 cases:
1: SCSS variables must be placed BEFORE bright ones
2: CSS variables must be placed AFTER

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:56 +02:00
Pierre Paridans efc30998a4 [MOV] base,web: move onboarding variables in a dedicated file
Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:56 +02:00
stefanorigano (SRI) c8f6bbea46 [FIX] web, mail, lunch: remove the 'default-badge' border
Prior to this commit, the border of any badge was set to "1px
$o-brand-primary" in order to achieve the default badge design that
comes with transparent background.

Unfortunately this rule was affecting colored badges too, leaving no
choice rather then either remove the border (causing misalignment with
siblings default badges) or hide/re-color/keep the undesired decoration
, but with mixed results.

These commit will review the behavior applying an outline (that doesn't
affect badge's placement) to "default badges" only.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:55 +02:00
Brieuc-brd 51b51c04a8 [IMP] web: select2 : redefine and adapt colors
Prior to this commit, there was no common custom file to easily handle
select2 color values (e.g., dark mode).

This commit fixes this issue by redefining the values in webclient.scss.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:55 +02:00
Brieuc-brd ce235f8b03 [IMP] web: Tooltip: adapt for dark mode
Commit preparatory to the introduction of dark-mode.

note: Tooltip variables should be reworked in order to correctly handle
different scenarios. For simplicity this commit will just match popover
colors.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:55 +02:00
Romain Estievenart 06948a763e [IMP] *: adapt bundle to support dark mode switch
This commit adapt all bundle to support dark mode

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
stefanorigano (SRI) 857a7a3b84 [IMP] web_editor: adapt for dark-mode
This commit adapts the module in order to correctly handle color-scheme
variations.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
stefanorigano (SRI) f37e92a0ba [MOV] web_editor: move floating toolbar variables in a dedicated file
Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
stefanorigano (SRI) d53d432361 [IMP] *: adapt for dark-mode
*: hr, hr_holidays, project, purchase, point_of_sale, rating,
spreadsheet_dashboard, stock, survey

This commit adapts modules and components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
stefanorigano (SRI) f84b9b7ef3 [IMP] website: adapt for dark-mode
This commit adapts several components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
stefanorigano (SRI) 45cfe93166 [MOV] website, web: move odoo logo in web module
Move the file in a more convenient place to be shared and customized to
match different color schemes.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
stefanorigano (SRI) 3fb351e4de [IMP] mail: adapt for dark-mode
This commit adapts several components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
stefanorigano (SRI) 5234fad374 [IMP] web, base: adapt for dark-mode
This commit adapts several components in order to correctly handle
color-scheme variations.

It also allows user_menu to handle switch entries 

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
stefanorigano (SRI) 1ced9f10aa [IMP] web: add 'odoo' fine-tuned text-color
The '$o-theme-text-colors' provides a list of fine-tuned text-color that
differ from the bg ones since used for text.
This commit adds `$o-brand-odoo` in the list.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
stefanorigano (SRI) cb8677eb05 [IMP] web: introduce 'border-transparent' utility-class
Since the view's backgound-color has been historically white, white
borders have been used to adjust layout discrepancies between
components.

This commit introduces 'border-transparent' to handle the scenario
regardless by the view background color.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
stefanorigano (SRI) 9622839cc9 [IMP] web: PivotRenderer, after BS5 cleanup
Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
stefanorigano (SRI) 17ec20ca75 [IMP] web, mail: introduce bg-view class
Since the view's background-color has been historically white, the
`bg-white` class has been used to make match several UI components.

Despite working for the default color-scheme, this approach leads to
inconsistencies when the default view's background-color changes, eg.
dark-mode.

This commit introduce 'bg-view' to set any element to match the view's
background-color, whatever it is.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
stefanorigano (SRI) 9c923d68b8 [IMP] web_editor: preserve backend's black and white colors
Add 'black' and 'white' color in the list of backend's $theme-colors to
preserve during website's customization.

This commit is preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:51 +02:00
stefanorigano (SRI) 74e6de03be [REF] web: use $input-bg for o_inputs
Partially remove visual discrepancies between odoo and Bootstrap fields,
allowing to use BS variables to control fields' design across versions
and color-schemes.

This commit is preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:51 +02:00
Guillaume (guva) 23f63a5aae [FIX] l10n_nz: GST tax on tax report
Items with tax "GST Only - Import" does not
appear on tax report

Add "BOX 11" tag to "GST Only" tax.

opw-2919731

closes odoo/odoo#102784

X-original-commit: 0cec2ec8b090cde5fc1c3fe46c1fb093217368d4
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2022-10-11 13:15:23 +02:00
Habib (ayh) 9042101413 [IMP] account: analytic distribution validation
Analytic distributions that contain mandatory plans should be blocked from posting.
However, automatic flows (for example subscription invoices) should not be blocked.
For this reason, the context is used to determine whether the distribution should be validated.

closes odoo/odoo#102720

X-original-commit: 7b11af76598c0782ac2097d3cbeb718962be2537
Signed-off-by: William André (wan) <wan@odoo.com>
2022-10-11 13:15:20 +02:00
Damien Bouvy c7f804a4f5 [IMP] web: print/action menu styling
closes odoo/odoo#102322

X-original-commit: a41094e772d6bcefbc7764213b1795a06a2fd959
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 13:15:15 +02:00
Damien Bouvy e647a2de09 [IMP] *: adapt to grid form views
The recent switch from tables to css grids for form views `group` nodes
has introduced several inconsistencies/issues with several views accross
modules - these will not be the last fixes.

closes odoo/odoo#102174

X-original-commit: 836568dfd59886a6d52f15e0e2109709903b6803
Related: odoo/enterprise#32295
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 13:15:12 +02:00
Damien Bouvy 0d683bf982 [IMP] web: clearer contrasts between readonly and editable form fields
X-original-commit: f86836af3d1bae533580bc901289a170f094bd9e
Part-of: odoo/odoo#102174
2022-10-11 13:15:12 +02:00
Damien Bouvy 3a09287357 [IMP] web: tooltips & copy
- remove redundant tooltips
- m2o links are internal, not external

closes odoo/odoo#101205

X-original-commit: 664c36af56e1cfc390d007f2ab2ef9eefef48bfb
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 13:15:06 +02:00
Michael (mcm) e19ba30650 [IMP] web: confirm on closing tab/browser
Before this commit, the user was not notified when he
closed the tab or the browser while modifying a record.
Now, the user will be asked to confirm the close if there
is at least one invalid field.

task id: 2994132

closes odoo/odoo#102990

X-original-commit: 3fcc36786453f3006974f5fd0fa395ad5d07d9a2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-11 12:13:45 +02:00
Nicolas Bayet 530738870b [FIX] web_editor: deactivate collaboration conflict detection
For demo purpose, temporarily deactivate collaboration conflict
detection.

closes odoo/odoo#102980

X-original-commit: d8d23148c9a45e9a543e4d908ccb9eec0fd36e3b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-11 12:13:42 +02:00
Antoine Guenet a101dfd35e [FIX] web_editor: prevent removal of trailing space on remove last char
This fixes a bug that occurred when using BACKSPACE to remove the last
character of a text node, if said character was preceded by a space and
said text node was succeeded by a <br>. The space was removed along with
the character. This was simply due to a missing state restoration rule
to handle this specific case.

task-2990229

closes odoo/odoo#102974

X-original-commit: 5e90529388095321da8b504ebf543c4c3054845e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-11 12:13:39 +02:00
Antoine Guenet b731ae7bb1 [FIX] mass_mailing: prevent dropping snippets outside mailing
The fix at [1] had to be adapted anyway since the conversion to OWL. As
a result it was possible to drop snippets below the mailing area.

[1]: https://github.com/odoo/odoo/pull/77724/commits/65b67d66de72fab390b8887c12532b840d47c95f

task-3002441

closes odoo/odoo#102972

X-original-commit: fe4006997daeb5d323b364821fc2815a45e78495
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-11 12:13:37 +02:00
clesgow d31c94a780 [FIX] mrp: production wizards layouts
Adapts the layouts of the immediate production and the production's
backorder to match the new grid css for groups.

Part of task-2985735

closes odoo/odoo#102958

X-original-commit: 5b999ee40e02647c0d2edfbce7081f6f8cf05857
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-11 11:07:48 +02:00