Commit Graph
6704 Commits
Author SHA1 Message Date
Sébastien Mottet (oms) 23915c7113 [IMP] website: add saas version in calls to website.api.odoo.com
The saas version of the client is added in each call to
website.api.odoo.com. This allows the server to return
different results based on the client's saas version

task-2602521

closes odoo/odoo#75617

X-original-commit: 6e1ae856584048912cb5eaf53c0aa027b2342b5c
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-26 10:21:38 +00:00
qsm-odoo ea108e3910 [FIX] web_editor: review snippet drag and drop technical flow
This commit completes [1] by further reviewing the drag and drop
technical flow order:

- The content_changed event should be triggered before starting snippets
  as well as it is only useful to signal the snippet modifications made
  by onBuilt.

- The undroppable snippets update which was done first could probably be
  done anywhere -> best to put it at the end when everything in the DOM
  is done, and it is also the last thing the user expects to be done.

Note: in the new editor the role of 'content_changed' became however
unclear and should be further reviewed. This commit fixes problems with
the old flow in master though (problems around removing items in a
snippet during its onBuilt call).

[1]: https://github.com/odoo/odoo/commit/60d7bf6d7daea83db9332b4fc47a4ac6892d21d7

closes odoo/odoo#75596

X-original-commit: efdfe261afd933972869305fd3358c764f7c18c3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-26 10:21:32 +00:00
Xavier-Do fdaee845d5 [FIX] base: remove options parameters
Regarding previous commit, the option parameter can be removed
from _get_asset_content api, followed by a nice snowball effect.

Part-of: odoo/odoo#75248
2021-08-26 10:21:10 +00:00
Benoit Socias 1aa9a7d76d [FIX] website: avoid losing link focus when clicking on popover
Before this commit clicking between the buttons of the link popover
widget did deselect the link. When this happened, if edit was clicked
and the edited link was one within the popover widget instead of the one
on the page.

After this commit clicking on the popover between the buttons has no
effect anymore.

task-2630257

closes odoo/odoo#75544

X-original-commit: 536f72333297ea70cd06c83d92ab0d8f25c0142e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-08-25 12:02:03 +00:00
qsm-odoo 085f388b5e [FIX] website: ensure more robust link popover creation
Somehow, trying to forward-port the work done at [1] makes it impossible
for the link popover tour test to pass (although that test already
existed in the version where that original work was merged). It's
unclear why the test did not fail before but hopefully it did here: this
reveals a race condition in the editor code where the link popover is
fully shown to the user while clicking on some of its button would have
no effect... because those rely on clicking in the editor panel which is
potentially not up-to-date yet.

This commit fixes the problem in a hacky way, waiting for the editor
panel to be updated before showing the popover but it should not be
necessary in a better refactored codebase.

[1]: https://github.com/odoo/odoo/pull/74861

Part of https://github.com/odoo/odoo/pull/74959
2021-08-24 09:27:35 +00:00
c90ab7b664 [IMP] website: add templates for masonry snippet
Add an option in the masonry snippet's allowing to choose among multiple
templates for the snippet layout. The usability of the snippet also has
been reviewed (restrict the ability to control background on deeper
boxes). Also reviewed the bg-200 use on boxes and replaced them with
a preset as otherwise it seems buggy to not be able to remove the
bg-200 by selecting a preset (other than hitting the trash icon in the
colorpicker).

Part of https://github.com/odoo/odoo/pull/67361
task-2463033

closes odoo/odoo#67361

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: smottet <oms@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-08-23 12:20:17 +00:00
qsm-odoo bebb45e6d5 [FIX] website: restore the masonry snippet's options
Since [1], it was not possible to control the color of colored boxes in
the masonry snippet. Hopefully, the new selector to exclude some options
on "snippets inside snippets" is now more limited.

[1]: https://github.com/odoo/odoo/commit/58503a248e7ab6b66d61d00869cdae6719e5a068

