Commit Graph
5500 Commits
Author SHA1 Message Date
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
Jorge Pinna PuissantandLucas Perais d00a832952 [FIX] website: access to themes images
Since 62c9dedafd, when accessing a website
connected as portal or public user, the themes images are not showed. An
error is arose 'Sorry, you are not allowed to access documents of type
'Attachment' (ir.attachment)'.

Now, the portal and public user have access to the themes images.

opw-2082468

closes odoo/odoo#39025

X-original-commit: 9b8c390cd5526556346356f260a9cfe1b90cd510
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
2019-10-18 11:01:15 +00:00
Samuel Degueldre 86681cd0b4 [IMP] website: add option to stretch or unstretch sections
Snippets with side margins look quite compressed between full width
snippets. This commit adds an option in the side-menu to control whether
a section is stretched or not. This option is available everywhere it
would have a reasonable visual impact (the cutoff was arbitrarily chosen
to be that the stretched section is at least 5% larger than the
unstretched version)

task-2080570

closes odoo/odoo#38852

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-18 10:25:08 +00:00
Xavier-Do d65fcfecb6 [FIX] web: avoid expensive 404 during js tests
A 404 will take 3 to 5 seconds to be resolved and execute +- 1900 query, to return
a rendered page which is quite expensive, especially when multiple missing images
are rendered in a view.

Catching static route and marking them as not frontend will help to avoid to handle miss
on static resources. In this case server returns a standard 404.

This commit also fix a iframe src in order to avoid a 404 on
/web/(test )/report/html/some_report (thx to aab-odoo)

X-original-commit: 818d0cb59fbae78d0edf06318082981f318e4db7
2019-10-17 17:10:06 +00:00
Jeremy Kersten 3a7033463e [FIX] website: allow authenticate in json multidb
Before this commit launch a server with --db-filter that match at least 2 dbs name
Try to authenticate

You will have an error request is unbound when you try to access request.env

Now we retrieve the user from self instead of the request.

New test to ensure rpc authentication is tested.

Related to commit 245ef4b1

closes odoo/odoo#38969

X-original-commit: 4b3400c430bec7539aada0619fd203978daca2d8
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-17 15:35:11 +00:00
Jeremy Kersten 3233c46d4b [FIX] website: Missing module in Apps
closes odoo/odoo#38971

X-original-commit: 562a2ac270ef8aac3afde05625008cef64f62f89
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-17 15:36:04 +00:00
qsm-odoo b2a403efc7 [FIX] website_blog: make latest posts snippet multi-website aware
The snippet was using the posts of all websites and blog post creation
was suggesting all blogs. Now:

- On blog post creation only suggest the blogs of the current website
- In latest posts option, only suggest blogs of the current website
- In any case, latest posts only displays posts of the current website

Part of https://github.com/odoo/odoo/pull/38510
Related to task-2083198

closes odoo/odoo#38794

X-original-commit: 4be97b48861a6631fe465054c62baea65bfc1524
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-15 12:55:04 +00:00
Lucas Perais (lpe) 2f40948022 [FIX] website: oe_no_empty only in edit mode
Test case;
The user as edition rights on the website
Install quotation builder
Have a sale order with many lines
Click preview > you end up on the portal view

Before this commit, there was a blank space just before the
sale order lines per se
This was because the sale order's lines website description
were in the dom and took some fixed space, which is a feature
meant for the edit mode by using the class oe_no_empty

After this commit, we restrict the effect of that class concerning
the fixed height only to edit mode
There is no more gaps in the sale order preview

In master, one should check whether the class / rule is still relevant

OPW 2082267

closes odoo/odoo#38435

X-original-commit: 4b177412235cdf3e62f5ff30c18246c003c25cc2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-10 16:47:03 +00:00
Sébastien Theys ab4a59b0ea [FIX] website, website_theme_install: fix theme selection in settings
Follow up of commit a3845ae3f0

Issue
=====

Since the above commit there is a confirmation dialog when clicking on a button,
for which the only options are to Discard or Cancel.

The problem is that when discarding it will revert the selected website back to
the default value. Therefore before the current commit it is impossible to
install a theme on a website other than the first.

Solution
========

The solution is to avoid showing this dialog when clicking on buttons for which
the result depends on the currently selected website. This leads to the same
behavior as what existed before the mentioned commit: the settings are
implicitly discarded because they are not saved, but at the time of the click
the transient model still holds the non-discarded value that the user selected.

