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.
closesodoo/odoo#36555
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
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#36390closesodoo/odoo#37359
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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
* 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
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
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>
* 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
closesodoo/odoo#36878
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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.
closesodoo/odoo#37088
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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>
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
- 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
closesodoo/odoo#37011
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
* 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
closesodoo/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>
* 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).
closesodoo/odoo#36999
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*= 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
closesodoo/odoo#35810
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
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
closesodoo/odoo#36709
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The anchor option was available on column so that you can target a
column which wraps on a new line in mobile... but we decided to remove
the feature as it complexify the UI.
Also fix a small bug: it was not possible to hit "save" when not
changing the anchor name of an element (an error message was displayed
to say it is already used in the page... while it is in fact used by
itself).
Part of https://github.com/odoo/odoo/pull/36515
* web_editor
When starting a drag and drop in the editor, a series of dropzones
appear to indicate to the user where he can drop the block being
dragged. In the website editor, when an editable structure is empty,
it is filled with a message to indicate we can drag and drop something
in there. The problem was that this message and the design that comes
with it disappeared when starting a drag and drop as it was replaced by
the editor dropzones. Now, the 2 are combined: when a dropzone appears
in an empty editable structure, the message and its design are kept and
just changes color and animation to match the one of an editor dropzone.
Part of https://github.com/odoo/odoo/pull/36515
task-2057320
The tour try to click on the language dropdown before the reloading of the
page if the server is slow.
To fix it, we avoid the reloading by the rte, and trigger the reload
in '_reload' method of editor menu who add the class 'o_wait_reload'.
We add a selector and trigger in the test to avoid undeterministic error.
closesodoo/odoo#36098
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Fixed backgrounds are disabled when using a mobile/tablet device,
which is not a big deal but, on some of them (iOS...), defining the
background as fixed breaks the background-size/position props.
So we enable this only for >= XL devices.
We may want to find a better alternative for future versions.
opw-2055073
closesodoo/odoo#36187
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the code that was supposed to close the dropdown in the
navbar when scrolling was not working anymore.
Indeed, it would removes the `show` class from the `nav-item dropdown`
(dropdown menu entry) but not from the `dropdown-menu` (dropdown content).
Fixes#35320closesodoo/odoo#36069
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
For some reason, with the recent changes and reverts with the editor,
some CSS ended up lazy loaded even though it was needed straight ahead
(switch, customize modal, etc).
This commit restores the assets structure that worked before. Note:
the website.edit_mode.scss file is however kept in the lazy loaded css
even though it was not like that before. The part that should not be
lazy loaded in it is moved to another file.
task-2064157
closesodoo/odoo#36368
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Allow users to create complex website menus, also known as "mega menus".
Mega menus are enabled individually via the edit menu dialog, then their
content can be customized by dragging snippets in them like any other
snippets area in edit mode.
task-1925319
closesodoo/odoo#36097
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Andrea Ulliana <aul@odoo.com>
Since saas-12.5, with recent ORM changes, writing on non-existing fields
does not trigger a warning anymore but instead crashes. This revealed
that the 12.0 "Edit Menu" dialog was doing some of that. Indeed,
depending on what was edited, we ended up writing on the 'is_homepage'
field, the 'text' field, the 'isNewWindow' field, ... which do not
exist.
This commit takes advantage of the fix to also lint the dialog code and
convert some of it to ES6.
Discovered while working on task-1925319
closesodoo/odoo#36204
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In the call to Chart.js we pass a ctx which should be a DOM element,
however we pass `null` as the ctx.
It seems that what happens is that we look for the DOM element inside
the `document` (via getElementById) but this element is not yet inserted
into the document, hence this returns `null`.
Since we already have a reference to the canvas element which should be
used as ctx, we can probably just reuse this reference
closesodoo/odoo#36072
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
* mass_mailing, note, website, website_blog, website_form,
website_mass_mailing, website_sale
This commit, unfortunately, mixes three things:
- Restoring as much as possible the scss organisation to allow styling
the web_editor UI properly.
- Fixing some bugs like a border around the page once the editor is
loaded, no ability to scroll the snippets, etc
- Introducing a whole new UI for snippet options: a left panel instead
of the old dropdown & button overlay.
Note: this commit also do some linting and ES6 convertion even though
some of it has been done in the parent commit.
Note 2: some elements that were removed are still styled in the POS apps
but this is because part of a feature was removed while leaving dead
code behind, this is handled in another PR which is to be merged
(https://github.com/odoo/odoo/pull/36136).
Part of https://github.com/odoo/odoo/pull/36068
task-1942370
closesodoo/odoo#36068
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
using the same trigger than l72 for the same action.
We just set the cat amount the pigeons, and hope to fix random red's runbot
closesodoo/odoo#36110
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
With this commit it is now possible to change the lang displayed in the URL.
Eg, you could use `/fr` instead of `/fr_BE`, or even a fancier `/french`.
Task-32838
Courtesy of pla@odoo.comclosesodoo/odoo#35135
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The wysiwyg abstraction layer was introduced in saas-12.2 by
commit f2969923. Its goal was to provide an external interface
for other modules that wanted to use the editor feature such
that the editor core itself could be changed without requiring
extensive changes in the other modules.
This commit is adapting the wysiwyg interface to instantiate
the 12.0 editor below it rather than the saas-12.2 one, thus
reverting the "new editor" part of f2969923 itself.
Part of PR 35677.
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
This commit reverts the saas-12.2 editor by putting back the editor
of Odoo 12.
The saas-12.2 editor was an intermediate work between the previous
editor of Odoo 12 and the new one slated for Odoo 13. It was unstable
but it was supposed to be replaced by the new editor of version 13.
However, since the new editor has been postponed to Odoo 14, the
saas-12.2 one would have been staying in Odoo 13, which would have
been a nightmare to maintain. To avoid this outcome, we chose to
put back the 12.0 editor in its place.
This has the particular advantage that Odoo 13 will share the same
bugfixes as Odoo 12 and 11 as they all run under the same core
editor, while the saas-12.2 one would have been an entirely
different beast to maintain.
This is a partial revert of f2969923.
Part of PR 35677.
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Bug introduced with
https://github.com/odoo/odoo/commit/1f5c9e363b6f7cb9a2770e6247536803fd13e3f0
Before this commit, the public/website root was started as soon as
the bundle it is in was lazy loaded. It then started all the registered
public widgets. The problem was that some of those may be registered
by other lazy-loaded bundles. The public root would then not start
those if those bundles were lazy-loaded with a too long delay.
This commit fixes the bug by starting the public/website root once all
known bundles are fully lazy-loaded.
closesodoo/odoo#35118
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In the customize theme modal, if one option enabled views which were
a subset of the views which are enabled by another option, both options
would be checked on modal opening if all the related views were active.
This is the case for the "choose an image" and the "choose a pattern"
options: the first one enables a view which adds an image on the body
and the second one enables the same view but also another which enables
the fact that the image must be repeated.
This commit solves the issue by always selecting the option enabling
the most views among the checked options in a same set.
opw-1958395
closesodoo/odoo#35465
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>