Commit Graph
5528 Commits
Author SHA1 Message Date
Jeremy Kersten 3ff6efac8d [FIX] website: set controller favicon.ico as nomultilang
Avoid redirect from /favicon.ico to /<lang>/facivon.ico at each request

closes odoo/odoo#40535

X-original-commit: 94bcbc92e5e5a6fd3de7267e3c01f8c11fb045f4
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-19 18:29:20 +00:00
Martin Trigaux 49fbab5329 [IMP] base: split and deprecate load_lang
load_lang was a kind of hybrid method trying to active or creating a
language if not found. This was error prone.
Instead rely on two methods with clear purpose:
ResLang._create_lang(lang, lang_name=None)
  - create a new res.lang entry using the locale of the server
    return the res.lang record to match the API of _activate_lang

ResLang._active_lang(code)
  - activate the given code lang

Most of the time, _active_lang is what is expected

tools.trans_load_data and IrTranslation._load_module_terms no longer
activate the language if not active.
Loading the translations should be explicit on an activated language,
it is too error prone to silently activate/create a language if not
found.
Remove lang_name from trans_load_data as no longer needed.
2019-11-19 10:37:01 +01:00
Romain Derie e9106f8f98 [IMP] http_routing, portal, website: nicer 404 layout
This commit introduces a nicer 404 page, which is basically the same layout as
the one used on Odoo.com.

Also, the 404 is now fully customizable, blocks can be drag'd & drop'd.

task-1966460

closes odoo/odoo#38901

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-18 13:59:09 +00:00
Samuel Degueldre dfd98f49e7 [IMP] web_editor: rework background-sizing option
Previously, background size and position for snippets was configured in
a modal, the user could choose a "focus point", which is rather
unintuitive. They could also choose to use the "contain" background
mode, with or without repeat, or a third option, where they could
customize everything, from the background size in both directions to
whether to repeat the background in only one or in both directions.

This commit streamlines the background-sizing options, only the "cover"
and "repeat pattern" options have been kept, as they cover almost every
use case. Their configuration has been moved into the options menu for
consistency with the rest of the editor, and the background's position
is now chosen by clicking on the corresponding menu option, and dragging
the background to the desired place.

Part of https://github.com/odoo/odoo/pull/38959
maintask-2066614
task-2088304
2019-11-18 09:56:40 +00:00
qsm-odooandSamuel Degueldre 688e21b6e0 [IMP] website, *: add slide management buttons for carousel snippets
* web_editor

This commit adds a slide counter in carousel snippets option menu, as
well as left and right buttons, this way the user can manage their
slides entirely from the options, instead of having to go to the block
itself to navigate to where they want before going back to the option
menu to add or remove a slide.

Part of https://github.com/odoo/odoo/pull/38959
maintask-2066614
task-2088291

Co-authored-by: Samuel Degueldre <sad@odoo.com>
2019-11-18 09:56:40 +00:00
qsm-odoo c879ac723b [FIX] website, *: no theme color suggestions during theme colors edition
* web_editor

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:40 +00:00
qsm-odooandfja-odoo ea994b0cbb [IMP] web_editor, *: review 'colorPalette' editor UI
*: website, mass_mailing

Part of https://github.com/odoo/odoo/pull/38959
maintask-2066614
task-2087383

Co-authored-by: fja-odoo <fja@odoo.com>
2019-11-18 09:56:40 +00:00
fja-odoo 22c5fc5dd2 [IMP] web_editor, website: generalize colorpicker
Currently we have:
- a colorpicker for background color of snippets
- a colorpicker for foreground and background text (topbar)
- a colorpicker for menu/footer/navbar/etc
These 3 are separate colorpickers with different options.

After this Commit
All 3 will use the same color palette wich allow you to select
theme color, common colors, custom color and transparent filter.

Part of https://github.com/odoo/odoo/pull/38959
maintask-2066614
task-2087383
2019-11-18 09:56:40 +00:00
Samuel Degueldre f615cfda89 [IMP] website, *: rework snippet anchor system
* web_editor

Previously, the user could choose their anchor names using a modal
window, anchor names also have weird rules, this was not a great user
experience.