Part of https://github.com/odoo/odoo/pull/67361
task-2463033
2021-08-23 12:13:14 +00:00
dht-odoo 3147fb4237 [IMP] {website}_livechat: improve action helper messages
This commit improves action helper message for visitors menus of
website and removes old action helper message from visitor menu
of livechat for better onboarding.

Menus

1) Visitors(action -> website_visitors_action)

Task-2584073
PR odoo/odoo#74082

Related: odoo/enterprise#20125
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 13:11:15 +00:00
qsm-odoo 3845b650e6 [FIX] website: make robust IDs for visibility conditions on snippets
As nicely pointed by @kig-odoo at [1], the new feature of snippet
visibility conditions introduced in [2] has some issues. This fixes
the fact that condition identifiers were built by combining IDs without
a separator. A condition targeting a lang with ID:4 and another one with
ID:5 could thus produce the same condition identifier as another
condition targeting a lang with ID:45 (as 4 and 5 side-by-side makes
45...). Now, all parts of the identifiers are separated with '_'.

[1]: https://github.com/odoo/odoo/pull/67140#issuecomment-902531321
[2]: https://github.com/odoo/odoo/commit/1c442782f887a8c16bae05a43fae13a310ac05df

closes odoo/odoo#75386

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-20 12:14:24 +00:00
Romain Derie fd54179ceb [FIX] website_mass_mailing: improve configuration usability
1. The option to change newsletter becomes a select instead of a button that
   open a modal
2. If no mailing list exists, we show a warning and user can be redirected to
   the backend to create one if he wants.
3. Add name to the snippet so it is not "Block" in the right panel

Community: https://github.com/odoo/odoo/pull/74667
Upgrade: https://github.com/odoo/upgrade/pull/2742
task-2246975

closes odoo/odoo#74667

Related: odoo/upgrade#2742
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-08-20 12:05:23 +00:00
Romain Derie 8873fe7240 [IMP] (website)_mass_mailing: make newsletter popup use popup snippet
Before this commit, the newsletter popup was using its own mechanism instead of
the popup snippet, making a lot of extra code.

Now, the newsletter popup snippet just use the behavior of both the popup
snippet and the newsletter snippet.

Community: https://github.com/odoo/odoo/pull/74667
Upgrade: https://github.com/odoo/upgrade/pull/2742
task-2246975
2021-08-20 12:05:06 +00:00
Sébastien Mottet (oms) 8c10765ef9 [IMP] website: avoid colors mitigation for configurator logo
The algorithm extracting primary and secondary colors from
an image automatically mitigates too bright colors. A color
component is considered as too bright if its value is above
an arbitrary value. We re-use this algorithm in the website
configurator to extract colors from logo and to generate a
palette. In this particular case we don't want the mitigation
to be applied. We therefore added the mitigation threshold as
a parameter of 'extract_image_primary_secondary_colors' and
avoided any mitigation by setting it to 255 in our case.

task-2602521

closes odoo/odoo#75255

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-19 09:23:27 +00:00
qsm-odoo 4628812ec9 [FIX] website: remove misleading comment (gradient variables)
closes odoo/odoo#75276

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-18 16:22:30 +00:00
Sébastien Mottet (oms) 9b01803649 [IMP] website: remove 'damier' background of configurator logo preview
task-2602521

closes odoo/odoo#75241

X-original-commit: 8d985769267087b24a9bab0a638f3b3d91c10f98
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-18 10:53:08 +00:00
qsm-odooandBenoit Socias a48a30f954 [IMP] website, web_editor, *: allow to use pre-configured gradients
*: web

After this commit pre-configured gradients can be used as snippet
backgrounds, snippet filters or as text effects / highlight effects.

The background colors (and now gradients) are now possible to add
*alongside* a color combination class (editing one does not remove the
other). Background colors and gradients are mutually exclusive.

Part of https://github.com/odoo/odoo/pull/73611
task-2599770

closes odoo/odoo#73611

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
2021-08-17 17:43:50 +00:00
Ivan Yelizariev 889cc9be80 [FIX] website: allow submit sitemap to non-first website
closes odoo/odoo#75184

