Commit Graph
6201 Commits
Author SHA1 Message Date
Cocographique c3a3e47f08 [FIX] website: add missing navbar toggler in 'Boxed' header template
task-2312878

closes odoo/odoo#57078

X-original-commit: 501023dbf0b025e70e7a67c19b8b01e989ba575e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-04 09:33:58 +00:00
Cocographique 73143b5e70 [FIX] website: fix 'Social Media' snippet in Header/Footer templates
task-2312878

closes odoo/odoo#57077

X-original-commit: 98255310ec855f9eac65b708900b85aa7485a035
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-04 09:33:29 +00:00
Raphael Collet 317765c8f3 [IMP] core: deprecate method cr.after()
Use the more convenient `cr.postcommit.add()` instead.

closes odoo/odoo#57043

X-original-commit: e9e37091a65d5ae2caa9eb6728abaffb7c9555a8
Related: odoo/enterprise#12928
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-09-03 14:29:39 +00:00
Victor Feyens 2f3dcb8947 [IMP] base,website*: do not store country flags.
1) Avoid the storage of all country flags as ir_attachment (230+
ir_attachment in a new db) to reduce the filestore of databases.

The country flags are nearly static and not expected to be modified on
Odoo instances.

This change is based on the new "image_url" widget logic (see previous commits).

2) Extend the flag coverage for countries

Add the missing country flags & specify a mapping to provide flags
for overseas administrated countries/territories.
2020-09-02 16:43:45 +00:00
Victor Feyens d1eb6089fd [IMP] website: define ir_attachment as type url when possible
Storing attachment in database (when not specified as an url attachment) copies
the given file in the filestore.  When not necessary, this should be avoided to reduce
the databases footprint (and their backups).

On a given instance, the gain is minor, but on servers with hundreds of databases and/or
backups, the impact is noticeable, leading to an economy of scale.
2020-09-02 13:53:19 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Victor Feyens c482fdbf05 [IMP] various: improve code style and performance by improve `all()` usage
PURPOSE

Clean code. Be more performance oriented.

SPECIFICATIONS

Improvements applied in this commit

  * not all() --> any(not) for earlier returns;
  * all([generator]) --> all(generator) to avoid unnecessary list casting.
    This code construct is better managed by all;

This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.

LINKS

Task ID-2328619

closes odoo/odoo#56810

X-original-commit: 1cc6bb1231401ea7f501d2f5b5e9641ec8734850
Related: odoo/enterprise#12802
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-31 13:59:27 +00:00
Jeremy Kersten a019479d14 [FIX] website: check website_published exists before use
closes odoo/odoo#56786

X-original-commit: d23899b3c4ea91e4ac80163764c97cb9591d889c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-31 09:17:10 +00:00
Jeremy Kersten e6f8c86572 [IMP] website: Use contact us as default cta in header
X-original-commit: 963215f488d12aa6fbb0c108dfd1c3dc557756d8
2020-08-31 09:17:10 +00:00
Jeremy Kersten 96bc3d4fff [FIX] website: invalide cache page with classic ormcache invalidation
To avoid to manually invalid the lru cache and probably miss some place
(assets, website menu, qweb view, website, company, ...) we use the classic
cache.

Courtesy of @rco-odoo for the help and review

closes odoo/odoo#56744

X-original-commit: 98e12901c97a67dc87f21647473754cd6f384d4a
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-28 14:54:11 +00:00
qsm-odoo 9b2178952d [IMP] portal, website: add the ability to have a lang selector in header
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

closes odoo/odoo#56705

X-original-commit: 9b67f6ee0783e8b02edb260b3ba5a0322187a416
Related: odoo/design-themes#352
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-28 08:19:46 +00:00
qsm-odoo c873e3e1aa [IMP] website: make it easier to enable off-canvas menu in themes
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 5de3608680dbd232fbc3a1042aca4abdbfd590b0
2020-08-28 08:19:45 +00:00
qsm-odoo 65a34e988e [IMP] website: add the possibility to control btn & input dimensions
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 9e3a6429de073ab7ecfeb16c3a6eb505d87719c7
2020-08-28 08:19:45 +00:00
stefanorigano (SRI) ea7a62647f [IMP] website: review header/footer template & effect option UI
- Use a text label for selected header effect instead of a big image
- Do not animate all images of header effects at the same time, only on
  hover in the select.
