Commit Graph
6596 Commits
Author SHA1 Message Date
stefanorigano (SRI) 1971bf3981 [REF] web, website: refine and simplify dropdown design
Prior to this commit, Bootstrap dropdowns, jQueryUI dropdowns and Odoo
dropdowns where styled independently leading to visual inconsistencies
and code repetition.

This commit will customize and improve the Bootstrap design using as
much as possible predefined variables. Then it will simply '@extend'
owl/jQueryUI classes in order to visually match the bootstrap ones.

Since dropdown classes are used in the top-menu (and its design is
partially shared with frontend apps), this commit provides the necessary
adaptations for this component as well.
2021-06-18 21:31:27 +02:00
+1 14bffd983e [REF] *: adapt code to new owl webclient
This commit adapts the community codebase to the rewriting of the
/web application in owl.

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-06-18 21:31:27 +02:00
Aaron Bohy 84a4859570 [REF] web,*: move legacy files
To prepare the rewriting of the webclient in owl, we move all
current js files of web in a legacy/ folder. This folder will
eventually be removed, as soon as each file it contains will be
converted to owl and moved to the proper place in the new file
structure.
2021-06-18 21:31:27 +02: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
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
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
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
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
Jeremy Kersten 926af37343 [REF] *: remove unused fileToken cookies
This cookies is not more used since 35d452cffb

closes odoo/odoo#72079

Related: odoo/enterprise#18967
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-14 07:32:18 +00:00
9aca84895f [REF] base: view hierarchy retrieval and combination
The view methods `get_inheriting_views_arch`, `apply_view_inheritance`,
`_apply_view_inheritance` and (previously `read_combined`)
`_get_combined_arch` were complicated and not optimal performance-wise.

The previous approach to retrieve views and combine them was to perform
it recursively, one primary view at a time.  This new approach retrieves
in a single SQL query the whole tree of views to combine.  The order of
view combination has been reproduced to be fully backward-compatible.

We also introduced various optimisations such as pre-fetching and
caching.

**get_inheriting_view_arch**

The method have been renamed `get_inheriting_views` as it returns a
recordset of views instead of the xml architecture of each view.

During an upgrade, only the views that have been fully upgrade already
are safe to be used. The views returned by the query are filtered to
remove any not-upgrade-yet view. Because this part is highly specific,
it has been isolated in a dedicated private method.

View extensions can be discarded according to user groups.  The
retrieval of groups on views is also made by the same query.  This
reduces the number of SQL queries, and makes the filtering faster.

**apply_view_inheritance**, **apply_view_inheritance**

The functions were responsible to build a hierarchy of views and to
iterate it to combine the views.

The hierarchy building have been moved to `_get_combined_view` and the
actual combination have been moved to a new method `_combine` and
documented.

Task: 2541579
Meta task: 2463632