X-original-commit: 81bd6a589bab99418ffba63307684d228ebc718a
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-08-17 11:03:10 +00:00
Ivan Yelizariev 0f3ea5e1f4 [FIX] website: allow edit robots.txt to non-first website
Previous implementation always updated *current website*, which is not
always the same as the value from `res.config.settings`.

---

opw-2623007

X-original-commit: d66d44db031be76403ce7c01616e334ef196fd03
2021-08-17 11:03:09 +00:00
qsm-odoo 6b89b53b63 [FIX] website: properly mark selected color for menu, footer, etc
When a color combination was used as "color" (base case) for the menu,
the menu background in the boxed template, the footer or the copyright
section, it was not properly marked as selected in the color palette
widget of the editor panel.

Related to task-2599770

closes odoo/odoo#75157

X-original-commit: 04c476a11a084c825725cae89e104e9f205c685b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-16 14:54:44 +00:00
Jeremy Kersten d310a7adc6 [IMP] website: handle images_preview_theme for recommended_themes
closes odoo/odoo#74887

Related: odoo/design-themes#482
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-10 09:37:48 +00:00
Odoo's Mergebot 8aaffd16cb [MERGE] *: remove read access on ir.model.*
Remove read access on `ir.model`, `ir.model.fields`, `ir.model.fields.selection` and `ir.model.data` for employees.
To access such records, the code must use the helpers (`_get`, `ref`,...) instead of CRUD operations directly.

Simplify the helpers to ir.model.data that were public and redundant.
self.env.ref is encouraged instead but with the slight drawback that `ref` makes a call to `exists()` (`_xmlid_lookup` can be used if this wants to be avoided).

Part of task-id 8203

closes odoo/odoo#69120

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-10 21:12:46 +02:00
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02:00
Sébastien Mottet (oms) d46097eb73 [FIX] website: remove useless lang attr in configurator template
The attribute lang was set in the template website.website_configurator.
This is not needed. This commit therefore remove this code.

task-2602521

closes odoo/odoo#74931

X-original-commit: d65efdb9896664cba132a08fe85dad6baa348f3b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-10 12:24:29 +00:00
Romain Derie cfe4a47702 [REM] website: remove unused compute
The field was removed with 15aae7ea34

closes odoo/odoo#74875

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-09 15:10:26 +00:00
f57a13f3f6 [IMP] website: add the possibility to share coupon and promotion links
Coupons and promotion programs can now be shared by creating a link that can
directly be used by the customer.

Using the link, the system will try to apply the coupon/promotion to the
customer's order.
If this can't be done, the error will be shown to the user, for instance
"A minimum amount of 1000$ is required to get the free ipad".
That coupon/promotion will then be stored in session and the system will try
automatically reapply it when something is added to the cart.

task-2489749

closes odoo/odoo#69053

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2021-08-09 14:16:54 +00:00
qsm-odoo ebf8d67485 [MOV] website, *: merge the website_animate app into the website app
*: tools

The app received many fixes and its code was improved and cleaned. It
was about time to include it directly into the website features.

task-2215118

closes odoo/odoo#74697

Related: odoo/design-themes#478
Related: odoo/upgrade#2709
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-05 14:59:10 +00:00
Romain Derie 0c883a4417 [FIX] website: remove s_facebook_page snippet from test
It creates race condition, as it contact external ressource, in this case
facebook.com.

Tests should never call external services anyway, it always lead to race
condition.

closes odoo/odoo#74704

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-08-04 12:49:23 +00:00
Gorash 7df343dd1b [IMP] base: QWeb _render return Markup unicode instead of utf8 bytes
In order to limit encoding decoding, the _render method returns a
unicode string in the markup safe object instead of a MarkupSafeBytes

closes odoo/odoo#68299

