Commit Graph
5441 Commits
Author SHA1 Message Date
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
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
qsm-odoo a27c0fd0fc [FIX] website: remove 1px gap below mega menus
task-2075949

closes odoo/odoo#37534

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-27 15:05:36 +00:00
f402afd7b5 [REF] website_event, *: review event design and features
* event, website_event_questions, website_event_sale,
  website_event_track, base

Part of https://github.com/odoo/odoo/pull/37009
task-2043872

Co-authored-by: qsm-odoo <qsm@odoo.com>
Co-authored-by: Jérémy Kersten <jke@odoo.com>
2019-09-27 13:36:37 +00:00
qsm-odoo 80f54f563a [REF] website_blog, *: move editor "fix" in blog to website
* website

Part of https://github.com/odoo/odoo/pull/37009
task-2043872
2019-09-27 11:49:53 +00:00
qsm-odoo 08cc073369 [REF] website(_blog): make most of the cover_properties system generic
This commit moves most of the logic of cover edition to website. This
will allow to define cover on other non-blog models, like events.

Note: this also "accidentally" fixes a crash during rendering of the
blog page when there is no blog or post.

Part of https://github.com/odoo/odoo/pull/37009
task-2043872
2019-09-27 11:49:53 +00:00
Martin Trigaux 6378c8fb25 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#37502

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-27 11:58:55 +00:00
David Beguin c250df13f4 [IMP] website, website_sms : improves visitors views
Add send mail and send sms buttons in visitor tree view.

Task ID: 2075858
2019-09-25 11:17:26 +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 f8aba7b347 [FIX] website: make 'Go to website' redirect to correct website
Before this commit, 'Go to website' in website module dashboard might not
redirect to the correct website.
It would just redirect to `/` (href) without forcing the website selected in
the dashboard.

task-2063252
Closes #36390

closes odoo/odoo#37359

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-24 13:59:23 +00: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
David Beguin 03c2f101bd [IMP] website : set kanban view as default for website visitors
Task ID: 2074582

closes odoo/odoo#37340

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-24 14:05:54 +00:00
qsm-odoo 67dabea1dd [IMP] website: use preconnect for faster google fonts loading
With the PR this commit is from, websites now always use a google font.
Adding a preconnect to the google fonts cdn allows to increase page
loading speed.

Part of https://github.com/odoo/odoo/pull/37293
task-2069043

closes odoo/odoo#37293

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-24 08:44:28 +00:00
qsm-odoo 87b05cf224 [REF] website, *: improve use of unicode support font
* web, theme_bootswatch

Improvement of https://github.com/odoo/odoo/commit/02a321cffb2da60a86b960e75c445e37094567b4

- Clarify the name of the support font (to distinguish it from standard
  and google fonts and avoid confusion with Noto Sans and Noto Serif).

- Make sure the support font is added and can be added for all font
  definitions in odoo scss files thanks to a scss function.

Could be backported in 12.0 if judged necessary.

Part of https://github.com/odoo/odoo/pull/37293
2019-09-24 08:44:28 +00:00
qsm-odoo cf60a783fc [REF] website: make the google font "Roboto" the default website font
Before this commit, the default font for the website was the bootstrap
one, which is a series of many fonts which should at least contain one
which is present on every user system.

The problem is that commit https://github.com/odoo/odoo/commit/ed18095127b20da516fa5ada943b2dd6d5c84652
added the definition of a Roboto font, available in all assets... and
Roboto is part of the bootstrap font. This added a new font loading on
page load and that loading is not optimized at the moment. This thus
broke our work to improve google pagespeed ratings.

This commit replaces the bootstrap font with a forced Roboto font whose
loading is handled by an optimized loading of the related google font.
This also improves the very default font of the website by making it
more stable accross different browser (we will always use the loaded
Roboto font instead of relying on the user system fonts).

Part of https://github.com/odoo/odoo/pull/37293
2019-09-24 08:44:28 +00:00
Martin Trigaux c667e95224 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#37274

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-24 07:33:09 +00:00
Christophe Simonis ac4fc6e7c7 [MERGE] forward port branch saas-12.3 up to bd3e510edb
closes odoo/odoo#37314

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 09:44:56 +00:00
Odoo Translation Bot e41f468972 [I18N] Update translation terms from Transifex 2019-09-22 06:10:13 +02:00
Christophe Simonis d67b2483e5 [MERGE] forward port branch saas-12.4 up to 9ed4872ea0
closes odoo/odoo#37372

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 17:45:37 +00:00
Nicolas Lempereur af163d5a9e [FIX] website: boxed title style for splitting
When a title with boxed style (border arround title) is split (by doing
normal ENTER (and not shift ENTER which work as expected)) the title
being in inline-block for styling purpose, this give odd results (of
several title boxes on the same line).

With this commit style is changed so split title are on different lines.