This restores the "select a theme" feature, but also restores the unfortunate
side effect that the user might unknowingly loose all of his pending changes
when clicking on the button, but only for those two specific buttons.

Other considerations
====================

Saving instead of Discarding was considered but it is impossible to do because
saving might do a lot of changes that might even lead to the installation of
modules, so the settings page has to be reloaded to apply them, and then the
website field will be reset to its default value again.

Instead of changing website specific settings from the main settings, it was
considered to update them through a form view, but it is apparently too
complicated for on-boarding.

The last consideration was that the settings view should actually mark the
corresponding fields as unchanged when changing the website, but it is too
complex to implement for a case that is not supported in the first place,
especially for a fix in a stable version.

task-2083198

closes odoo/odoo#38745

X-original-commit: 2298ef19bcd9e7a14958dce9a93cea69258064d8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-10-14 17:55:58 +00:00
Lucas Lefèvre d133df5819 [FIX] website: Display duplicate login error message
When you try to create two users with the same login, the shown error message is
the Postgresql integrity error instead of a nice (translated) validation error.
This happens since bf88f3e which changed the way error messages are translated.

The reason is the manually created unique index `res_users_login_key_unique_website_index`.
The error handling and translation mechanisms don't know it exists.
The index was created for performance reasons in commit b5a12b4 where the
original python constraint was replaced with this custom SQL index.

In this commit, the python constraint is re-introduced to remove the index hack,
but the implementation now uses a single SQL query, which should be quite fast.

closes odoo/odoo#38737

X-original-commit: 817a811ec98b0c313b12e6464b5e98ca432cb3fc
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-14 16:30:38 +00:00
Sébastien Theys f294ccdb03 [FIX] website: ensure the cache of the pages stay consistent with COW
This is necessary when writing view fields from a page record because the
generic page will put the given values on its cache but in reality the values
were only meant to go on the specific page. Invalidate all fields and not only
those in vals because other fields could have been changed implicitly too.

Pr: #37363
X-original-commit: 83f9a3e2608db34a319b985271d73f7de5bc73a1
2019-10-11 17:42:04 +00:00
Nans Lefebvre dcca8ae272 [FIX] website: fix _update_visitor_last_visit concurrency issues
Install the website, install a second language.
Switch the language on the website: error 500.

The function opened a new cursor, to update website_visitor.
It did so at the end of the query dispatch.
However when switching the language of the website, the lang is written on the
website visitor. This is done at the flush, done at the end (exit) of the query.
This is done on the cursor that was used for all the transaction.
Therefore that write would systemically fail on a
ERROR: could not serialize access due to concurrent update

opw 2080986

closes odoo/odoo#38453

X-original-commit: cc88a36744dc3c2949c47e8b163e1de98f5dbd95
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-11 07:33:40 +00:00
qsm-odoo d499779e7e [FIX] website_mass_mailing, *: fix display of backend popup edition
In the backend, when a mailing popup was being edited, it was not
centered in the edition area (and went under the editor UI) and was not
using the correct style.

task-2083465

closes odoo/odoo#38449

X-original-commit: 6ccf3b618b4b0774deccb4f75bf33f3ea4dc8b75
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-11 06:45:11 +00:00
qsm-odoo b0fc1cd455 [FIX] website: make background videos in mega menus work
When a background video was used in a mega menu, it was only working in
edit mode. Indeed, the background video size is computed on page load
(and on window resize) but as the video is inside a hidden dropdown
menu in this case, the size cannot be properly computed.

This commit fixes the issue by recomputing the video size on dropdown
menu opening.

task-2080590

closes odoo/odoo#38314

X-original-commit: 66ec1c19b63fe26e559ed2d8d7359df974ade789
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-10 06:26:21 +00:00
Andrea Ullianaandqsm-odoo af847832e8 [FIX] website, *: force website UI dropdown style
* web_editor

The purpose is to force our dropdown style in our UI so that themes do
not break it anymore (same way all the other elements are forced (cards,
headings, etc)).

task-2059538

closes odoo/odoo#38321

X-original-commit: 4ef0eac5ba134f462f72f3e9c60e5c9fc95f3a8c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-10-10 06:28:50 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Romain Derie f4105eb9c7 [FIX] website: prevent endless loop if homepage is unpublished..
.. and first menu is a container with # as url.

There is a particular case where the / url would loop endlessly.

