Commit Graph
1193 Commits
Author SHA1 Message Date
Romain Derie 3028e9a864 [IMP] website: introduce cookies bar on website
With this commit, it is now possible to activate a cookies bar on a
website through the res.settings.

The cookies bar can be edited in the frontend by entering edit mode.

The cookies bar will appear until the user clicks on 'I agree'.

Part of https://github.com/odoo/odoo/pull/41294
task-2087003

closes odoo/odoo#41294

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-29 14:53:38 +00:00
David Beguin c785373db1 [FIX] website: fix visitor _compute_time_statistics
This commit fixes the visitor's time_statistics computation. When creating a
new visitor, last connection datetime is not set, so it's not retrieved in the
search_read and crash at search_read_result[visitor.id].

This fix also speeds up and simplifies the time_statistics computation.
As time_connection_datetime is always set (for already created visitor) and in
the depends, no need to read values before looping, the data is already fetched
in memory. We can then use directly the value for each visitor in self.

Task ID: 2120464
PR #40199

closes odoo/odoo#43780

X-original-commit: 1f0c9f272ea5b6b7b891fcb8d00eb81e7fe33f81
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-22 15:17:14 +00:00
fja-odooandqsm-odoo 218e1cad61 [IMP] web_editor, *: allow saving of snippets
* website, mass_mailing, website_event, website_form,
  website_mass_mailing, website_sale

Now the user can save snippets to use them on other pages.

task-2120409

closes odoo/odoo#40408

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-01-16 14:29:04 +00:00
Romain Derie c86bff6a02 [IMP] website: load theme images also when module install through CLI
Themes image would not be shown correctly in the theme selection if the
`website` module was installed in CLI.
Indeed, the code supposed to load the theme images was done in the kanban view
during theme selection after installing module through apps screen.

Now, this code is encapsulated and called in post_init hook of website.
This was also needed for an improvement on `test_themes` module, see
https://github.com/odoo/design-themes/pull/195.

closes odoo/odoo#42206

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-07 16:11:52 +00:00
Toufik Ben Jaa 427e8d76a3 [FIX] website: avoid to instanciate env in request
- The module `website` instanciate the environment bound to
    request before `_dispatch` is called.
    This causes issues with with routes that create their own
    psycopg2 cursor.

    To be more precise, the issue that allowed us to discover this
    instanciation is linked to the module `auth_oauth`.

    The route `/auth_oauth/signin` is a `none` route that receives
    a database name. It uses the db name to create a cursor and
    an environment manually to process the OAuth signin, log-in the user
    then assume it is safe to now use `request.env` to process the rest
    of the code.

    But here, since a cursor has already been created in `request` before the
    route had the chance to commit its changes to `res.users`, the
    changes made in the route `/auth_oauth/signin` are not available.

    And this causes issues with the computation of the session token
    done in the method `_compute_session_token` in the model `res.users`.

    It uses the field `oauth_access_token` to compute the session token.
    But since, the cursor in `request` is in a transaction that is not
    yet aware of the changes made on this field, it will compute a
    session token using the old `oauth_access_token` and store this
    outdated token in the client's session.

    Then here depending if you are using a multi-worker or a multi-thread
    Odoo, you either are never signed in or your session is expired
    after a cache cleaning (the method `_compute_session_token` is cached).

closes odoo/odoo#42808

X-original-commit: ceec103826ae2a18c63b48c17850d035e352fa3b
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-01-06 17:38:59 +00:00
Jorge Pinna Puissant c34a1e7f2f [FIX] base, website: debug assets in multi-website/multi-company
Fine-tunning of 42eec88e5da164e4930c48113109f2c8d4b73da3

Before this commit, the assets were not found when the user is connected
in mode debug assets in a multi-website and multi-company. This occurs
because the attachments (assets) were created only for the first website
accessed, and cannot be loaded when trying to access the second website.

Now, the attachments are created for each website accessed and can be
loaded withtout problems.

closes odoo/odoo#42593