opw-2070611
closes #37084

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-18 13:17:18 +00:00
Christophe Simonis 080f8b1f96 [MERGE] forward port branch saas-12.3 up to d8ce75466e 2019-09-17 17:49:09 +02:00
qsm-odoo d1e5231e49 [FIX] web_editor, *: restore crop dialog
* website

Following the new editor merge at https://github.com/odoo/odoo/pull/29775
(which was finally partially reverted for 13.0), the crop dialog was not
working anymore on sub-sequent crop. This was due to 2 things:

1) Re-cropping an image that was just cropped now

The original source of the recently cropped image is saved as temporary
jQuery data on the image element. Unfortunately, for some strange
reason, that image is cloned before any edition and thus lose that data.
This commit fixes the problem by cloning the data too... supposing the
orignal clone is there for a reason.

2) Re-cropping an image that was saved before

This did not work anymore simply because... the cropped images were not
saved in database anymore but saved as base64 data in the view... For
some reason, the cropped images to save were searched in the original
DOM instead of the edited DOM...

Also fixing the random use of a mutex.

Discovered while working on task-2059480

closes odoo/odoo#36878

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-13 14:07:00 +00:00
Odoo Translation Bot 5f1638e42d [I18N] Update translation terms from Transifex 2019-09-15 06:21:03 +02:00
Yannick Tivisse 5cc0c447aa [IMP] website: Improve test robustness
Purpose
=======

A lot a demo data are added in enterprise for the Belgian company.

It implies for example a private address for a Belgian employee for
Mitchell Admin.

This commit improves the test to work even with this new demo data.

closes odoo/odoo#37088

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-23 09:03:44 +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
Odoo Translation Bot 974261f7e9 [I18N] Update translation terms from Transifex 2019-09-22 01:19:57 +02: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 368c4be99b [IMP] website : remove is_connected filter by default in visitor views
In order to see all the visitors, we remove the is_connected filter.
So that a visitor that disconnect 2 sec ago can still be visible.
Anyway, there is a connection status in the views.

Task ID: 2073714
PR #37081
2019-09-20 08:55:38 +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
David Beguin 17e8402523 [IMP] website : store visitor timezone
In order to be able to send push notifications using recipients timezone,
the visitor timezone is now stored in DB.

The visitor timezone is only updated once, when found_visitor_timezone
cannot be found in localstorage. Once the timezone is updated,
found_visitor_timezone is added to localstorage.

Task ID : 1936643
PR #34973
2019-09-20 14:44:56 +00:00
qsm-odoo 721bf25543 [FIX] website: fix slideshow and styling gallery options
- When the 'square' option was selected, it was not marked as active
  with the checkbox icon.

- The slideshow speed was not marked as active correctly and the option
  was not working anymore (this was due to other improvements made to
  the gallery snippet recently that revealed the bug).

task-2070647

closes odoo/odoo#37011

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 14:34:47 +00:00
David Beguin 73505303f8 [IMP] website : send mail to visitor linked to res.partner
This commit allows to send an email to a visitor
directly from the visitor form view if the visitor is linked a
res.partner that a valid email address

Task ID: 2056080
PR #36290
2019-09-17 14:12:20 +00:00
David Beguin 6f5abf933b [IMP] website,livechat : apply various imp and fix on visitor views
Applies various improvements:
  - Remove welcome message if chat request usecase.
  - If a visitor is online: line is green / if offline: line is red (in the list view)
  - Visitors list view: add first / last connection fields and remove time_since_last_action
  - Avoid useless leave notification if the livechat channel is empty

Fix
  - ACLS on website_visitor_page model (for im_livechat_group_user)
  - ACLS on website_visitor and website_visitor_page model (for sales_team.group_sale_salesman)
  - Update visitor lang if visitor change the website lang.
  - Create visitor twice when translated website (due to rerouting)
  - Avatar for visitor banner in discuss. (image_64 instead of old image_small)

Task ID: 2056080
PR #36290
2019-09-17 14:12:19 +00:00
17237ff31c [IMP] website, *: allow to set background video to snippets
* web_editor

This commit adds support to set background videos to all the snippets
that already support setting background images (except on parallax
background for now).

task-1920630

closes odoo/odoo#36261

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Varun Raval <var@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-09-17 12:06:17 +00:00
qsm-odoo 57f92e2a8b [FIX] website_blog, *: restore blog/post cover edition
* web_editor, website

Editing the cover images or sizes was not working anymore. When it
worked, it was thanks to the 'o_dirty' class appearing magically on a
cover part... and that magic seems to be gone.

This commit fixes the problem by adding the 'o_dirty' class on all
elements whose content is changed, not only the editable ones (this is
the case for the blog cover: it is a non editable element whose bg
image can be changed).

Note: this also fixes the edition of multiple covers (of different blogs
or posts) at the same time (this could be backported in 12.0 if needed).

