Commit Graph
5817 Commits
Author SHA1 Message Date
Cocographique 1380bd9123 [IMP] website: clean styles of Company team snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381

closes odoo/odoo#46773

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-03 16:12:23 +00:00
Cocographique 9800c89913 [IMP] website: improve images and layout of References snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:12:23 +00:00
qsm-odooandCocographique 219b29c4e2 [IMP] website: improve edition of Showcase snippet
Also no more scss required for the snippet.

Part of https://github.com/odoo/odoo/pull/46773
task-2191381

Co-authored-by: Cocographique <nmi@odoo.com>
2020-03-03 16:12:23 +00:00
Cocographique f8cafbea87 [IMP] website: add extra space between text and image in Picture snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique dfd993cae6 [IMP] website: add spacing to Countdown snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique 45aa1ad1ac [IMP] website: remove main title of Masonry block snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
qsm-odoo d3f75a0569 [IMP] website: simplify Product Catalog snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique 26a30d366e [IMP] website: set half screen by default for parallax snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique 5096064018 [IMP] website: remove titles colors used in snippets
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique dcddcdf761 [IMP] website: change button classes to be more standard in snippets
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique fe3e24ea68 [IMP] website: make images replaceable in themes in 3-col snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:04 +00:00
Cocographique 518db3a886 [IMP] website: remove button specific style in Image-Text snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:04 +00:00
Cocographique 0730d4793a [IMP] website: adapt layout and styles of Text Highlight snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:04 +00:00
Cocographique 266446284e [FIX] website: fix default indicators carousel style
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:04 +00:00
David Beguin a37a82cbcd [IMP] website: remove dead code in visitor management
This commit cleans visitor's code:
  * remove 'response' parameter that is not used anymore
    in _handle_website_page_visit method.
  * remove 'website_track_values' parameter that was not set anywhere anymore
    in the _create_visitor method.

Task ID: 2205541
PR #46339

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-03 16:38:48 +00:00
Nisha patel 159699b09c [IMP] various: set boolean_toggle on 'active' fields in form view
Currently, to activate/deactivate records with the 'active' checkbox
user has to switch to edit mode of the form.
So the purpose of the task is to allow the user to activate/deactivate
records from the readonly mode of the form view.

In this commit, we  set widget='boolean_toggle' on the 'active' field in form
view.

closes odoo/odoo#46567

Taskid: 2206794
Related: https://github.com/odoo/enterprise/pull/8918
Related: odoo/enterprise#8918
Closes: #46567
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-02 06:26:02 +00:00
qsm-odoo 0280b5fb01 [REF] web_editor, website: rename editor left panel tabs
- "Options" -> "Style"
- "Theme" -> "Options" (as now contains not-theme-related options)

closes odoo/odoo#46602

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-28 16:17:25 +00:00
Thanh Dodeur 560e3af48a [IMP] web_editor, website: adds custom code to head and footer
This commit adds two buttons on the Theme side menu that allow users to
add custom XML to the head and to the footer of the website.

Part of #44633
task-2168391

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-28 13:48:39 +00:00
Thanh Dodeur da46ba7bc1 [IMP] website: increase priority of user custom assets
This commit moves the custom user css assets to a higher priority
so their custom css have ascendancy over the other rules.

Part of #44633
task-2168391
2020-02-28 13:48:25 +00:00
Romain Derie 4c57e5bb30 [FIX] website: typo in toastr 'Congratulations'
Missing a `s`. Congratulation > Congratulations (fdba9a878f).

task-2144335

closes odoo/odoo#46380

X-original-commit: 7d743029dde14fac18fb3b5331c43fe1d940a772
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-26 16:56:14 +00:00
Romain Derie 4206c1f225 [FIX] website: don't load ir.ui.menu in frontend until needed
Before this commit:
When logged in and navigating on a frontend page, the accessible `ir.ui.menu`
would be loaded in qcontext.
Loading those menus performs alot of SQL request, up to ~2.000 requests on big
databases such as Odoo.com for an user with a lot of access rights.
This is not a problem on low traffic website as this is ORM cached, but when
there is a lot of traffic, the cache is clear very often, thus this code only
is adding a lot of requests for no reason most of the time as the user is just
navigating without any intention of opening the application menu.