X-original-commit: 95077a8cdd9f2cd99c2ef85bdf7ca5d58e006b71
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-01-02 13:32:39 +00:00
David Tran f61ea1c38c [FIX] website_theme_install: use correct values for new menu creation
closes odoo/odoo#42486

X-original-commit: 0db925b4ecb63360fa764bc596fb3c0a4c0a63d1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 13:14:29 +00:00
Jeremy Kersten 546f3cac3f [IMP] website: redo res config settings
task-2088625

closes odoo/odoo#40715

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-12-17 17:07:30 +00:00
Jeremy Kersten 7921616aea [IMP] website: allow to submit sitemap to Google
partial of opw-2123610
2019-12-16 11:07:19 +00:00
Jeremy Kersten ab56c9e464 [IMP] website: add edit robots.txt in settings
task-2091358
2019-12-16 11:07:19 +00:00
Jeremy Kersten 361b711ffc [IMP] website: remove employee visibility level
You can use has_group(employee) instead

+ fix enumerate_page: when you search a page with visibility constraints,
you never seen it even if force was set to True.

task-2091365 again

closes odoo/odoo#41483

X-original-commit: f1c7a34f0b8276895c18ca6c450a142f9a815e3b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-12-06 09:48:05 +00:00
qsm-odoo 322d5768a7 [REF] website: call _post_copy with website in the context directly
Before this commit, the website was given as a parameter of the
_post_copy function which is called after theme install. It was then
transfered through the context when calling the theme sub' post_copy
function.

It makes actually more sense to directly call the _post_copy function
with the right website in the context instead of a parameter. This will
also allow to call enable_view/disable_view in the default post_copy
common to all theme, with the right website.

closes odoo/odoo#41312

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-12-05 16:32:39 +00:00
David Beguin 9830d924e9 [FIX] website: fix authentication of archived visitor
If a visitor logs in (and has a visitor_id in his cookie), the partner will be
linked to the visitor. If, after 1 week, the visitor tries to connect again
with a different session (or another visitor_id in cookies), the authenticate
will crash because

  * _cron_archive_visitors applies on visitor inactive since at least a week
  * there can be only one visitor per partner (sql constraint)
  * the visitor linked to the partner is not retrieved (because archived) and
  we try to link the partner to a new visitor.

Further than that, if the visitor is archived and the linked partner wants to
login again with a new visitor_id, we should

  * reactivate the previous visitor,
  * copy history from newest to previous one,
  * delete the newest one

Note that last two points were already done before this commit.

Task ID: 2120464
PR #40199
Fixes #40077
Fixes #40301

closes odoo/odoo#41273

Original-signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
X-original-commit: 53a6bed3b5c1ae09be490254ed09f18acbb970c4
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
2019-12-03 08:34:32 +00:00
Romain Derie 9b3de32478 [FIX] http_routing, website: fix frontend lang in http dispatcher
This commit fixes 2 issues, both coming from a misbehavior in
`get_nearest_lang()`:
1. Anyone could reach the website in a lang available in backend but not in
   frontend. Eg, french is activated but not a website lang, going to `/fr`
   would show the page in french.
2. As a logged in user coming from backend in a lang not available in frontend
   (has request.lang set to that lang), the website would show a 500 error page
   since it would not filter out the current request lang.

Both these issues are fixed here by ensuring langs are filtered out if they do
not belong to the frontend (website langs).

Step to reproduce (bug 1):
  - Install french in backend lang (not on website)
  - Visit `127.0.0.X/fr_FR`, the frontend will be displayed in french even if
    it not a lang available in frontend.

Step to reproduce (bug 2):
  - Install french on frontend and remove english from frontend
  - Navigate to the backend /web
  - Navigate to frontend, it will crash

Fixes #40572 and fixes #40078

closes odoo/odoo#41146

X-original-commit: 4bfba037fbbf34c178abd532f7bf52b94ae40b27
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-12-02 08:31:26 +00:00
Jeremy Kersten 56b4764b18 [IMP] website: allow to don't show specific view in name
and uses it in customize_show.