Related: odoo/upgrade#2454
Related: odoo/enterprise#17270
Signed-off-by: Antony Lesuisse (al) <al@openerp.com>
2021-08-03 16:20:22 +00:00
Gorash 5913b7265e [REF] base,*: refactor Qweb engine
* Remove AST in favor of pure Pyhon. This should make it easier for
developers to understand and create new directives because they do not
need to know AST.

* Remove `t-call-options` as it has been merged into `t-options` for more
consistency. Support for t-call-options is retained.

* Use generators for lists. This increases performances as the rendering
can be sent directly without having to wait for the creation of the
entire list.

* Optimize expressions runtime computation by pre-computing the static
parts.
Example:
'<' + 'div' + '>' + '<' + dynamic_value + '>'
Now compiles as:
'<div><' + dynamic_value + '>'
2021-08-03 15:37:54 +00:00
Samuel Degueldre ce5599926a [REF] web, website: remove legacy DebugManager and use new DebugMenu
Previously, the debug manager was rewritten with the new webclient
architecture, however, because the frontend did not have access to the
new infrastructure (env and services), the old debug manager was kept
and used only in the frontend.

Since odoo/odoo#72675 the new env and services are now available, this
commit simply uses the new debug manager in the frontend and removes the
legacy code.

closes odoo/odoo#74609

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-08-03 14:03:18 +00:00
Benjamin Vray 5149afbf92 [IMP] website: remove the toaster saying the page is published
task-2574300

PR-73234
2021-08-03 14:10:58 +00:00
Nicolas Lempereur 7ea7e79541 [FIX] website: special character ok in menu label
Edit a website menu label with:

    & < > " ` '

This is what is shown after saving:

   &amp; &lt; &gt; &quot; &#x60; &#x27;

This is happening since ea4dbcd240: characters &, <, >, ", `, and ' are
now always escaped. Before that commit, only < and > where escaped and
only when an image was inside the label.

With this change, we unescape the label when we are editing a menu.

opw-2609413

closes odoo/odoo#74558

X-original-commit: ab77054987287444c5f6141b047a63bab4b67baa
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-08-02 11:35:51 +00:00
Benjamin Vray da22414233 [FIX] website, *: prevent bottom fixed elements from hiding buttons
*: web, website_livechat, website_sale_comparison

Before this commit, bottom fixed elements (e.g. the livechat button)
hid the buttons to go to the next step in website sale when these
buttons are located at the bottom of the page, on some screen sizes.

After this commit,

- A bottom fixed element is hidden if this element hides a button at
the bottom of the page.

- Bottom fixed elements are hidden if a modal is open
to prevent it to hide buttons or any important part of the modal.

task-2501400

closes odoo/odoo#74515

X-original-commit: a851db9495fe9d8c1951f218a71e4d4a427cf96d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-30 17:24:48 +00:00
15aae7ea34 [IMP] website: organize links in menu & footer on configurator apply
The configurator takes care of the organization of the links to the different
pages. Some links are put in the menu and some are put in the footer. The order
is predefined. If too many links are present in the menu then a sub-menu 'Company'
is created and some links are put in it. For the 'News' and 'Succes Stories' features
a website specific blog is created.

Links have the following order in the menu and are present only if their corresponding
website.configurator.feature has been selected in the configurator excepted for the 'Home'
and 'Contact us' links which are default links:
- 'Home'
- 'Shop'
- 'Event'
- 'Courses'
- 'Services'
- 'Pricing'
- 'Company': if more than 8 links in menu and more than 1 item in this submenu
             otherwise the three following links are in the top menu.
  - 'News'
  - 'Success Stories'
  - 'About us'
- 'Appointment'
- 'Contact us'

Links in footer:
- 'Privacy Policy'
- 'Help': if website_helpdesk installed. This is not a website.configurator.feature.
- 'Forum'

Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930

task-2518565

Co-authored-by: Sébastien Mottet (oms) <oms@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
2021-07-30 13:51:33 +00:00
Romain Derie 59098dbc60 [FIX] website: avoid commit, reset env, reload registry for no reason
Before this commit, if the configurator was applied without a module to install
it would still go through `_button_immediate_function()` which does