This commit makes the anchor button generate anchors automatically based
on the first title in a section, or the snippet name if there are none.
If the anchor name is already taken, it is suffixed by a number. After
it has been generated, it is also copied to the clipboard and the user
is shown a toast to tell them the anchor has been generated and copied.
The anchor is displayed in the toast along with an edit button that will
open the same edition modal as previously, but it is now less
restrictive.

Part of https://github.com/odoo/odoo/pull/38959
maintask-2066614
task-2088270
2019-11-18 09:56:08 +00:00
qsm-odoo bf5b4b6933 [IMP] website, *: introduce inputs in the left panel UI
* web_editor, website_sale

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo c47527b794 [IMP] web_editor: allow options to add UI in the overlay top bar
-> move the move buttons next to the drag button

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
Samuel Degueldre 7623f3ecf7 [IMP] website: add quick move buttons for sections and columns
This commit adds buttons to move sections up or down and to move columns
left or right, which is more user-friendly than drag-and-drop in some
cases.

Part of https://github.com/odoo/odoo/pull/38959
maintask-2066614
task-2088265
2019-11-18 09:56:08 +00:00
qsm-odoo c213afab86 [IMP] web_editor, *: review 'background' options' UI
* website

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo 72a2f417ae [IMP] web_editor, *: introduce select & checkboxes for the left panel UI
* website, website_blog, website_form, website_sale

+ introduce default UI for snippet options
+ refactor style of icon buttons

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo ed8133c72f [IMP] web_editor, *: allow snippet options next to clone/delete buttons
* website

Now snippet options can be defined as a button which can be placed next
to the clone and delete buttons, through a new "isTopOption" method.

This commit also review the buttons and title design and take advantage
of the feature to review the way snippets options are added in their
container (that code indeed contained useless part since 13.0).

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo c611d92191 [REF] website, *: remove useless palette title option
Not relevant anymore in the new editor UI.

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo d9bbdf15ad [REF] website, *: remove all snippet options UI icons
* web_editor, website_blog, mass_mailing

In preparation of the new left panel UI, remove all snippet options UI
icons as we do not want them anymore to simplify the UI.

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:07 +00:00
qsm-odoo abb3fabd7e [FIX] website: restore blog & event cover properties options editing
Changing the filter color and its intensity was not working anymore
because of failed JS refactoring when the logic was shared for both
blog posts and events in website.

closes odoo/odoo#40227

X-original-commit: 3296468beded14d4ef52d221ef8683941f12291c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-13 17:46:10 +00:00
Samuel Degueldre 5796441784 [FIX] website: fix crash when adding item to top menu
In 4d5c3b9fc1c5 the arguments of the MenuEntryDialog widget were
altered, and one instantiation of this widget was not adapted, resulting
in the last parameter being undefined and causing a crash. This commit
adapts that call.

closes odoo/odoo#40187

X-original-commit: ab7f501ff401cc1a85a95dd3cc65d80ecfeec2cc
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-13 12:19:31 +00:00
Xavier-Do aae1d57829 [REF] base: refactor check_xml and read_combined
View creation/edition represent a important part of an install and a lot
of possible view errors are not detected, like fields used in domain
filters. Some part of the code a difficult to maintain, and view checks
are splitted in multiple places.

This commit aims at refactoring view validation by regrouping most part
of the logic in ir_ui_view and trying to optimize the overall process.

Since most of the lines were touched, this task was also an opportunity
to modernize the API.

Main changes on method `check_xml`:
 - extract node processign and validation to individual postprocessor
 - add validation for filter node, buttons, ...
 - fix accessibility checks (and improve their performance)
 - move xpath check to specific Python node validator
 - clarify error messages (wip to continue)

Main changes on method `read_combined`:
 - optimize the search for inheriting views in a single query doing the
   whole recursive search

Indeed, after removing xpath validations, `get_inheriting_views_arch`
was the most expensive method in `check_xml`, spending most of the time
in `search` because of recursive calls to retrieve children views.

The view Backend Assets is a good example of the latter point, since a
line is added in the view for almost every module.  70 views (community)
are added at first level, `get_inheriting_views_arch` is efficient and
returns all 70 views.  Then at the second level, the method
`get_inheriting_views_arch` is called 70 times for nothing. 70 calls to
`search` (squared/2 since each view is checked independently) are almost
useless. The same case applies to the settings view.