- Review the images for header/footer templates.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 522c51880949bf601af67c26fd82c7f28ca56f8c
2020-08-28 08:19:44 +00:00
qsm-odooandCocographique 438158eaf6 [IMP] website: reorganize header options UI + implement shadow & borders
Also change the default behavior of all shadow options: now switching
inset / outset resets to default bootstrap values.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: eb34a7841978aea5c3f2d04121fd0e6adda94e3b
Co-authored-by: Cocographique <nmi@odoo.com>
2020-08-28 08:19:43 +00:00
Cocographique 3c05896c8f [IMP] website, *: add 'magazine' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 77d82cfbddb64cc7302672c7741eb65c9fc4a125
2020-08-28 08:19:43 +00:00
Cocographiqueandqsm-odoo b607744d8e [IMP] website, *: add 'hamburger full' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 0b265a6564133b40e1b3090f736a0af24900188a
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:42 +00:00
Cocographiqueandqsm-odoo 0ca58f6e92 [IMP] website, *: add 'image' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 53a0565632a874ca62d3b4f5ba2bde338ac067aa
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:42 +00:00
Cocographiqueandqsm-odoo e73b17fd47 [IMP] website, *: add 'centered logo' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: b14b69ebc82314403d9181a42693bb7faf6dada4
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:41 +00:00
Cocographiqueandqsm-odoo f2a7f36190 [IMP] website, *: add 'boxed' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: c6ad4dfdc0e133bd985054125bcb46e4e3f52cdd
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:41 +00:00
Cocographiqueandqsm-odoo af5964b637 [IMP] website, *: add 'minimalist' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: f11353cad6b2e9c14bc583945c328822b871ba10
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:41 +00:00
Cocographiqueandqsm-odoo f13e269d28 [IMP] website, *: add 'contact' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 58ad43919bb6904c4bcb2e7129d93a558f97eaa6
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:40 +00:00
Cocographiqueandqsm-odoo 40de8261a5 [IMP] website, *: add 'slogan' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 706769cbccc9f53e89c3f4a5308fa0a6f07dce2a
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:40 +00:00
Cocographiqueandqsm-odoo 9975b51379 [IMP] website, *: add 'sidebar' header template
*: website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: b30e47d81c1f71a66b1b6aa6846b52e080c25643
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:39 +00:00
Cocographiqueandqsm-odoo 2a1aa808e9 [IMP] website, *: review existing navbar templates and templates system
*: portal, website_sale, website_sale_wishlist