```
self._cr.commit()
api.Environment.reset()
modules.registry.Registry.new(self._cr.dbname, update_module=True)
```

for no reason, even if `self` is an empty module recordset.

This code is taking ~5 seconds.

This flow will occur when you either:
- Create a new website when selecting only page feature
- Create a new website when some modules feature are already installed

Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930

task-2518565
2021-07-30 13:51:25 +00:00
Romain Derie 460d5ecb92 [IMP] website: add tests for all snippets (drag and drop)
Image gallery snippet when dropped is throwing a traceback.
This lead to the editor not usable anymore, as any JS error will prevent any
further action (no JS will work anymore).

This introduce a test that will drag and drop every snippet in a page and click
on it to load its settings in the right panel.

Note that it will remove the snippet before drag & dropping the next one, as
having too many snippet will impact the perf, even killing the browser entirely
if there is a lot.

task-2604383

closes odoo/odoo#74135

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-30 13:43:24 +00:00
Arthur Detroux (ard)andqsm-odoo 1c442782f8 [IMP] website, *: add visibility options on sections
*: web_editor

Provide the user with an option to hide or display a section tag
depending on the visitor's location (if geoip enabled), language,
utm_medium, utm_source and utm_campaign.

Users can use a M2M widget to select different records. These will be
used to create a CSS selector on save that will hide the section tag
depending on the various options they selected.
This CSS selectors will be applied, as well as various data attributes
when the page loads to hide the targeted tag. All of these operations
are handled client side.

The geoip country had to be added to the session for the feature to work
with countries.

Part of https://github.com/odoo/odoo/pull/67140
task-2381049

closes odoo/odoo#67140

Related: odoo/enterprise#19907
Related: odoo/upgrade#2658
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-07-30 14:03:42 +00:00
Gorash 73a821abf6 [FIX] website: avoid traceback when going to options of some themes
Issue: traceback when website editor is entered and theme options are
clicked on themes using an unknown-to-the-editor font family (see for
the theme repo fix for such an example).

opw-2559735

closes odoo/odoo#74423

X-original-commit: c664cf1a1fb4b6781fe2802e66c993cfa1a4a028
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-29 11:34:01 +00:00
Nicolas Bayet 3b6088dede [FIX] website: properly autocomplete url from LinkDialog
task-2586134

closes odoo/odoo#74327

X-original-commit: a6cc59d4efb7d63cdfe08d7bec496d048f1ae43d
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-07-27 15:45:12 +00:00
Julien Banken dbf81af435 [FIX] website: prevent auto-filling the 'Contact Us' form with 'false'
On the 'Contact us' form of the 'website' module, the client can
auto-fill the fields with the 'false' text string when the logged
partner has some missing values. This happens because the server
set the missing values to 'false' and the client directly uses those
values to update the form fields.

To solve the issue, the client will replace the falsy values set by
the server with an empty string before updating the form fields. That
way, the form fields will no longer be filled with the 'false' text
string.

task-2610948
Fixes 116d55d62fd411d3be5d9f0885dadac530839b99

closes odoo/odoo#74256

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-27 09:52:11 +00:00
Swapnesh Shah a9f7796d55 [FIX] website: do not allow to create/edit views
Before this commit,
User was allowed to create new records from form view through
Graph view' action. Since we do not have a way to prevent opening
form view from Graph and also we should not Introduce new form view
on stable version.

With this commit,
we are disabling create/edit/copy from action.

closes odoo/odoo#74288

X-original-commit: e8c5302e5cb11f185d1d5b1ef43ab641b2be6f76
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-07-26 20:49:48 +00:00
Jeremy Kersten 3c5167733f [FIX] website: fix anchor display + remove useless query
Before this commit, anchor select on link dialig was never shown
-> xpath done on attribute class but t-attf-class is used

Now we show the anchor input.

This commit also avoid useless anchor detection for empty url and external url.
Or in case of the selected url is the same than the last one loaded.