As a result, the average module installation time is 25% faster, and the
average time spent in `read_combined` is almost divided by 2.
2019-11-13 16:11:46 +00:00
Xavier-Do eb2f0aabcf [FIX] *: various fixes in xml views 2019-11-13 11:05:14 +00:00
qsm-odoo db8904b03d [FIX] website, theme_default: restore website creation UI
Commit https://github.com/odoo/odoo/commit/88e910e187346c095a6f0eeb8be647da1e391035
merged the inheritance of a view into the base view while the inherit
was in fact a primary mode inherit. The modal buttons of website
creation modal thus appeared in all website forms by mistake.

This commit also takes advantage of the fix to fix the design of that
creation modal (wrong classes on buttons).

Also fixes https://github.com/odoo/odoo/commit/986415cf050efbd38a5834f9bbd3a37db1fd7933
which added a data file & folder in demo data by mistake.

closes odoo/odoo#40175

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-13 10:30:04 +00:00
Jeremy Kersten 96daa295c7 [IMP] website: improve install theme layout
task-2086939

closes odoo/odoo#40059

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-12 16:07:58 +00:00
qsm-odoo 88e910e187 [REF] website, *: merge website_theme_install into website
* theme_bootswatch, theme_default, website_theme_install
2019-11-12 15:53:13 +00:00
qsm-odoo 68b0f9cb65 [FIX] website: restore parallax previews in edit mode
When the user changed the parallax option, it was only updated on save.
So, the user was not able to have a preview of what he chose.

Note: this commit is made in saas-12.3 but does not fully solve the
problem there... and unfortunately I don't know why. It fully solves
the problem in 13.0 though and this is more important.

closes odoo/odoo#39995

X-original-commit: 4b633949cd4fd1cae807b95d233879ac4adc01ce
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-07 18:52:21 +00:00
Nicolas Martinelli 194627a247 [FIX] website: access website in multi-company
- Create 2 companies A & B
- Create a website A
- Create a user U with access to company B only
- Connect as U and go to the website

An internal server error is raised.

This is due to 7bfcb53db37f385a99 which verifies if the user isn't
granted access to companies he is not supposed to access.

This is exactly what was done before this commit: the website is in a
company not allowed to the user.

opw-2116539

closes odoo/odoo#40004

X-original-commit: debc516c47b522bd9b4b9fef365ad11462916174
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-08 09:16:27 +00:00
alt-odoo 4b0fdffe59 [FIX] website: display archived website visitors
When computing time statistics, we need to look for
archived website visitors also to avoid a KeyError
if we use the default 'Archived' filter.

closes odoo/odoo#39970

X-original-commit: fe4d9bd25de45f1748ea010c51c8871bb3d14b9a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-07 14:36:43 +00:00
fw-bot 596b3723f2 [FIX] website: link dialog over image adaptation
Adapt website for 13.0 9996d04fd2 change of LinkDialog constructor
arguments (to get back to same arguments as in 12.0).

opw-2086444
closes #39888

closes odoo/odoo#39910

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-07 07:53:34 +00:00
Odoo's Mergebot cfc65bd1b7 [MERGE] various: Make the test suite demo data independant
Purpose
=======

This is the first huge step to improve the test suite in several ways:

- Make them demo data independent, allowing to modify the demo data without having to adapt the tests depending on it. It also allows to have a beautiful + convenient demo dataset to make a demonstration, and to configure complex data in the tests to manage the corner cases.
- Improve the test performances by converting them into SavepointCase. Each test will be rollbacked to it's initial state, after the setUpClass call. That way the different data are not re-created at each test for nothing.
- Introduce several test classes in base/tests/common.py to launch a TransactionCase, HttpCase or SavepointCase test with an available demo user, portal user or a large set of partners.
- This is the first step to tend to a rolling release process, allowing to execute the tests (or a subset of the tests) on a migrated base, for example.

closes odoo/odoo#39868

Taskid: 2075739
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-07 08:37:12 +01:00
qsm-odoo c83eb1bd44 [FIX] website: avoid flickering when switching slide in editor
Before this commit, when an user clicked on a control button to go to
another carousel slide, the overlay ended at the wrong position and
multiple scrollbars appeared. This occured because bootstrap fires the
'slid.bs.carousel' event too soon, because it emulates the transition
end event with a setTimeout. So on a normal computer, this occured:

- User click on control button, transition starts.
- slid.bs.carousel is fired -> we retarget the edition to the new active
  slide and reposition the overlay... but that slide is still moving
  as the transition is not really finished.
- The transition finishes, the overlay is at the wrong position, outside
  of the screen.

Actually, this is more complex than than because our own system checks
transition end events to reposition the overlay. Even if unperfect,
we now have:

- User click on control button, transition starts.
- slide.bs.carousel is fired -> we enable the parent carousel instead of
  the current slide (this DOM element is not moving).
- slid.bs.carousel is fired -> we know it is fired too soon, so we wait
  an extra 20% of the time between 'slide' and 'slid' before retargeting
  edition.
- The transition finishes, the overlay is still over the carousel and
  not the active slide.
- Our extra 20% duration ends, we retarget edition to the current slide
  and reposition the overlay (should not move since normally at the same
  position as the carousel itself).

Part of https://github.com/odoo/odoo/pull/38997
task-2090180
2019-11-06 12:26:27 +00:00
Samuel Degueldre 958c850f9f [REF] website, web_editor: refactor (quotes) carousel snippets
Previously, the carousel and quotes carousel snippets were the only ones
that were not enclosed in section blocks. This had a number of
undesirable side effects, such as editing the anchor on the carousel
breaking the carousel functionality, and the inability to separately
choose a background for the carousel itself and individual slides.

I also used this opportunity to move controls relative to the entire
carousel onto the carousel itself rather than the individual slides. The
sizing_y (vertical padding) will however keep targeting individual
slides, as the carousel uses the height of its tallest slide, and also
because padding on the carousel will not get covered by slide
backgrounds and saty blank, which is unwanted.

Lastly, most of the snippet options for the carousel were rewritten, as
they were quite broken. There was some compatibility code for saas-3
left, some useless events were bound to the controls, even though they
were already handled through event-delegation at the document level.
Finally, most of the edition features were broken on duplicated
carousels since the onClone method wasn't reassigning most of the things
it needed to.

Part of https://github.com/odoo/odoo/pull/38997
task-2090180
2019-11-06 12:26:27 +00:00
Yannick Tivisse 05ae347bdd [IMP] website: Adapt tests to work with/without demo data 2019-11-05 16:18:10 +01:00
qsm-odoo 02e0a31665 [FIX] web_editor: put the snippet editor UI at the correct DOM position
Commit https://github.com/odoo/odoo/commit/4f27e52cabb77b8b1a9637a11185ddf882adc9af
had to instantiate the snippet editor UI differently but the hack broke
the position of the oe_manipulator which is supposed to be at the top
left of the editable zone.

closes odoo/odoo#39775

X-original-commit: 86d12706729c256a8ea1103575db9817961a2ff2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-04 17:16:21 +00:00
Romain Derie 5e3d6c0032 [IMP] web_editor: stay on editor on snippet install
In the editor, the snippets from uninstalled module are shown with the
possibility to install the module to get snippet.

Before this commit:
When clicking on it, it will redirect to the module page, in the backend from
where you can install the module.

Now:
A popup will be shown to save current changes and install the module.
The installation will be done without changing page, in the editor. Once done,
the page will reload in editor enabled mode.

task-2089285

closes odoo/odoo#39138

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-31 10:02:09 +00:00
qsm-odoo 768655c0d3 [FIX] website: remove breaking z-index of parallax elements
Commit https://github.com/odoo/odoo/commit/c3c98e937e575853fe0b25fa6cb3c916e73fc591
introduced a z-index on parallax element to restrict the z-index -1 of
the s_parallax_bg in the snippets... this was however a bad idea as it
also restricts other positioned elements in there (like dropdown menus)
making them go under other elements in the page.

Fortunately, this z-index is in fact not needed at all since the
z-index -1 mentioned above has been removed with another commit:
https://github.com/odoo/odoo/commit/22745668cf66d802899dac526d810eba64b28c4b

However, the z-index -1 was necessary to force the s_parallax_bg under
static elements that go after it... and this was solved in 12.0 by
making those relative elements. See snippet refactoring in 12.0 with
https://github.com/odoo/odoo/commit/4dce6cc98b2b95a00249ac29245305e08f288e6c#diff-a50ffff96791f36c6dbe5c9273135e5aR783