closes odoo/odoo#40887

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-26 14:39:28 +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
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
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
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
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
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
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
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
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
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02: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
fja-odoo 7d6479e175 [IMP] website, website_sale: Improve website tracking
The update of visit_count now uses website_track instead of
website_visitor_lastconnection for less complex query and better
precision.

The name of a visitor is now changed only if it has no partner linked
and the # is removed

The cookie was not reset when a new partner connects or if a partner
disconnects. Now a check is performed to ensure the cookie belongs to
the partner/public user.

Now website visitors that log in will be added to the previous
website visitor of the partner. This way we have a full history and only
one visitor per partner.

Now a partner is able to delete a recently viewed product from his
recently viewed product list.

task-2072877
2019-10-01 19:50:00 +00:00
fja-odoo fe1dddb1ec [FIX] website: allow visitor sort by last visit time
A visitor needs to be sorted by last visit datetime, to do so we need to
remove the temp table and ignore concurrent updates.

task-2072877
2019-10-01 19:49:46 +00:00
Jeremy Kersten be8fc2296b [IMP] base, http_routing, website: allow custom routing rule
After this commit, you will be able (in technical mode) to update the url for
the python controllers.

Eg.
You can now rename /shop in /garden and /shop/product/ in /garden/vegetable/

Most of urls will be replaced at fly in the renderd qweb, with the function
url_for but all old urls will keep available. So if you access url /shop you
will be automatically redirected to /garden (308 Permanent Redirect).

As for cdn and other post-process of att, the automatically replacement in the
rendered qweb is only done when you will be not website editor. But the new
dispatch of URL will be applied in all cases.

For developper, since it is Permanent Redirect, don't forget to clear cache or
open chrome debug tool (with option 'Disable cache while DevTools is Open) to
see your lasts changes.

closes odoo/odoo#36555

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-30 13:58:14 +00:00
Christophe Simonis f1c0b08504 [MERGE] forward port branch saas-12.4 up to bef26222b8 2019-09-25 16:53:26 +02:00
Christophe Simonis 257a382b5c [MERGE] forward port branch saas-12.3 up to dd627b9698 2019-09-25 13:43:26 +02:00
Romain Derie 964aa3d696 [FIX] website: make website selector work with scheme and port
Before this commit, if one would introduce a scheme or a port in his website
domain, it would make the website selector to crash JS side.

Indeed, it would replace the current url hostname by the website domain.

If the website domain was introduced with `http://` it would lead to
`http://http://mysite.com`.
If port was introduced, `http://mysite:8069:8069`.

Also, by fixing those 2, it also make `localhost` and `127.0.0.1` to work.
(which would not work without `http://`.

Related to #36390
2019-09-24 13:54:26 +00:00
Martin Trigaux ade9341212 [IMP] website: do not use a default name for visitors
See 'Webiste Visitor (date)' as display name
Remove default value as a way to easily detect if somebody has already
a name or not

Note using the id in the display name is a bad (may not be set yet)
but is used knowlingly as a short way to differentiate 2 visitors.

Linked to task id: 2073714

closes odoo/odoo#37230

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-23 08:14:43 +00:00
Martin Trigaux 33dc3bd995 [REV] website: revert commit 5b9a81a2
Comparing on translated string does not work as two people in different language
won't get the same result in the name_get
2019-09-23 06:15:09 +00:00
David Beguin 7f485c8d10 [IMP] website, website_* : improve visitor kanban view
This commit review the design of the visitor kanban view.
There is now two style for kanban card.
Ungrouped : the card takes all the width of the screen. It's simulate a nice tree view.
Grouped : Same design as before. ('normal' kanban card)

Apply visitor kanban views redesign also in :
- website_livechat
- website_crm
- website_sms

Task ID: 2073714
PR #37081

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-20 09:40:26 +00:00
David Beguin 5b9a81a2c6 [IMP] website : increment visitor name to be identifiable
This commit aims to rename the visitor that has no lead and no res.partner
to 'Website Visitor #id'.
So that the visitors can be identified when, for example,
an operator talk with multiple visitors.

Task ID: 2073714
PR #37081
2019-09-20 08:55:38 +00:00