Portal-without-website header is now more basic, without the need of
a collapsed element. It is then entirely replaced when website is
installed with header templates, t-calling all the main parts.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: d3d5983e0a76eb6500e0d3f78f128879b50390e0
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:39 +00:00
Cocographiqueandqsm-odoo 0029236566 [IMP] website: review default font-family and font sizes
Also remove the "Gothic A1" font-family entirely as it is unnecessarily
heavy. Users can still using by importing the font explicitely if they
want to.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: fd599daeacda187d1224cfd9e16f958423845c3d
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:39 +00:00
Cocographique 4e53f861a2 [REM] website: remove header button option
The feature will be replaced by a more advanced one allowing to put any
static content at some locations in the header.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: f186ce1c313d28cc17df03b9021279b9a2f4acd8
2020-08-28 08:19:37 +00:00
Cocographique 9e17c30bc0 [IMP] website: review brand (logo/text/none) templates
Move it in an external view to be able to place it at a different
location depending on the header template.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 010efaeb6d96f156eced62dfd7d842f1d588698f
2020-08-28 08:19:37 +00:00
Cocographique 118057927e [IMP] portal, website: review sign in templates
Move it in an external view to be able to place it at a different
location depending on the header template.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: b4866d192e6f4fdfba15b65fa2c209b35b7eb8c0
2020-08-28 08:19:37 +00:00
Cocographiqueandqsm-odoo c8577568a1 [IMP] portal, website, *: review navbar user dropdown
*: website_sale

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: c93bd93014685dd532d2244aece6bfeec9562b7a
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:36 +00:00
Cocographique 3b57c7b7fc [IMP] website: review and improve footer template choices
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 34ed29cbac80180982c9acc86c1412433bb88919
2020-08-28 08:19:36 +00:00
Cocographiqueandqsm-odoo 9ee35cf23e [IMP] website, *: add style options for navbar links
*: web

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 3f7e2949aef56d66b46417206b539f5ca74a1aae
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:35 +00:00
stefanorigano (SRI)andqsm-odoo a65407b9c3 [IMP] website, *: add off-canvas and other hamburger menu options
*: web, portal

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 89bf0d4170f42b40cd46915c7d0160c4818f3b8f
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:35 +00:00
qsm-odooandBenjamin Vray d20e29f905 [IMP] website: fix interaction between ToC snippet and header effects
This commit also add the possibility to indicate a "top gap" = a part
on the top of the header which is not supposed to be shown once the page
is scrolled (this is a leftover of the "preheader" task which was
cancelled for something better, but that JS code still made sense as a
possibility).

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 38ba41779f3b83219de41542e2132f0b9a194cce
Co-authored-by: Benjamin Vray <bvr@odoo.com>
2020-08-28 08:19:34 +00:00
stefanorigano (SRI) 6aebcecda0 [IMP] website: add "postcard" website layout
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: d089faca597d26f568b96bdc6069b473115fa6f4
2020-08-28 08:19:34 +00:00
stefanorigano (SRI) 243a07713c [IMP] website: add "framed" website layout
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: e222ad33fe3154273f7761c1645c15e640e61ded
2020-08-28 08:19:33 +00:00
stefanorigano (SRI)andqsm-odoo d9bdaf7d90 [IMP] website: review "boxed" layout
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 6eab56a150dec8a40cf7064e9d4d2dfe172e189a
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:33 +00:00
e0011d883d [IMP] website: add footer "scroll-to-top" button option
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: b1ad74398d6f0ab7bc1795b9b80366b9fd2af66f
Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
Co-authored-by: Cocographique <nmi@odoo.com>
2020-08-28 08:19:33 +00:00
stefanorigano (SRI)andqsm-odoo 2e06b7262e [IMP] website: add ripple effect option for buttons
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 92c911fe1a8b24437ef5174d04c92ef8f185fc2c
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:32 +00:00
qsm-odoo a58fc42c29 [FIX] website: restore website menu loading with images
Since the images are now lazy loaded by default, the website menu was
not loaded correctly anymore when a mega menu was enabled and that there
was an image inside. Indeed, the menu loading waits for all images to
be loaded to compute the menu that should be in a dropdown when there
are too many. As the ones in the mega menus are hidden when the menu
is closed, the new lazy loading feature does not load them... which
makes the menu loading wait for something that is not being done.

This commit solves the problem by not waiting for images inside mega
menus. This could actually be done as a stable fix in stable versions
as there is no point waiting for those particular images in any case.
This will be only merged in master as it is not strictly a bug though,
at least for now.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 2d9667c2286354bf22c1cfea06c06a6b9250ba24
2020-08-28 08:19:32 +00:00
qsm-odoo 6e7aba0ced [REF] website: make clearer code for the website menu loading
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: b6eb31511569551c0882b336bce46fdd44919e5c
2020-08-28 08:19:32 +00:00
Krupal Oza f0dccae14a [FIX] website: prevent manual creation of website visitors
Currently, admin and system users have the ability to manually create new
visitors from UI, which was introduced since ACL revamp[1] on visitors.
However, even admin should not be able to create visitors manually. Indeed
having a create button makes no sense as everything is managed through
frontend. Those menus are mainly present for reporting and displaying
information.

This commit fixes the behaviour by preventing manual creation of visitors
for all users including admin.

[1] - 5e605f5

Task ID-2288363

closes odoo/odoo#56651

X-original-commit: 1db514f8d2a9f1ba6861c89ced9a2a9f5dcf48be
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-27 11:34:06 +00:00
qsm-odoo 7647151b78 [IMP] website: implement body image as a SCSS variable
This is unfortunately replacing old hacks by new ones but using SCSS
variables for this is more consistent with the rest of our website
customization possibilities.

The hack here is for the UI which is controlling two SCSS variables at
the same time (body-image and body-image-type). This has to be improved.

closes odoo/odoo#56496