closes odoo/odoo#39617

X-original-commit: 3ddc722f390c85166dab9bd9fe762d908161fbb8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-30 19:52:04 +00:00
Christophe Monniez 8d5da6e4be [IMP] tests: log a warning when HttpCase test in at_install
When loading a page on an existing starting database, registry is not
fully loaded causing potential error when trying to access model
existing in database (views, menitem, ...) since model added in last
loaded module does not exist in registry.

Thus, executing browser js test may lead to errors when executed during
an update on a database with other modules installed.

HTTPCase should be executed post_install to ensure that registry is
fully loaded to avoid this problem.

Since HTTPCase are slower than other test, it is also a good idea to
execute them at the end, in order to prioritize fast fail.

With this commit, a warning is isued if such a test class is tagged to
run at install time.

While at it, remove deprecated at_install and post_install helpers and
remove the deprecated phantom_js alias.

closes odoo/odoo#39462

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-30 12:35:23 +00:00
Jeremy Kersten 931e62fa91 [FIX] website: switch page_id from menu on cow
Before this commit, if you had a page_id set on a menu, and that you
fork this page, the page_id from the menu was always pointing to the
previous one, so you see old page, but edit new page.

> Reproduce:
>     Fork Contactus (Page_id on menu become wrong)
>     Refresh contact us (done on save btw)
>     You see old content
>     Edit with Html Editor, you sill see that forked view exists!

Bug was hidden before that we set page_id on menu, but it is needed if
we want to support the groups visibility on the menu item.

closes odoo/odoo#39472

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-29 16:41:57 +00:00
Jeremy Kersten e239934abe [FIX] website: allow to modify the visibility of a page
Now, you can define a Visibility mode between:
    Public (All poeple)
    Connected (Portal or Employee)
    Restricted Group (Has this group or is Employee)
    With Password (Know password or is Employee)
    Internal Users (Is Employee)

It is a 'fair' feature, but without really warranty that the content is
really unreadable via others methods, ...

It is more for frontend display, that real secret. Dont use this like
a keychain ;)

We only catch the visibility on the main view and not the t-call inside.

Even if it should work on controller too, it is only display now on the
page property menu. (Or on the view directly in backend)

task-2091365
2019-10-29 16:04:47 +00:00
Jeremy Kersten e19227d3ba [IMP] website*: clean sitemap
From now, you need to explicitely add sitemap=True if you want your controller
into the sitemap.

It's the default value, but if you forgot it, it will raise a Warning on runbot.
It will avoid wrong controller in sitemap and duplicate (empty) content.

From now, if your model contains a field website_id, the modelConverter for
sitemap will automatically add the domain:
   "[('website_id', 'in', (False, current_website_id))]"

It avoid redundant declaration and ugly url in redirect/rewrite view.

Migration: need to remove it from url_from in website.rewrite

task-2065018

closes odoo/odoo#39427

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-28 10:36:56 +00:00
qsm-odoo 118bff26dc [FIX] website, *: restore website js loading
* web_editor

Commit https://github.com/odoo/odoo/commit/7e2b0ebe7996c9fa35f75949b7fc8cd5a58d7c36
broke the website JS loading as it added a dependency to a lazy loaded
JS module which was not even always lazy loaded.

A test so that this does not happens anymore will be made in another
commit.

Related to task-2092386

closes odoo/odoo#39391

X-original-commit: 5ac269d722f9ff8c206215dd1c07b8544cfd5382
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-25 14:40:53 +00:00
fja-odoo c86d37c755 [FIX] web_editor, *: fix the theme colorpicker
*: website

Inherited colorpicker were not used due to the context missing the
website_id and the method call being used instead of call_kw.

task-2092386

closes odoo/odoo#39357

X-original-commit: 7e2b0ebe7996c9fa35f75949b7fc8cd5a58d7c36
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-24 17:20:59 +00:00
Nicolas Martinelli d6c54f4311 [FIX] website: GA key
`_` is not available when loading this part of the template, leading to
an error on `_.str.trim()`.