E.g. type /contactus -> load anchor -> choose one identicalfrom list
     before -> reload anchor
     now -> we don't refresh anchor screen

X-original-commit: 8e11a0b

closes odoo#74164

closes odoo/odoo#74272

X-original-commit: 6c930e72b7d00f7beb4c43024c52a3e6c44a35f4
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-26 16:57:01 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Romain Derie 26dee545aa [FIX] website: unset menu/page m2o if menu url is a controller
Setting a controller URL to a menu which is linked to a page should unset the
m2o relationship to preserve the page URL.

Step to reproduce:
  - Create a page (with a menu) and save, eg: "My Page" (url will be /my-page)
  - Edit that new menu and change the URL to /shop (or any controller)

Issue:
  - The page URL is now /shop, which doesn't have a lot sense if there is a
    controller for that URL.
  - Unpublishing the website.page will unpublish the menu, as a menu needs its
    page to be published in order to be visible.

Note: The flow introduced here is the same as if you choose an URL of an
      already existing page, the menu's page will be unlinked from the menu and
      left with its original URL.

task-2575974

closes odoo/odoo#74163

X-original-commit: b52a01f76d89ebb7bdd75577e60a09f048c83000
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-07-26 17:34:19 +00:00
Dhruv Patel 0b911fe04a [FIX] website: traceback on non html page set as a link
Currently, when you add a link in any of the buttons on the website with
non HTML/XML page, it will raise the traceback as we fetch the content to find
id to propose as a list of anchors.

Reproduction Steps:
1) Add a button on the website using the editor.
2) Add link in URL (i.e. /robots.txt)
3) Traceback

With this commit, When you add the non HTML/XML page to any of the link
will not raise the traceback.

task-2596392

closes odoo/odoo#74194

X-original-commit: 5f78c19995cc6d1fe480b982176e0701bd4d3e86
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-23 17:23:07 +00:00
Holden 3b14eee027 [FIX] website: move set_View_track to correct asset
Anonymous website users do not have access to the Customize menu
obviously, but the website.set_view_track widget still attempts to
extend the CustomizeMenu.

Now, set_view_track module is only loaded into editor assets instead
of frontend assets.

closes odoo/odoo#74186

X-original-commit: b7d485cf0280d388cdaab1723ac759e53dea04fc
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-23 16:27:11 +00:00
Jeremy Kersten fa40411a33 [FIX] website: remove ir.asset specific on unlink
New system of ir.asset doesn't clear specific website asset on uninstall.
Now when we delete a website, we delete relate ir.asset.

task-2611030

closes odoo/odoo#74180

X-original-commit: 4e2df51a5f57bb8dde792e59295c20f3104bf4e2
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-23 15:24:41 +00:00
Jeremy Kersten f0a484f7ae [FIX] wesbite: fix wrong encoding from page generated by configurator
Before this commit, some snippets that contains special charactere like –
was wrongly displayed, since we removed the call to pycompat that did a
decode('utf-8') in previous version.

closes odoo/odoo#74041

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-20 13:14:06 +00:00
stefanorigano (SRI) d570c7eba5 [FIX] website: apps switcher dropdown, allow vertical scroll
odoo/odoo#73748
task-2604186

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-15 08:27:54 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
ijas ahammed 3e37cb92c8 [FIX] website: avoid traceback when clicking on stat buttons
Prior to this commit, if we go to visitors form view and clicked on
stat buttons like offline/connected or visits, a traceback was
thrown because the buttons are meant for showing stat only, they
aren't linked to real actions / methods. It used to work before, but
the recent traceback is result of more strict checks from the web-client
re-write. See the original commit[1] for more information.

This commit sets 'disabled' attribute on the buttons, and keeps the action
from being performed for display-only stat buttons.

commit[1] - https://github.com/odoo/odoo/commit/0573acae2306bf5da2005852da9323ddc59e5431

TaskID-2593552

closes odoo/odoo#73813

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 10:04:53 +00:00