X-original-commit: 6b400c433b352d7dbba0d3770600857df4872c50
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-25 10:43:41 +00:00
qsm-odoo 0058ee62f8 [FIX] website: show cookie bar whatever footer template the user chose
closes odoo/odoo#56435

Note: this fix may need to be backported as soon as possible
X-original-commit: 8e437a79e9f6948351a8c7f2f51daba4ffbed8e4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-24 14:59:56 +00:00
Nicolas Lempereur a9900c0702 [FIX] website: show mega menu in + (extra) menu
The mega-menu inside "+" menu (that contains items that do not fit on
one line) could not be used at all.

This is because we only managed normal dropdown-menu (ul) and not
mega menu (div.o_mega_menu).

But once the menu is shown, there is an issue because the two main
widgets are column on "lg" breakpoint, and inside the menu there is no
width but we might still be on lg breakpoint.

So this commit also try to reset col values (max-width and flex) as is
the case in mobile view (because "col-lg" are not applied).

opw-2313019
closes #56367

closes odoo/odoo#56426

X-original-commit: 19de393288dec96c7151a58e8fafd70978d305e9
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-08-24 14:04:48 +00:00
qsm-odoo 6bc2364974 [FIX] website: restore default font properties per font family system
Commit [1] made a mistake when creating the new font family system. The
values defined in the palettes took precedence over the overridding
values defined in the fonts configuration map. Obviously only user
values should take precedence over those.

[1]: https://github.com/odoo/odoo/commit/7be1429656af3c96ac30caed28a27f5b9590009f

closes odoo/odoo#56382

X-original-commit: eea7bb3ef0ff7e2304c686bb91e947a754dce03f
Related: odoo/design-themes#345
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-24 11:00:02 +00:00
Lucas Perais (lpe) 86c4f79212 [FIX] web, website: move keyboard navigation and browser detection in common
Before this commit, the files keyboard_navigation_mixin.js and browser_detection.js
were defined both in assets_backend and in assets_frontend

Obviously then, they should be defined in assets_common, as this commit intends.

X-original-commit: 42e7c01024dcc8f5d0d0ee13c120bd31374837cd
2020-08-24 07:30:42 +00:00
qsm-odoo bbe117e107 [IMP] web_editor, website: introduce foldable zones in the editor UI
Now any set of widgets and rows can be placed in a we-collapse element
so that those elements can be foldable. The first element inside (or
the mentioned "string" on the we-collapse element itself) is used as the
always shown element (with a toggler on its left to toggle the
visibility of the other items).

we-collapse inside other we-collapse is supported as well.

Limitations / Other infos:

- The use of '⌙' and &emsp; characters is not automatic (yet?).
  Sometimes it actually make sense to use them without a we-collapse or
  to not use them in a we-collapse.

- The use of we-collapse is limited to widgets inside the same option.
  So unfortunately, there is no current way to add all bg image options
  in a folable section as those contain many different options. Maybe
  in the future.

Part of https://github.com/odoo/odoo/pull/56350

closes odoo/odoo#56352

X-original-commit: d9c450ac97de40c71aebd487cff725bfda6a577b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 17:51:32 +00:00
Jeremy Kersten cbf8d3b304 [IMP] website: perf - cache public page
closes odoo/odoo#56331

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-21 17:50:00 +00:00
Lucas Perais (lpe) 9708c6e992 [IMP] bus: notify user when assets have changed
Use case:
When the server is restarted, the python is updated,
but some users may have an ongoing session in a browser tab
This may lead to code being unsynchronized and ultimately to some
odd bugs.

Purpose:
When we are in such a case, that is, the assets were recomputed
after a update of the code and a restart of the server by the request of another user,
notify connected users that assets have changed.
Then propose them to reload the page.

Known caveats:
- This is not a developer's feature.
Since assets computing is ORM cached, they have limited
opportunities to rebuild. Namely, the feature won't trigger
each time the JS has changed, rather, it will
when JS has changed AND the cache has been reset somehow (e.g. when the server is restarted).

- This not a portal/website feature either, but only in backend.
Business clients won't be notified that the JS has changed.

- While requests debug=assets do trigger a recomputing
of the *components* of bundles, they do not save a bundle
This means that the requests that sends the notification
cannot be debug=assets.

Task 2034462

closes odoo/odoo#39875

Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-08-21 12:16:25 +00:00