Co-authored-by: Fabien Pinckaers <fp@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-06-11 17:09:04 +00:00
221254ca7b [IMP] all: read_combined(['arch']['arch'] => get_combined_arch()
The method read_combined() has been deprecated in favor of explicit
calls to read() and get_combined_arch().

There are places where we call _get_combined_arch() instead, in order to
avoid parsing the XML that has just been serialized. This saves useless
serialization-deserialization.

Task: 2541577
Meta task: 2463632

Co-authored-by: Fabien Pinckaers <fp@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-06-11 13:47:54 +00:00
root 36bc36ebab [FIX] website: allow translation of cookie buttons
closes odoo/odoo#72010

X-original-commit: 4a79d93a175891714a15c183ff36b87832d25226
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Yenthe Van Ginneken <Yenthe666@users.noreply.github.com>
2021-06-10 17:31:33 +00:00
qsm-odoo ee94c0c357 [FIX] website: allow to drag and drop "inline" snippets next to lists
closes odoo/odoo#71962

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-10 10:52:20 +00:00
Younn Olivier e5d9b60c5b [IMP] website: use theme colors for snippets background
This commit changes the bg-200 static color that some snippets were
using, for the second theme color so that blocks backgrounds connect
well together.

task-2542318
Part of https://github.com/odoo/odoo/pull/71426

closes odoo/odoo#71426

Related: odoo/design-themes#15
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-10 13:38:24 +00:00
Younn Olivier 2ed51dfe16 [IMP] website: remove progress bar title margin
The mb-0 class has been added to the h4 tag of the progress bar so that
there is not too much padding if it is changed to simple text.

task-2542318
Part of https://github.com/odoo/odoo/pull/71426
2021-06-10 13:38:24 +00:00
Oussama MESSAOUDI 8e299ec4b2 [FIX] website: adding title for delay input
Part of https://github.com/odoo/odoo/pull/67357
task-2471323

closes odoo/odoo#71832

X-original-commit: 37fcd93903b4df0c2186797ca8da27173dc1e889
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-07 17:01:10 +00:00
qsm-odoo 1545840f52 [IMP] web_editor: allow to add extra shape color mappings
A shape is made of different colors which are mapped to user color
combination colors (e.g. if a shape use the #3AADAA color, it is by
default mapped to color combination background color n°4). We allow
to add other arbitrary mappings for each shape should a theme want it,
thanks to another created class. This is especially useful for header
and footer connections in default generated pages where the combination
of classes "o_web_editor_Airy_12 o_footer_extra_shape_mapping" will
use a color mapping using the footer color if the theme configured the
Airy 12 shape to do so.

This commit also modifies the generation of pages made by the website
configurator to automatically add the header and footer respective
classes on first and last shape if one is found (if one is found but
should not have a specific color mapping, this is not a problem as the
class has only an effect if the theme declares it).

Part of https://github.com/odoo/odoo/pull/68336
task-2491890

X-original-commit: 232224ff8c54c5027ec20dd9ddd5c0afc121a092
2021-06-04 15:52:28 +00:00
qsm-odoo 6214c48a5a [IMP] website, *: properly wait for save at the end of homepage tours
*: website_mass_mailing

Useful for debugging: launching the homepage/theme tours automatically
allow to build the pages if you cr.commit() after running the test. This
will also allow to make those official test tours if we ever want it at
some point.

Part of https://github.com/odoo/odoo/pull/68336
task-2491890

X-original-commit: 71f30a4dcc59d4c7f4b5a2ab4c8be44218edf4b0
2021-06-04 15:52:27 +00:00
qsm-odoo 79c51059e8 [IMP] website: ensure auto tests drop snippets at the end of the page
Useful when debugging: launching the themes tours automatically will
build the page with the snippets in the right order.

Part of https://github.com/odoo/odoo/pull/68336
task-2491890

X-original-commit: 6f97125ee48928f1665ed4c8a99ab53ebcfd20af
2021-06-04 15:52:27 +00:00
Benjamin Vray 9371715fdc [IMP] web_editor, website: not display edit link popover if not needed
This commit allows not to display the popover where we don't need it.
Like on the next or prev buttons of the carousel for example.

task-2537840

closes odoo/odoo#71721

X-original-commit: 60853837a234f9fbfee5816f8a4766cc5a0b7d19
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-04 08:42:20 +00:00
Antoine Guenet 33e021c2cd [FIX] website: allow editing empty non-arch fields
987fc1190a had added a rule that made
empty fields non-editable so that a snippetless website would not be
editable. This makes empty t-fields non-editable as well which is - to
say the least - not welcome.
This commit fixes that problem by making the rule more restrictive: what
we don't want to be able to edit are empty _arch_ field specifically.

closes odoo/odoo#71718

X-original-commit: 6886c2a2a2ad47d1150dd072888c39ccfb59b163
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-06-04 06:55:10 +00:00
Romain Derie 5a7e6d0247 [IMP] website: add tests - redirect 301 in case if trailing slash
This commit add tests to ensure every dispatch flows redirect to a 301 if the
requested URL has a trailing slash.
It also ensures the URL params are not lost in the process.

  - Basic controller: `/my/?a=b`
  - Website Pages: `/my-page/?a=b`
  - Basic controller with language: `/fr_BE/my/?a=b`
  - Website Pages with language: `/fr_BE/my-page/?a=b`
  - Homepage with language (special case/controller): `/fr_BE/?a=b`

opw-2505818
opw-2513575

closes odoo/odoo#71065

Community: https://github.com/odoo/odoo/pull/71065
Enterprise: https://github.com/odoo/enterprise/pull/18615
Related: odoo/enterprise#18615
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-03 12:07:32 +00:00
Romain Derie c1ae086cdb [IMP] *: remove trailing slash from routes
* http, http_routing, website, website_sale_comparison

At an crawling engine/SEO level, having trailing slashes or not in URLs doesn't
change anything.
Still, whichever solution is chosen, it should be done consistantly: either all
URLs have trailing slashes, or none of them have it.

See https://developers.google.com/search/blog/2010/04/to-slash-or-not-to-slash
" Be consistent with the preferred version. Use it in your internal links. If
  you have a Sitemap, include the preferred version (and don't include the
  duplicate URL). "

opw-2505818
opw-2513575
Community: https://github.com/odoo/odoo/pull/71065
Enterprise: https://github.com/odoo/enterprise/pull/18615
2021-06-03 12:07:32 +00:00
Romain Derie 4f029a2739 [IMP] website: remove trailing / for website.page
This commit fixes multiple bugs when serving a `website.page` which has a
trailing slash:

  1. We use a 301 instead of a 302 as it is done for every other dispatching
     flows (mostly through the redirect in `_postprocess_args()`)
  2. The language is no more lost during the dispatching, before this commit
     `/fr_BE/contactus/` would redirect to `/contactus`
  3. The URL params are no more lost during the dispatching, before this commit
     `/contactus/?a=b` would redirect to `/contactus`

opw-2505818
opw-2513575
Community: https://github.com/odoo/odoo/pull/71065
Enterprise: https://github.com/odoo/enterprise/pull/18615
2021-06-03 12:06:07 +00:00
Benoit Socias 2cc481d1a6 [IMP] website: support a snippet to embed custom code
Before this commit there no general purpose snippet to embed HTML code
in the page.

After this commit there is a new Embed Code snippet that allows the user
to include any HTML within the page.

task-2517473

closes odoo/odoo#68019

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-05-28 12:37:49 +00:00
Jeremy Kersten 042c95b021 [IMP] website: autocorrect website domain
Before, get_http_domain make the job,
now we force website.domain to be valid

closes odoo/odoo#71161

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-02 14:27:02 +00:00
Romain Derie be2f558019 [IMP] models, website: allow get_base_url() on empty recordset
Before this commit, `get_base_url()` could not be called on an empty recordset.
It might be called on an empty recordset for instance when getting the paypal
payment endpoint URLs.
This commit allows that and returns the ICP value in that case.

The goal is to always use the util method `get_base_url()` instead of directly
accessing the ICP.

closes odoo/odoo#68201

Related: odoo/enterprise#17538
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-02 10:04:29 +00:00
Romain Derie 92175d3341 [IMP] *: replace web.base.url ICP by helper method
Previous commit introduce an helper to get the most suited URL for a record
instead of always using the ICP, which is not correct in a website context.

This commit replaces calls to ICP by the helper method.

Community: https://github.com/odoo/odoo/pull/68201
Enterprise: https://github.com/odoo/enterprise/pull/17538
Upgrade: https://github.com/odoo/upgrade/pull/2372

task-2476101
2021-06-02 10:04:29 +00:00
Romain Derie add7d995a8 [IMP] website: better retrieval of base URL
This commit improves the mechanism to find the best URL given a record.
To find the best suited URL, the following heuristic will be done:
  - If record has a website_id, use that website's domain
  - Else if a record has a company_id, use the company's website's domain [1]
  - Else use the `web.base.url` ICP

The following commit will replace (almost) every occurence of ICP by the
`get_base_url()` helper method.

[1] Before this commit, there was no way to know which website was the one from
    a company, has a company could have no website but could also have multiple
    websites.
    We now consider the first found website for a company as the company's
    website. The use of a new sequence on `website` will allow user to chose
    which website to use.

Community: https://github.com/odoo/odoo/pull/68201
Enterprise: https://github.com/odoo/enterprise/pull/17538
Upgrade: https://github.com/odoo/upgrade/pull/2372

task-2476101
2021-06-02 10:04:27 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Younn Olivier 811bdd91de [FIX] website: remove "add image" button from the normal mode
The "Add image" button was shown out of the editor mode when removing
all images from a snippet.

task-2469516

closes odoo/odoo#71486

X-original-commit: 3bae864d1e587e87262c56f1c5f789ac6a6fabc4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-31 11:22:41 +00:00
Romain Derie 50cb0f3276 [IMP] web_editor: remove the img overlay replace and delete
As replace and delete are already in the right panel, this is kind of a
duplicate. Related to f3ccc91d42

Also, add border around selected image so the used knows what image is selected

task-2502679
Closes #69340

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-26 09:55:16 +00:00
Antoine Guenet 5c3de22f76 [FIX] website: properly align the checkmark of checklists
The style of website requires that the checkmarks of checklists be
offseted a little bit differently in website that in field html. This
acknowledges that difference so that they're properly centered in both
cases.

closes odoo/odoo#71348

X-original-commit: 91133da51697f77951d925141ae5cff012230b63
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-27 14:56:39 +00:00
xO-Tx 4a7c562471 [FIX] website, web_editor: fix colorpicker preview
Issue:

> Set bg color combination for a snippet... > Save
> Edit mode > Select the snippet
> Open color palette in bg option
> Hover a color option
> When a color button is left, the preview is cancelled
  but the color combination class is not applied anymore.

In '_computeWidgetState' (for 'selectStyle' method), the right
value ('o_cci') is not returned because we get empty "colorNames"
(the "colorPalette" is not rendered on start).

The goal of this commit is to fix this behaviour by rendering the
colorPalette in start for snippet options, this way, the new code
won't affect the speed fix added in [1] for 'OPTIONS' tab.

[1]: https://github.com/odoo/odoo/pull/65223/commits/ce54c3f21293513673cb1fc6073ada5f0a2b5641

task-2538326

closes odoo/odoo#71365

X-original-commit: fd31c9a10f97c92a48d0589a8bbeaf13a641e891
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-27 17:35:40 +00:00
Sébastien Theys c6716847aa [IMP] web, *: clean up notification API
task-2476867

closes odoo/odoo#67009

Related: odoo/enterprise#16760
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-27 13:47:23 +00:00
nie 3b5bef08ad [FIX] website: remove non-fictional number from templates
Steps:
- Go to Website
- Click "Go to Website"

Bug:
The default phone number on the website is not fictional and may cause
unwanted spam.

Explanation:
In North America, only 555-0100 through 555-0199 are specifically
reserved for fictional use.
> The industry also reserved a block of 100 numbers as fictitious,
> non-working numbers (555-0100 through 0199) for use by the
> entertainment and advertising industries.

Source: https://www.nationalnanpa.com/pdf/NRUF/ATIS-0300115.pdf

opw:2530388

closes odoo/odoo#71341

X-original-commit: 37be09d7d73bd4942396f06f5b5cfa22cca78f56
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-05-27 13:25:20 +00:00
Younn Olivier 8be18ae0a0 [FIX] website: override footer company name in a separate template
The footer company name override from the website is done in a separate
template from website.layout in order to avoid duplicating it when
edited.

Related to https://github.com/odoo/odoo/pull/69943
task-2468472

closes odoo/odoo#71307

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-27 06:39:09 +00:00
Sébastien Mottet (oms) b8e336aaae [IMP] website, *: change configurator palette selection
*: web

This commit brings some functionnal changes to the palette selection
screen:

- The list of suggested palettes does not depend on the uploaded logo
anymore. It is now a fixed list of 20 palettes manually chosen among the
existing ones.

- The recommended palette is not chosen among the existing palettes
based on the logo's extracted colors anymore. The recommended palette is
now a fully custom palette generated based on the two main colors
extracted from the logo.

- The selected palette has a border to indicate it is the currently
selected palette.

task-2518565

closes odoo/odoo#71268

X-original-commit: 23dee47ed51d0dfa54f68ef4b328aba957589bb9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-26 15:14:43 +00:00
Younn Olivier 507408e8e1 [FIX] web, website: display default company name on frontend layout
Before, the "Company name" placeholder was hardcoded in the frontend
layout template, and the user had to change it with his company name
from the website view, which was not user-friendly if the website module
was not installed.

Now, by default, the frontend layout template displays the user's
company name. If the website module is installed, it is editable.

task-2468472

closes odoo/odoo#71176

X-original-commit: 059804be90021559debee6f930462594a3ca8a97
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-21 16:56:11 +00:00
Younn Olivier 7287ce5355 [FIX] website: fix menu button edition
The content of the button was not changed after editing a menu button.

Part of https://github.com/odoo/odoo/pull/70150
task-2513588

closes odoo/odoo#71177

X-original-commit: 727c39db1a28c6539044f230ceb70d80ca05b8de
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-05-21 18:09:38 +00:00
Younn Olivier bcd172d515 [FIX] website: fix MenuEntryDialog linkWidget dependencies
MenuEntryDialog linkWidget dependecies were overwritten instead of
extended.

Related to https://github.com/odoo/odoo/pull/69183
Part of https://github.com/odoo/odoo/pull/70150
task-2513588

X-original-commit: bd5b32f9064f9d3f32548fa9b421bbba070ed453
2021-05-21 18:09:36 +00:00
Sébastien Mottet (oms) 4900cee8a8 [FIX] website: launch action todo on website creation
When website is installed through CLI, the ir.actions.todo
'website_configurator_todo' is not launched and stays in
'open' state. In this case the FIRST time we create a new
website, this ir.action.todo is launched at the end of the
configurator wheter it fails or not.

- If configurator fails, the ir.actions.todo is returned
  by button_choose_theme when choosing a theme in the
  theme_view_kanban view. /website/configurator is called
  and since configurator_done was not correctly set to true
  on current website, the screen theme_view_kanban was
  rendered a second time.

- If configurator succeeds, the ir.actions.todo is returned
  by button_choose_theme in configurator_apply. The route
  /website/configurator is called a second time and since
  configurator_done is set to true the route redirect to the
  website homepage but not in edit mode.

The fix consits in correctly setting configurator_done in
configurator_skip and in launching the configurator through
the ir.actions.todo in create_and_redirect_configurator.

closes odoo/odoo#71148

X-original-commit: 1752548fabc9b184b5b67b659b505c4cfe8dc0c7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-05-21 13:45:26 +00:00
Mohammed Shekha ccc56e28a3 [IMP] *: replace fa-spinner with fa-circle-o-notch
Slightly improve the overall UI of Odoo with a more modern feel by updating the
current 'loading' icons that look quite old school.

Use fa-circle-o-notch instead of old style fa-spinner

task-2346142

closes odoo/odoo#59454

Related: odoo/enterprise#13908
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-21 11:48:32 +00:00
yograj tandel e893651cec [IMP] *: remove widget='selection' from many2one fields
Currently, across Odoo, there are around 40+ many2one fields defined with a
'selection' widget. Since the many2one widget has options to limit record
creation and opening, there is no reason to define a many2one field with a
selection widget. The selection widget does not allow for searching, and is
limited to 100 records.

PURPOSE
to update the definition of any many2one on which we applied a 'selection'
 widget, and instead use the standard many2one widget with disabled
opening/creation instead.

after this commit,
for each many2one field defined with widget="selection",  widget="selection" is
replaced with options="{'no_open': True, 'no_create': True}"

Task : 2476488

closes odoo/odoo#68387

Related: odoo/enterprise#17316
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-20 11:01:28 +00:00
Sébastien Mottet (oms) b909911e15 [FIX] website: correctly set accordion ids
data-parent fields were set on tab link and not on the tabpanel
div. It prevented the accordion of having the right behavior:
closing all the other tabs when a tab is clicked to be opened.

closes odoo/odoo#71001

X-original-commit: 51c868bd9bfcd9a7e81f386b0c889befa5dd6e20
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-05-18 16:59:04 +00:00
Sébastien Mottet (oms) 662b53f9b0 [FIX] website: ids in xml for accordion rendered by configurator
accordions in pages created by configurator have not been
added by a drag'n'drop. onBuilt is therefore not called and
attributes (data-parent and id for tabpanel and data-target
for tab) are not set. We set these attributes directly
in the xml to make accordions work also for configurator.

closes odoo/odoo#70974

X-original-commit: 887f6d539ebf4f3a6d95f44f2cdd4152b59d5910
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-05-18 11:57:52 +00:00
Antoine Guenet 987fc1190a [FIX] website: prevent editing snippetless website and show message
When starting work on a blank website, it was possible to start writing
text in the blank page. However that was never the purpose and things
behaved improperly from there.

This commit addresses that problem by consistently applying
contenteditable=false to the #wrap element when it is empty, and true
when it isn't.

At the same time it fixes the fact that starting with a non-empty page
and making it empty failed to show the empty editor message.

closes odoo/odoo#70933

X-original-commit: c9ab6ae3e1e1859c36a4f6e68a7cae25cf92a7b3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-18 08:11:47 +00:00
Antoine Guenet 3e76664d49 [FIX] web_editor, website: properly record history on col count change
When changing the number of columns of a snippet, the history was
recorded too many times and at wrong moments, resulting in a mess of
undos to trigger before restoring the original column state.
The issue was due a combination of dead code and the fact that
`_updateColumnCount` triggered `remove_snippet` for each of its columns
while `remove_snippet` in turn triggered a history step at every
execution.
This fixes it by removing the dead code, replacing it where necessary
with a call to the editor's `historyStep` method, and adding an option
to `remove_snippet` so its triggering of a history step can be bypassed.

closes odoo/odoo#70932

X-original-commit: 877e5c807087afed880aeba3eab79def3a7b583c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-18 08:11:26 +00:00
Antoine Guenet 231871ef98 [FIX] website: prevent out-of-bounds url autocomplete in linktools
Since the link tools were moved from the modal to the sidebar, the url
autocomplete dropdown stretched out of the bounds of the window.
This fixes that problem while restyling the dropdown to look like the
url pickers we already have in the sidebar. In order to achieve that,
we apply to it the "o_website_ui_autocomplete", used by
UrlPickerUserValueWidget (to which we don't have access in the toolbar).

closes odoo/odoo#70931

X-original-commit: 704583aad98287adac9e13772cfb8ca0933b0a32
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-18 08:09:25 +00:00
Victor Feyens 0348b95aee [FIX] *: update documentation links
Following the recent reorganisation of the documentation in 12.0+,
the majority of the documents have been moved and their old links are no longer valid.
Some redirection rules will soon be deployed, but those rules might be dropped in some years
and we want the links to still work, which is why we still replace the links to the new ones.

FW-Port of odoo/odoo#70675 (13.0)

closes odoo/odoo#70920

X-original-commit: bc9c1eef538ba6095e74c19d5d9ed9e01625ec7c
Related: odoo/enterprise#18361
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-17 19:26:27 +00:00