closes odoo/odoo#36999

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 11:15:42 +00:00
fja-odoo 6b73ab03f8 [IMP] website: add swap parameter to fonts import URL
Google fonts now support custom font displaying, which allow us to
swap the font when it is loaded. Especially useful for high latency
connections.

Ref: https://addyosmani.com/blog/google-fonts-font-display/

task-2069043

closes odoo/odoo#36696

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 08:16:18 +00:00
Christophe Monniez 698a68614c [FIX] website: move rte_translator test to post install
When executing test on an existing database with other module installed,
browser_js test tends to crach because not all models are available
in registry. A wip will force all js test to be executed in post_install.

This will also have a side effect that make rte_translator test
fail randomly more often since more module are installed, fix is done
in next commits.
2019-09-16 13:28:30 +00:00
fja-odoo e33172e832 [IMP] website_sale, *: keep track of products viewed
*= website, website_livechat, website_rating

///// Tracking Product /////

Now when a user browse products in eCommerce, we keep track of the
products he looked at. We use the website_visitor
to store the products viewed. A cookie is added with a TTl of 30 min it
will prevent the RPC for that time. We track the page only if the
product view is tracked.

The recently viewed products are displayed as a snippet but also
with the customize option in product pages of website_sale.

Products that are in cart will not be returned as recently viewed.

It is possible to add a recently viewed product to the cart directly
from the carousel, it will not redirect to the cart. If we are on the
cart page, the product is displayed in the cart.

The Visitor page in website now references products viewed

///// Tracking Page /////

Feature to track a view was remove in: https://github.com/odoo/enterprise/pull/4834

That feature is now reintroduced and will use website_track instead of
leads to be stored.

The track field is now on the view instead of the page.

url field is added to website.track, it will store the url for pages and
views

The Visitor page in website now references urls viewed

Add some tests

task-1984575

closes odoo/odoo#35810

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-16 09:38:53 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Martin Trigaux 73e70673e7 [I18N] *: export saas-12.5 source terms
closes odoo/odoo#36853

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-13 11:38:37 +00:00
Christophe Simonis 5a273e74f0 [MERGE] forward port branch saas-12.4 up to fe59754c52
closes odoo/odoo#36721

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-13 13:32:51 +00:00
qsm-odoo ee33597ec9 [IMP] website: vertically center the images in gallery slideshow
Note: the design of the whole snippet should be improved

Part of https://github.com/odoo/odoo/pull/36803
task-2070930

closes odoo/odoo#36803

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-12 16:31:57 +00:00
qsm-odoo d394b9f087 [REF] website: only show relevant option according to gallery mode
Refactor the whole _setActive method of the gallery snippet option and
make sure only relevant options are shown (for example, disable the
column option in slideshow mode or the interval delay for masonry mode).

Part of https://github.com/odoo/odoo/pull/36803
task-2070930
2019-09-12 16:22:56 +00:00
Kaushalya Mandaliya 710406e935 [IMP] website: UX improvements in Optimize SEO Dialog
Added cursor pointer when hovering a keyword in Related Keywords and
added relevant tooltip for the better user experience.

Renamed classes:
js_seo_keyword_suggestion -> o_seo_keyword_suggestion
js_seo_suggestion -> o_seo_suggestion

task-2070946
closes odoo/odoo#36709

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-12 10:58:57 +00:00
David Beguin 7759db881d [REF-IMP] website, website_crm : handle visitors at merge leads and readd page_views stat button on leads
In order to keep all the visitors from all the leads to merge,
the relation between leads and visitors becomes a many2many.
So that after the lead merge, a lead can have multiple visitors.

This commit re-add the page view stat button that were removed
during website_visitor introduction and page tracking refactoring.
This button counts all the pages views from all the visitors linked
tho the current lead. Clicking on it redirect to the complete
navigation history, from all visitors linked to the lead.

Task ID : 2057428
PR #36180
2019-09-11 14:12:06 +00:00
Christophe Simonis 9bf0b04adb [MERGE] forward port branch 12.0 up to 82a8cdd6f2 2019-09-06 17:52:48 +02:00
Sébastien Theys c6bb103eac [IMP] website: avoid computing multi_website_ qcontext if not useful
Those values are only used on the website navbar when the user is in both groups
so the vast majority of the time they are done for no reason.

This reduces the number of queries by 2 on every page when the user is not admin
and/or multi website is not enabled.

Part of task-2061122

closes odoo/odoo#36483

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-05 14:53:16 +00:00
Jorge Pinna Puissant 92990ad30e [FIX] i18n: missing Slovenian translation
Slovenian language, as many others languages, is not present in the
beta/master projects in Transifex.

For some reason, Transiflex removed all current translations, this was
already fixed in 12, but as there are not automatic forward-port for
translations, this is a manual forward-port.

opw-2060055

closes odoo/odoo#36374

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-03 11:32:39 +00:00