Note that this qcontext computation in frontend was pointless in enterprise as
the applications menu in frontend redirect to the backend without using it.

This commit removes that computation from the qcontext. The menus will be
computed and loaded only when the user really needs it, when he is about to
open the application menu.

closes odoo/odoo#46127

X-original-commit: 471ddf85ce619961e46fb281bf721968ff298d3b
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-24 15:43:32 +00:00
Romain Derie b997684b06 [IMP] website, website_*: improvement of 7dd70438e1
* website_blog, website_event_track, website_forum, website_mail_channel

7dd70438e1 was introduced in stable as a fix, which obviously had some stable
policy preventing some changes.
This commit improves that commit in master.

task-2119086

closes odoo/odoo#45622

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-18 16:04:11 +00:00
Christophe Monniez 832bac0628 [REM] website: remove useless browser_js test
This test goes to the public homepage and directly logs a 'test
succesful'. It's useless as many other tests use the public homepage and
therefore, those tests will crash if the homepage is unavailable.

Moreover, it happens to trigger random failures due to the fact that
some RPC may occur between the cookies cleaning and the termination of
the browser.

Typically a "GET /web/webclient/locale/en_US" can be triggered right
after the clearing of the browser cookies, cache ...

closes odoo/odoo#46004

X-original-commit: 3aded126e78b18f8bb753f1b57b827667ca99d18
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-22 08:22:10 +00:00
Romain DerieandJeremy Kersten 4eafd78847 [FIX] web_editor, website: handle date edition in all lang and format
Before d00c0e317, `Datetime` fields would be editable in frontend but would
have unexpected results, especially in non-English languages, for when the
english lang format had been changed.
It would also crash when saving non-English strings, such as `Lundi`.
For more details, see https://github.com/odoo/odoo/pull/44484#issuecomment-586850490

Since d00c0e317, only date displayed in lang format would be editable, which
case is Event page in Odoo 12.0. Everywhere else, the format is changed for a
nicer layout, either with `widget=XXX` or `t-options=YYY`, such as:
`<time t-field="record.date" t-options='{"format": "MMM d, yyyy"}'/>`
`<time t-field="record.date" t-options="{'time_only': 'true', 'format': 'short'}"/>`

When a date parsing crashes during editor save, the problem is not only that
the date can be saved, but the whole changes of the page are lost, as they
won't be saved either.

This commit attempts to fix every languages cases, regardless of the website
lang or user lang.
To do so, we store the date in the user lang format in a data attribute of
every date field in the DOM. Once the field is clicked (to edit probably),
that value will replace the one displayed according to the widget/options.
That way, dates will always be sent to the server in the user lang format,
avoiding any possible mismatch.

This whole fix apply to `Datetime` and `Date` fields.

opw-2183055
Closes #44484
Closes #45555
Fixes #44047

closes odoo/odoo#45725

closes odoo/odoo#45997

X-original-commit: c0db9bb8027ff926c619aebe6e0a5cdd05808232
Original-signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
2020-02-21 18:57:59 +00:00
Ravi Singh f47b142a7a [FIX] website: debounce link dialog inputs to avoid useless page loading
When we edit a link on the website, the target page is loaded to find
the anchors. This occured at every typed character which was obviously
not efficient.

task-2187754

closes odoo/odoo#45831

X-original-commit: 06ae0b7b00c837733a9c67772007aee6712b246e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-20 14:51:13 +00:00
Samuel Degueldre b293ccc7c3 [IMP] website, web_editor: option to add columns on snippet without any
In the previous snippet cleanup, a lot of superfluous row > col were
removed in favour of having the bare content directly in the section,
this streamlines the interface and prevents having many useless UI
elements.

At the same time however, there are some snippets on which you might
want columns so that you can pull the content off-center and give the
block a background color independently of its containing section
(namely: the cover, title and text-block snippets)