We can simply use `trim()` to do so. By the way, `google_analytics_key`
is now trimmed automatically when adding it in the settings, so this is
only useful for migrated databases.

Fixes #38891
opw-2089296

closes odoo/odoo#39269

X-original-commit: a492047e9a064beecbe0611c3f7aef5172406eb1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-23 15:09:03 +00:00
qsm-odoo 7f60eaa2a4 [FIX] website: solve asynchronous action demands in the editor
Since saas-12.3, deferred actions use native promises. This has the
annoying side-effect of force-deferring promises even if they are
resolved at once... and we relied on the opposite behavior for some
call made in _setActive or option methods.

In master, we should review the async logic of snippet options. Right
now we will rely on the fact those promises are resolved at once but
that we need to avoid for their "async part" anyway. The _setActive
method and the option methods are thus still working synchronously in
stable, despite the new force-deferring promises.

Also, with old promises, when we waited for the resolution of multiple
deferred, the resolve handler received the multiple results as
individual arguments. Now it receives all the results in an array as
a single argument. The resolution of action demands had to be adapted.

closes odoo/odoo#39171

X-original-commit: 30d15315a73c1fa34ada86371b06c02b6375db89
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-22 11:35:38 +00:00
Jeremy Kersten 2cab9a8341 [FIX] website: clean sitemap
followup of 8a0fc6476c70a4126043de3b3efbd1096e41f968

task-2065018

closes odoo/odoo#39211

X-original-commit: bfa239b59c4d02c2b03ab8a84b52bc8f77704e41
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-22 16:36:37 +00:00
Jeremy Kersten 708759d82a [IMP] website: connect with search google easily
You need to provide a small part of the code, because to avoid fraud, google
make several request to be sure that you don't allow all codes :)

So the 'WPS' solution was dropped, now we take the first request from google
that match the part provided, as the good one, and refuse all others requests.

task-2086915

closes odoo/odoo#39186

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-22 13:49:45 +00:00
Jeremy Kersten fef7ec7c97 [FIX] website,*: remove useless route from sitemap
preparation for cleaning of v13
task-2065018

closes odoo/odoo#39051

X-original-commit: 8a0fc6476c70a4126043de3b3efbd1096e41f968
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-18 14:59:02 +00:00
Romain Derie 7cce59a3c3 [FIX] website: prevent traceback if xml homepage view has no page
The XML file homepage view record is not supposed to be deleted as it is used
to bootstrap newly created website.

If that view is deleted, everything's fine. But if that view's page is not
found (m2o link broken somehow), then the code would crash.

This would only appear if the user is playing in the backend in technical but
it seems to happen more than it should.

This commit will prevent the code to crash in such a case.

Step to reproduce:
1. Go to settings > technical > views (debug)
2. Find the xml homepage view (with xml_id)
3. Go to its website.page and break the m2o view_id
4. Try to create a new website, it will crash

opw-2081894

closes odoo/odoo#39149

X-original-commit: 1d4dd200c664b99dbdb3e65e3950be1cb5e79a0a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-10-21 23:21:45 +00:00
Romain Derie ed5b6c9695 [IMP] website: make test works with more website than the data ones
Those tests were raising an assert error if the DB has other websites than the
data/demo ones.

As we have a new module in Odoo 13.0 (odoo/design-themes#178)
which is creating 25 websites, and since the design-themes runbot is now
running tests, we were having a red design-themes runbot.

closes odoo/odoo#39145

X-original-commit: 67df6b91ddb6cb83d558137691481f50834f7fca
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-10-21 20:57:03 +00:00
Martin Trigaux 3a7bb6aefd [I18N] *: export 13.0 source terms
closes odoo/odoo#39118

X-original-commit: cfc887dc2032aac4f5894ade017dadab7a413557
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-21 12:12:48 +00:00
Romain Derie ace7f03bab [FIX] website: make test works with more website than the data ones
This test was raising an assert error if the DB has other websites than  the
data/demo ones.

As we have a new module in Odoo 13.0 (https://github.com/odoo/design-themes/pull/178)
which is creating 25 websites, and since the design-themes runbot is now
running tests, we were having a red design-themes runbot.

closes odoo/odoo#39008

X-original-commit: 5c7b446363fbec7b2a76a579794e0fac20d05271
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-18 08:34:59 +00:00