1. Unpublished the homepage /
2. Edit the menu so the first menu is a container. There is a hint telling you
   a container menu should have its URL set to `#` as a good practice.
3. This will lead to endless loop for public user as the code will check if the
   homepage can be accessed. Since it is unpublished, it will then fallback on
   the first menu which is not '/' and redirect to it.
   Sadly, the code was not expecting `#` to be handled as `/`.

opw-2081969

closes odoo/odoo#38234

X-original-commit: cff11bdb66f1dda41cf333a28b67df7ef20a3de9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-10-08 16:54:07 +00:00
Jeremy Kersten bb5ceeaa1b [FIX] website: restore 'Add Features' feature
Since commit 07631a5, category has been updated, but not the filter of this action

task-2081177

closes odoo/odoo#38223

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-08 13:50:02 +00:00
Jeremy Kersten fd7d9dc47b [FIX] website: rename old name redirect_type
Missing diff in last commit.
    redirect_301 -> has been renamed to 301
    redirect_302 -> has been renamed to 302
    rewrite -> has been renamed to 308
    not_found -> has been renamed to 404

To be coherent everywhere and because this value is used as http code into
the werkzeug redirect call.

closes odoo/odoo#38061

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-07 10:31:03 +00:00
Martin Trigaux 42417956c0 [I18N] *: export 13.0 source terms
closes odoo/odoo#38028

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-07 07:55:34 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
mreficent 41c434cd5d [FIX] v13 urls
Was still pointing to old links

closes odoo/odoo#37859

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-03 12:48:09 +00:00
Romain Derie ae6db1a5f4 [REM] account, project, sale, *: remove dead code 'return_label'
Since Odoo 9.0, the `return_label` in url was not working anymore.
What it did before 9.0 is add an item in the breadcrumb which once clicked
would redirect to the frontend.
This was handled in the `do_load_state` of the action manager in JS.

We don't need to reimplement that behavior as now we have the 'Go to website'
stat button. Thus we remove the code.

Closes #36325

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 07:13:27 +00:00
Romain Derie 9b38bcec12 [IMP] website, website_*: improve edit in backend feature
*base, website_blog, website_event, website_forum, website_slides

With this commit:
1. It is now possible to add the 'Edit in backend' entry in the frontend navbar
   for any desired model, not only the ones which have the published mixin.
   It will simply redirect to the main_object form view.
   This commit add it to Forum and Blog.
2. When clicking on 'Edit in backend', it is now possible to land on another
   module than Website.
   That's especially useful for events and slides which are not directly
   related to the website module as they have their own module.
3. Remove the custom Edit in backend from the forum homepage (fa-cog).
   Opportunity was also taken to remove the 'edit welcome message'.
   It will now be editable through the editor (welcome message will appear in
   edit mode). Thus we got rid of the custom edit welcome message controller
   and views.

Closes #36325
2019-10-02 07:13:26 +00:00
Kishan Gajjar 083c5bddb7 [IMP] social_media, website_*: remove google+ mention
Google+ was shut down for business use and consumers.

closes odoo/odoo#36271

See: https://plus.google.com/
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 10:14:12 +00:00
Pierre Paridans 245ef4b0fd [FIX] website: check uid on request.env
Without this commit, connection with mobile app crash
since there are no uid set on the env.

_is_public_user expecting singleton.

closes odoo/odoo#37756

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 09:32:58 +00:00
fja-odoo 423402f1e5 [IMP] http_routing, *: move error pages to http_routing
* = portal, website, test_website, account, sms

Portal an Survey error pages were ugly default pages.
Now the error pages will be the same as the website ones.

Also fixing single module builds tests

task-2059969

closes odoo/odoo#35535

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 06:59:15 +00:00
Jeremy Kersten eded0294ab [FIX] base, website: fix routing redirect
Redirect_type was renamed from 3xx to redirect_3xx, but name is used as http
status code. It is better a redirect(301) instead of redirect(redirect_301)

Re-add the bind_to_environ, it was removed because it seems not useful, but
once you are behind a proxy, werkzeug need the environ to find the correct
hostname and more ... Transformed relative url into absolute by werkzeug was
wrong.

closes odoo/odoo#37733

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-01 15:53:04 +00:00
fja-odoo 950f252ba6 [FIX] website: rename user_partner_id -> partner_id
It is just a partner_id not a user related field

task-2072877

closes odoo/odoo#37102

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-01 19:50:00 +00:00