this commit adds an option to add columns on those snippets (and remove
those columns completely if they're no longer wanted)

task-2120360

closes odoo/odoo#45712

X-original-commit: a44bfc4f7bba16d700650ecc2369fa1445ecbfb9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-19 14:48:55 +00:00
Romain Derie 7dd70438e1 [FIX] website: list real url endpoint, not 301 url
Sitemap uses `generate()` results, which were using `_rec_name` as slugified
URL.
Routing map has endurl using slugified `display_name` which is checked against
during `dispatch()`, that will redirect 301 to that url.

For instance:
  - `/shop/product/acoustic-bloc-screens-23` is listed in sitemap while this
    URL is not the correct endpoint. Reaching this URL will 301 redirect you to
    `/shop/product/furn-6666-acoustic-bloc-screens-23`.
  - `http://localhost:8069/event/design-fair-los-angeles-1` in sitemap which
    redirect to `/event/design-fair-los-angeles-2020-02-14-2020-02-18-1`.

Sitemap should contains endurl, not 301 URL.

task-2119086

closes odoo/odoo#45642

X-original-commit: f4c60bd55920d4e24de817634032649b3c3caff0
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-18 14:08:02 +00:00
fja-odoo 7a000acffd [FIX] website: fix website vistor concurent update
When requesting multiple tracked content at the same time with the same
visitor concurrent updates happen.

The best way I got to consistently reproduce the issue is to open 2
tracked pages with chrome command line:
google-chrome http://pcodoo:8069/contactus http://pcodoo:8069/

The first tracked page will update the visitor and lock it.
When the second will try to create a track which has a FK referencing
the visitor PSQL will try to SELECT FOR KEY SHARE the visitor but it is
locked => Concurrent Update Error. Using FOR NO KEY UPDATE instead of
FOR UPDATE performs a weaker lock that will not block
SELECT FOR KEY SHARE. By doing that we garantee that we will not
Update/Delete the PK while we lock the record.

closes odoo/odoo#45491

Fixes: https://github.com/odoo/odoo/pull/38372
X-original-commit: 33d0f0bc6b4c84de61ad876311690f26476c32f9
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-17 12:43:47 +00:00
fja-odoo 90bd53a204 [FIX] website: fix partner google map's url
Fixes de590816d8

closes odoo/odoo#45316

X-original-commit: 4118a6cf1adef04a799afa80faec78bcf44cf56b
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-13 15:18:45 +00:00
Samuel Degueldre 416500f6e3 [IMP] web_editor, website: add callback to editor clone and remove
We recently transitioned to async option methods, this allows us to have
better control on the order of execution in the edition workflow, and
among other things, keep the editor's UI in sync with the current state
of the DOM.

However, some snippet options (such as the number of columns option)
need to remove or clone portions of the DOM, and as such, trigger the
onClone or onRemove methods of the snippets contained in that portion if
applicable. Because these methods are defined on other options, we first
need to make sure all the snippetEditors for this portion are created,
which is asynchronous.

This commit adds support for an onSuccess callback to the
'clone_snippet' and 'remove_snippet' event handlers, such that options
can choose to be notified when the work has been done, allowing them to
wait for it before proceeding.

This commit also adapts the layout_column snippet option to make use of
that new feature, and remove code that was used as a workaround before,
ie: precomputing the expected number of columns after the clone/remove,
and using that number to adjust the width of the columns and update the
UI. We can now just wait for the clone/remove, and use the real number
of columns currently in the DOM.

closes odoo/odoo#45343

X-original-commit: c159d58ce9cfca4a44f159b18eb10d1138977e23
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-13 18:02:48 +00:00
Cocographique 534be212f2 [IMP] website: remove icon of figure caption in picture snippet
Part of https://github.com/odoo/odoo/pull/44980
task-2182907

closes odoo/odoo#44980

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-13 15:10:06 +00:00
Cocographique f472691799 [IMP] website: review timeline snippet
- Simplify the DOM
- Add option to move rows in timeline snippet
- Add data-name to timeline snippet

Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique d0d3679daf [IMP] website: remove uppercase style on buttons in product list snippet
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique e6ffab6a5d [IMP] website: remove icon and lead style in "call to action" snippet
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique c48eb07266 [IMP] website: remove title in company team snippet
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique 0ec40d4f9c [IMP] website: remove main title and adapt colors in comparisons snippet
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique 2fa0f4bdb2 [IMP] website: review section margins and icon color in showcase snippet
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique 92f171dac8 [IMP] website: review titles, colors and icons in big boxes snippet
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique 050867d2d4 [IMP] website: remove link color on unclickable items in snippets
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique cd74bff555 [IMP] website: remove uneditable style in text block snippet
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 15:10:06 +00:00
Cocographique 77543c8b15 [IMP] website: rename width option for better understanding
Part of https://github.com/odoo/odoo/pull/44980
task-2182907
2020-02-13 14:55:43 +00:00
Thibault Delavallée e5db1aec1a [IMP] website: always display partner of visitor on form view
Hiding fields when they are void is not really helpful.

Spotted when working on task ID 2056759 (remove crm.partner.binding mixin)
Community PR odoo/odoo#44970
Enterprise PR odoo/enterprise#8307
2020-02-13 15:29:40 +00:00
Thibault Delavallée 3a7b08e5cf [REF] website(_crm): improve code about contacting visitors
Purpose of this commit is to clean mail and SMS composer calls in website_crm
and website_crm_sms by separating composer preparation (context, values) from
customer preparation (check valid data exists, creating partner).

Indeed most of message composer code is based on records having a partner_id
correctly set, unless some templates are used that dynamically creates the
partner. SMS composer is more tolerant and check for phone / mobile numbers to
use.

By the way we make the action name translatable, because why not.

LINKS

Spotted when working on task ID 2056759 (remove crm.partner.binding mixin)
Community PR odoo/odoo#44970
Enterprise PR odoo/enterprise#8307
2020-02-13 15:29:40 +00:00
Samuel Degueldre c305f89e51 [FIX] web_editor: fix summernote files showing up in media dialog
Due to the infamous web_editor revert, summernote assets filesa are once
again created and stored in DB, but because they do not contain
'assets_' in their name, they would show up in the media dialog. This
commit fixes that by prefixing the created summernote assets file with
'assets_'

closes odoo/odoo#45298

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-13 10:38:25 +00:00
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
Adrian Torres 97a5093117 [FIX] *: specify at least one field in search views
Without at least one field, performing a search in these models' search
view is outright impossible.

closes odoo/odoo#45177

X-original-commit: 0aabfbff3ce5d68bf37e1734ba7aa43f62803f3a
Related: odoo/enterprise#8379
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-12 11:09:05 +00:00
Romain Derie 968638aa1a [FIX] website: prevent undefined in publish toastr
d92f76592c introduced a toastr when publishing a record.
It was designed for the topbar publishing toggle button, but some other
templates ended up also using that feature.
As those templates were missing `data-description` which contains the model
business name, it would show `You've published your undefined`.
This is only related to a very few places having a publish button inside the
page.

This commit fixed that by ensuring every publish button template have the
necessary code.
Also, a fallback is added in case tha `data-description` is missing somehow.

task-2191735

closes odoo/odoo#45141

X-original-commit: 4ab6e36b739060eb16e97eac502fd087a072abf3
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-12 07:53:51 +00:00
fja-odoo 729e8c9124 [FIX] website: hide move arrows for image gallery carousel items
Bug introduced with https://github.com/odoo/odoo/pull/38997

closes odoo/odoo#45125

X-original-commit: ffffa1c0ab84bbfe8950a0e31feb39e3a3b188bb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-11 17:35:41 +00:00
Bhavita Bhattandjpr-odoo 4e340cc5f0 [IMP] website: improve code for duplicate and new page
in this commit, throw the wizard to enter the new page name, while duplicating
page button and new duplicate page button added in the page properties dialog.
updated the test case related to duplicate page along with duplicate menu
consideration.

task-2088546
closes #40085

Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:10 +00:00
Bhavita Bhattandjpr-odoo 4e162a4e75 [IMP] website, website_link: improve frontend config screens
Following things are done in this commit:
1. changed some labeling and string for more readable and helpful to the user
2. added extra width to the text box
3. added publish/unpublish option for mobile view.
4. track page option auto-activated for any new page,event,job offer,course,
   blog.

task-2088546
closes #40085

Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:00 +00:00