Commit Graph
125 Commits
Author SHA1 Message Date
Antoine (anso) 5ac340b1b2 [ADD] website: add text_cover snippet
New text_cover snippet added for the editor. Editors are now able to use
a cover composed of an image and some text on the side.

task-2691555

closes odoo/odoo#105650

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-20 16:51:04 +01:00
niyasraphy ddb6fa045a [FIX] website: add required * for question in contact us form
before this commit, on contact us form, except
question input all the other required input
field has * (asterisk) after the field label.

after this commit, * will be added for the
question input label in the contact us form

closes odoo/odoo#115780

X-original-commit: 127f7f5cfbca103f6d50330aefe355fdaee808c8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-20 15:31:38 +01:00
Soukéina Bojabza 3485779e04 [IMP] website: improve the Masonry snippet templates
Since [1], the Masonry snippet is in grid mode only and its templates
have been modified to allow this mode. However, some of them don't look
good and have to be improved.

This is what this commit does:
- some text blocks were too small so their height has been increased
- the Masonry second default image has been replaced by another one
that looks better.

[1]: https://github.com/odoo/odoo/commit/85b352af319edec84407f2046cf795b4e5503460

task-3013055

closes odoo/odoo#102984

X-original-commit: ad8926eafd34c2743e1a5247f6171fd183e6e506
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-10 21:50:43 +02:00
Jeremy KerstenandBenoit Socias 878351d840 [IMP] base, web, website, *: differentiate essential & optional cookies
*: im_livechat, survey, utm, website_crm_iap_reveal, website_forum,
   website_livechat, website_sale, website_sale_comparison

Before this commit all cookies were considered essential.

This commit makes some of them optional. It also makes it possible for
the website visitor to only accept the essential cookies.

task-2800976

X-original-commit: 9a8a9463289a7446e9be0ef62ff895feb37a4de4
Part-of: odoo/odoo#101845
Co-authored-by: Benoit Socias <bso@odoo.com>
2022-10-03 10:56:58 +02:00
Romain Estievenart 98a97d0fea [IMP] *: removes .form-group
this commit removes the usage of .form-group class which is deprecated
since BS5.

Here is the css rules that was used:

a) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L1997
As we can see, it simply adds a `margin-bottom` of `1rem` which
corresponds to the `.mb-3` BS class.

b) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2326
As we already checked all `form-inline` in [1] and [2], we don't have to
do anything about these rules.

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

Notes:
- `position: relative` is already on `#new-password-group`.
- `.field-db`, `#editor-media-image`, `.unsplash_img_container` and
`#url-form-group` seems unused.
- Sometimes margins are unnecessary because of blocks overlapping.
  (e.g. `margin-bottom` is not needed if margin-top is set on the
  following node)
- CSS rules applied on `.s_website_form_rows > .form-group` are now in
the XML by adding `mb-0 py-2` BS classes.

Follow-up of:
[1] https://github.com/odoo/odoo/pull/97967
[2] https://github.com/odoo/enterprise/pull/30343

closes odoo/odoo#100052

Related: odoo/enterprise#31261
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-16 20:51:56 +02:00
Romain Derie 507db4e179 [REM] website: remove multi-website by country
Short summary:
- People can now use the snippets option to show/hide based on country
- We never use / test / maintain this feature, if it still works since
  its introduction 4 years ago that's by luck
- It is probably barely used, we never got a single question or issue
  about it

-----------

When we introduced the multi-website feature, it came with 2 main use
cases:
1. Multi website by domain -> Every website has its own domain and based
   on that we serve the expected website
2. Multi website by geoip -> Multiple website can have the same domain
   and based on GEOIP/country we serve the expected website

We never really supported, highlighted or promoted the geoip case.
We actually never use it ourselves when doing tests, and we don't
consider it when doing specs / improvements.
At most, only a very few people know about it in Odoo.

That GEOIP case is probably not useful at all, as displaying a whole new
website based on lang is not easy since nothing can be shared out of the
box -> Every website has its own COW records.

For instance, one could think of having its main website A and another
website B on which he just added 3 products specific to that website B
country.
But such a case won't even work properly, as any adaption on website A
won't be reflected on website B (design, theme etc).

closes odoo/odoo#99938

Related: odoo/upgrade#3892
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-15 18:22:00 +02:00
Romain Derie 9c733d8c22 [IMP] website: allow controller as homepage
Before this commit, only a website.page could be used as a custom
homepage ('custom' meaning other than '/').

But it is a real use case and requirement for our users to be able to
select a controller as homepage.
For instance, an ecommerce would want its homepage to be the shop and
not a regular page from where you then have to navigate to the shop.

Right now, this can (almost) be achieved by doing some technical
advanced operations:
- Move the 'Shop' menu first in the menu navbar of the website
- Delete the specific '/' website.page for the website
- Delete the generic '/' website.page (no website_id)

That way, the system will redirect `/` to `/shop`, which is not ideal as
it should remain `/` in the URL.

That's because, until now, the homepage (`/` controller) serve order
was:
- Serve the website.page set as homepage (`website.homepage_id`),
  happens when one did select another page as homepage through the page
  properties dialog
- Serve the website.page having `/` as URL (default)
- Serve the first accessible menu if there no `/` page or other page set
  as homepage, it acts as a last resort attempt to not serve a 404 and
  to try serving relevant content (the first menu of a website is most
  likely always better than a 404)
- Serve 404

This commit allows to introduce an URL as homepage, instead of only a
website.page. It can be done through the website settings in the
backend.

There is 2 main points to keep in mind about serving the homepage:
- make sure we don't serve a 404 as the website homepage. This is the
  website entry point, serving a 404 is terrible. That's why we have
  some fallback mechanism like serving the first menu.
- We need to serve / before fallbacking to the first menu, as a lot of
  site just remove the 'Home' first menu since it is a duplicate of the
  logo, which also redirect to the homepage. In such cases, it doesn't
  mean that the user want his first menu to be the homepage. We
  shouldn't rely on such a behavior, it should just be used as a last
  resort.

With this commit, the homepage serve order is now:
- If homepage URL is set (empty by default), serve the website.page
  matching it
- If homepage URL is set (empty by default), serve the controller
  matching it
- If homepage URL is not set, serve the `/` website.page
- Serve the first accessible menu as last resort. It should be relevant
  content, at least better than a 404
- Serve 404

Most DBs will just have a website.page with '/' as URL and keep the
homepage_url setting empty.

task-2969683

closes odoo/odoo#99100

Related: odoo/upgrade#3876
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-09 00:56:54 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Gorash 0452d0701f [IMP] website: remove cache from website.page
The cache placed on the pages is no longer useful thanks to the use of
the new directive t-cache.

closes odoo/odoo#88276

Related: odoo/enterprise#27582
Related: odoo/documentation#2056
Related: odoo/upgrade#3451
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2022-06-03 16:40:40 +02:00
Jeremy Kersten cccd6eb01d [IMP] website[_event,_sale]: add plausible as Analytics solution
This commit add the way to specify the Plausible shared key auth token and
the plausible domain on your website to have the Plausible Dashboard integrated
in your Website > Dashboard > Analytics menu.

Some custom event are already pre-configured as:

Push an event 'Shop' on confirmation on ecommerce (with amount bucket +/- 50)
Push an event 'Lead Generation' on:
    'Thank you' page of contactus
    Confirmation of subscription for an event

From this way, the end user can just add a goal 'Lead Generation'
or 'Shop' on Plausible to have the Goal values visible.

closes odoo/odoo#91058

Related: odoo/documentation#2007
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-18 20:33:34 +02:00
Arthur Detroux (ard) a529bc302c [FIX] website: use fake phone numbers on contactus
When the static "Contact us" page was merged at [1], a real phone number
and address were used. (Odoo BE Support). This causes issues when a
client forgets to change the phone number on that specific page.
Visitors will think Odoo support is the client's phone number.
(Same as [2])

To fix this we use a fictional phone number and address.

[1]: https://github.com/odoo/odoo/commit/2c41797266d0c5d4481a1a3f4f9b9f688de3434c
[2]: https://github.com/odoo/odoo/commit/37be09d7d73bd4942396f06f5b5cfa22cca78f56

task-2742123

closes odoo/odoo#84387

X-original-commit: 684274a296fa7601e5b223c6e0398fbf618ed698
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-02-10 18:57:02 +00:00
Jeremy Kersten 05dd2169a6 [FIX] website: allow to disable cache page based on content
In some case, we know that page will contains dynamic content and that cache
should be ignored.

E.g. as soon as a s_snippet_form will be present in page, we know that we need
the real csrf, and so we cannot use the cached response from another user.

Now, we disable the cache (cache_time=0)

closes odoo/odoo#77935

X-original-commit: 262499a91cc9f2365cf2ff131796d9b61b438f9b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-10-12 11:44:44 +00:00
Nikunj Ladava 480f2aa1e1 [IMP] website: improve wording for 'Contact us' form
Purpose is to have a more direct and engaging wording.

Task-2581308

closes odoo/odoo#75066

Related: odoo/enterprise#20209
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-24 11:08:36 +00:00
63a3ba4a42 [IMP] website: add mega menu snippets
New mega menus :
- s_mega_menu_big_icons_subtitles
- s_mega_menu_cards
- s_mega_menu_images_subtitles
- s_mega_menu_little_icons
- s_mega_menu_menus_logos
- s_mega_menu_odoo_menu
- s_mega_menu_thumbnails

Part of https://github.com/odoo/odoo/pull/71143
task-2502208

Part-of: odoo/odoo#71143
Co-authored-by: Younn Olivier <yol@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-09-02 14:14:50 +00:00
c90ab7b664 [IMP] website: add templates for masonry snippet
Add an option in the masonry snippet's allowing to choose among multiple
templates for the snippet layout. The usability of the snippet also has
been reviewed (restrict the ability to control background on deeper
boxes). Also reviewed the bg-200 use on boxes and replaced them with
a preset as otherwise it seems buggy to not be able to remove the
bg-200 by selecting a preset (other than hitting the trash icon in the
colorpicker).

Part of https://github.com/odoo/odoo/pull/67361
task-2463033

closes odoo/odoo#67361

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: smottet <oms@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-08-23 12:20:17 +00:00
15aae7ea34 [IMP] website: organize links in menu & footer on configurator apply
The configurator takes care of the organization of the links to the different
pages. Some links are put in the menu and some are put in the footer. The order
is predefined. If too many links are present in the menu then a sub-menu 'Company'
is created and some links are put in it. For the 'News' and 'Succes Stories' features
a website specific blog is created.

Links have the following order in the menu and are present only if their corresponding
website.configurator.feature has been selected in the configurator excepted for the 'Home'
and 'Contact us' links which are default links:
- 'Home'
- 'Shop'
- 'Event'
- 'Courses'
- 'Services'
- 'Pricing'
- 'Company': if more than 8 links in menu and more than 1 item in this submenu
             otherwise the three following links are in the top menu.
  - 'News'
  - 'Success Stories'
  - 'About us'
- 'Appointment'
- 'Contact us'

Links in footer:
- 'Privacy Policy'
- 'Help': if website_helpdesk installed. This is not a website.configurator.feature.
- 'Forum'

Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930

task-2518565

Co-authored-by: Sébastien Mottet (oms) <oms@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
2021-07-30 13:51:33 +00:00
Romain Derie c3015779cb [IMP] website, website_crm: small form improvements
- fixed xml data files order, otherwise form field would not be whitelisted,
  including `email_to`, so the mail would not be send.
- add the same data-for behavior from website_crm to website, to be able to
  prefill a field with an URL param
- removed the fallback data-for in website_crm, the JS in now in charge of
  doing that. Plus it was creating a misheavior -> you could have prefill set
  to false but still, it would prefill the user info
- fixed the form option so the field.name is not used as field.string if there
  is already an explicitely set field.string..
- adapt field name in /contactus form (xml view), form snippet (registry) and
  crm form (registry) for more consistence
- added the prefill option set to true by default on /contactus (to fit what
  we had before). This came with a change in the test as we don't need to
  enable it anymore.
- added also the prefill option to true by default on form snippet

Part of #69888
task-2462993
2021-07-16 19:13:18 +00:00
Matthieu Stockbauer 2c41797266 [IMP] website, website_crm: make contactus page static
Before this commit (and the previous ones that prepare it), the contact
us page was largely editable but not entirely. The automatic address
field on the right column prevented the page to be considered like any
other page and only the left column was editable. That led to less
possibilities and difficulties to make a modern contact page.

Now, the whole page is static, like a page the user would have created
himself. Same for the thank you page. This comes with the disadvantage
of having to handle the address by yourself (but that's not a field that
would normally change a lot anyway) and the website_crm app now needs to
be enabled on the form via edit mode after install to change the form
action to lead creations.

Part of https://github.com/odoo/odoo/pull/69888
task-2462993
2021-07-16 19:13:18 +00:00
Matthieu Stockbauer 54873d20c3 [IMP] website, *: add pre fill option for website forms
*: website_crm, website_form_project, website_hr_recruitment,
   website_sale

Replace website_crm specific behavior by another option for all website
forms.

Part of https://github.com/odoo/odoo/pull/69888
task-2462993
2021-07-16 19:13:18 +00:00
Matthieu Stockbauer 2709602006 [REF] website, *: adapt files moved to website after website_form merge
*: website_crm, website_form_project, website_hr_recruitment,
   website_sale

Part of https://github.com/odoo/odoo/pull/69888
task-2462993
2021-07-16 19:13:18 +00:00
Matthieu Stockbauer f8882698e8 [MOV] website, website_form, *: merge website_form app into website
*: crm_iap_lead_website, website_crm, website_form_project,
   website_hr_recruitment, website_sale

Part of https://github.com/odoo/odoo/pull/69888
task-2462993
2021-07-16 19:13:18 +00:00
xO-Tx 6ab57140ef [IMP] website: add background image to quotes snippet
Part of https://github.com/odoo/odoo/pull/68061
task-2431484

closes odoo/odoo#68061

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-12 08:30:57 +00:00
Sébastien Mottet (oms) 84f8a30e1f [IMP] website: rename website_type_preselection field
Rename field website_type_preselection to website_config_preselection since feature
preselection is not only based on website type anymore but also on website purpose.

task-2518565

closes odoo/odoo#73377

Related: odoo/enterprise#19498
Related: odoo/upgrade#2625
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-08 07:36:12 +00:00
Sébastien Mottet (oms) ccbab34878 [FIX] website: handle disabled and preselected modules
- The selection of cards corresponding to already installed modules
is disabled. A disabled style has been applied to these cards and an
info icon added. On hover on this icon the user is informed that the
module is already installed on its DB.

- Modules that were preselected based on website type can now be
unselected by the user.

- Correct typo in description of feature_module_career.

task-2518565

closes odoo/odoo#72688

X-original-commit: ab364b06dbb20cce90c7caa8ca15d034e2dcb25e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-06-24 11:09:13 +00:00
Oussama MESSAOUDI 0f7fda60d0 [IMP] website: improve items snippet
- New and multiples pictures
- Empty URL instead of odoo.com by default

task-2471323

closes odoo/odoo#70528

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-17 14:39:43 +00:00
Jeremy Kersten 926af37343 [REF] *: remove unused fileToken cookies
This cookies is not more used since 35d452cffb

closes odoo/odoo#72079

Related: odoo/enterprise#18967
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-14 07:32:18 +00:00
Sébastien Mottet (oms) 094c94fcd3 [IMP] website: change some wordings in configurator features screen
Some feature descriptions and titles have been reworded.
A sentence has been added below the title to indicate
that choices made on this screen are not definitive.

Task ID: 2451965

closes odoo/odoo#70252

X-original-commit: 63195ba03ccc1bf40b4682fc7c9aa4a1a55f1e43
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-05-03 11:40:09 +00:00
Sébastien Mottet (oms) e8a5af2e28 [IMP] website: configurator for automatic website generation
On website app  installation and on new website creation a configurator is launched.
The purpose of this configurator is to generate a website that meet the user's needs.

The configurator is composed of 4 steps:

1) Business description: the user is asked to describe its need with its website purpose (dropdown), its industry (autocomplete search) and its objective (dropdown).

2) Logo and palette selection: the user must select a color palette for its website. He can also upload its logo. In this case color palettes recommendations are generated based on the logo's colors.

3) Features selection: the user select the pages and applications he needs.

4) Theme selection: three themes are recommended to the user based on its industry. This screen display a preview of these three themes.

task-id: 2451965
ENT PR: odoo/enterprise#16949
UPG PR: odoo/upgrade#2316

closes odoo/odoo#67537

Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-04-02 13:04:03 +00:00
Benoit Socias 3355dc1623 [REF] website, website_sale: support recently viewed in product snippet
Before this commit the recently viewed products were handled differently
from the dynamic product snippet.

After this commit the dynamic product snippet supports the functionality
of the recently viewed products snippet:
- its template used to show each product
- its filter of displayed products
- its "Add to cart" feature (with the animation)
- its "Forget" feature (only applicable when viewing recently viewed)
Also added "Accessories" and "Recently Sold With" filterings.

Several kinds of filtering can be combined.
- Products can be restricted to a given category
  - Pseudo categories for all products or current category can be used
- Products can be restricted to matching names
- Products can be obtained from one of the following:
  - Newest
  - Latest sold: ordered by descending frequency in last 8 orders
  - Latest viewed
  - Accessories (of the current product)
  - Recently sold with (the current product)
Accessories and recently sold with are only available in product pages.

Also, generic templates have been considered useless and the whole
mechanism allowing them has been removed (this includes the
pre-rendering mechanism for the fields specified in the filter).

task-2453416
https://github.com/odoo/odoo/pull/65554
2021-03-26 15:41:44 +00:00
Jeremy Kersten be49f9fb1f [IMP] website: remove meta_data from params of filter, and design card
Call _get_filter_meta_data when needed instead to compute it only once and
give it from function to function, it is really trivial to compute and the
api of functions are simple from this way.

Avoid to use h4/h5 taf for styling bug use bootstrap feature for it.
The semantic of <div class='h4'/> vs <h4/> is not the same for SEO

Don't make call_to_action_url required

+ small typo

task-2446024
https://github.com/odoo/odoo/pull/65176
2021-02-16 14:20:24 +00:00
Benoit Socias 1d2dd3f76f [IMP] website, website_sale: remove most escaping from Dynamic Products
Before this commit the filtering code for the Dynamic Products snippet
was rendering all its values.

After this commit the filtering code for the Dynamic Products snippet
mostly returns the values to be rendered.
Because the list_price still needs to be rendered with the correct
currency, the general rendering mechanism is being informed through the
field meta-data that the escaping was already done.

task-2446024
https://github.com/odoo/odoo/pull/65176
2021-02-16 10:18:15 +00:00
Benoit Socias 0cede3fa14 [IMP] website: display sample data for dynamic snippets
Before this commit when a dynamic snippet was fully configured but
returned no data, the rendered section remained empty in edit mode.

After this commit when a dynamic snippet is fully configured but has no
data to display, some sample data is generated in edit mode to give a
feel of how the page will look like when data will be available.

task-2446024
https://github.com/odoo/odoo/pull/65176
2021-02-16 10:17:58 +00:00
Jeremy Kersten 258ebe1405 [FIX] website: contact us page, don't cache page if prefilled
Before this commit, the page can be set in cache with some data pre-filled.
Now we don't cache anymore the contactus page if you have GET params.

closes odoo/odoo#65608

X-original-commit: 4ce59c3ab26a441ad8b7f2fd038b690cf897231d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-05 12:14:10 +00:00
fw-bot c1e0b03d8b [IMP] website: make homepage tour, available on homepage only
Homepage tour starts with a very generic step 'drop snippet'
So, you can be in the middle of another tour and see the step of homepage tour.
This doesn't fix all cases, but make conflict less frequent.

E.g.

go to step 4 of tour event
click on save (before doing the step 5)
click on edit
Element is no more dirty (because save before step 5) so the step 5 not visible,
Tour with higher sequence (== lower priority) become visible. (e.g.: homepage)

Forward-Port of bca6cf2693d38c76b1af08398a3125bb16b59c15

closes odoo/odoo#61157

Related: odoo/design-themes#416
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-04 09:54:08 +00:00
Jeremy Kersten 550d2935bd [IMP] website: support generic website for dynamic snippet filters
Made the website_id non mandatory on website snippet filters and adapted
the fetching route so that it interprets an unspecified website_id as
the filter being available on any website.

Before this commit website snippet filters had to be limited to one
single website.

After this commit website snippet filters can be made available on all
websites by setting their website_id to no value (this is the new
default of the pre-defined filters).

https://github.com/odoo/odoo/pull/59831
task-2355369

closes odoo/odoo#59831

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-13 13:09:45 +00:00
Laurent Stukkens (LTU) 0ef25d19bc [FIX] website,website_sale: HTML escape dynamic snippet
Issue
    To do on Community:
    - Install website_sale (eCommerce)
    - Go into Website app
    - Navigate through Product/Products
    - Edit 'Customizable Desk (CONFIG)' and add '&' and/or '<' and/or '>'
      characters into the name
    - Save
    - Go to the Website app Dashboard and click on 'Go to Website'
    - Click on 'Edit' button
    - Drag and drop the 'Dynamic Product' snippet into the website
    - Click on the block 'Your Dynamic Snippet wil be ...'
    - In the right panel, in the 'Dynamic Product' snippet options,
      chose a 'Template' and a 'Product Category'

    A traceback is shown

Cause
    the '&' character crashes lxml.etree.fromstring

Solution
    ensure no '&' is sent to lxmx.etree.fromstring by using
    odoo.tools.html_escape (in order to ensure no other problematic
    characters are sent to the front) on the field values except when
    not applicable (widget rendering with record_to_html should not be
    escaped).
    It is important to note here that this is applicable
    to action servers that are used by the dynamic filter.

opw-2357027

closes odoo/odoo#59805

X-original-commit: f91422115c09be484f2868347566b6392ed0effd
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-12 17:45:45 +00:00
Martin Trigaux 2683184aa6 [FIX] *: fix all the typos
And other reported English mistakes in source string
Courtesy of Transifex translators

And remove leftover from gengo

closes odoo/odoo#59022

X-original-commit: 26efc84c5cac47a2cc83d7b084f8b71528fec6c7
Related: odoo/enterprise#13781
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-05 09:36:34 +00:00
Laurent Stukkens (LTU) b5e611ba3d [IMP] website: add image widget support for urls char fields
* Prior to this commit, images were only managed when being an image
  field. No widget were used either.

* After this commit, image stored in model as url (as res.country.image_url)
  can be used when specifying ':image' after the field name. The fields are
  now rendered using their corresponding default widget. If there is a need
  to force another widget and if the developer is sure that it is compatible,
  he/she can specify it using the notation: 'field_name:widget_name'.

closes odoo/odoo#57645

X-original-commit: 18d4e3327c7152b4c3a86ba377e3357f213b703c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-14 12:17:27 +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
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
Laurent Stukkens (LTU) 0e7640b5f2 [IMP] website, website_sale: add dynamic snippets
* Implement new snippets that allow the user to choose a filter
  and a template.
  Three snippets have been created:
  - Dynamic Snippet: Displays the data in a grid format
  - Dynamic Carousel: Displays the date in a carousel
  - Dynamic Products: Let the user pick a product category and
                      displays the products in a carousel

task-2276740
PR #53175

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-18 17:40:25 +00:00
qsm-odoo 42e1d4ca60 [IMP] website, *: enable the parallax option for all snippets
*: web_editor, website_blog

Unfortunately, this feature revealed a new batch of flaws in the
editor widgets system so some hacks were made to make it work. We will
always have the time to improve the pure technical side later.

This commit also separates the notion of color filter from the notion
of parallax. A color filter can now be applied independantly, when
there is either a background image or a background video. Applying a
color filter on top of a background video is actually a new feature.
Applying a color filter on top of a background image is actually now
achievable by two different ways: this new color filter layer or by
applying the color transformation on the image itself via the related
option. Depending on the user case, both could make sense at the same
time, but more importantly: having a CSS color filter is useful for
using those for default Odoo content (e.g. like the current contact us
page where we use a cover banner with an image with a black filter on
top of it: doing that without CSS color filter would mean to alter the
image directly which would not be ok when the user changes the image).
Also, sometimes you want the unfiltered image on a page and the exact
same one but filtered on another (for example: forum images).

Note: this commit also "fixes" an issue: the optimization feature for
images when parallax was enabled was not available before.

Part of https://github.com/odoo/odoo/pull/47313
task-46147
2020-08-10 14:27:00 +00:00
Benjamin Vray ee2555546f [IMP] website, *: redesign the contact us and the thank you page
task-2266756

closes odoo/odoo#52162

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-18 11:16:46 +00:00
Cocographique c799b64482 [IMP] website, *: improve "Blockquote" and "Quotes Carousel" snippets
*: web_editor

Part of https://github.com/odoo/odoo/pull/52698
task-2210730
2020-06-12 17:06:36 +00:00
Cocographiqueandqsm-odoo e5a5f98819 [IMP] website: improve "Popup" snippet
Review the layout to always use standard bootstrap classes so that
future task targeting modal can target s_popup snippets the same way
(for example: our task allowing to open a popup on click on a button).

This also allows to simplify the css and simplify the options. A new
option also now allows to have a backdrop, or not, so that user clicks
are blocked while the popup is opened, or not.

+ Adapt cookie bar accordingly.

Part of https://github.com/odoo/odoo/pull/52698
task-2210730

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-12 17:06:36 +00:00
DramixDw 52c23e01e3 [REM] website,*: remove About us page and references
Remove the default about us page because it could be easily recreated and
doesn't add a lot of value to the website.

task-2189613
2020-05-01 07:58:11 +00:00
fja-odoo 11c60739e4 [IMP] website, *: warn user about outdated blocks
* = mass_mailing, web_editor, website_crm, website_event, website_form,
website_forum, website_hr_recruitment, website_mail_channel,
website_mass_mailing, website_sale, website_slides

When an outdated snippet's option are activated we display a warning
in the left panel that inform the user about the potential
malfunctions.

To do so the snippet's template key is added to the snippet as
data-snippet.
If a snippet is "t-call" inside another snippet, it will need to use
t-snippet-call instead of t-call to have the key on himself.

Those unique keys are used on snippet selection to retrieve the
snippet's version in the left panel and compare it with the currently
selected snippet's version. Versions are describe with data-vcss,
data-vjs and data-vxml. If a snippet's key is not in the left panel we
consider that snippet as outdated.

Added some tests to ensure that t-snippet and t-snippet-call really have
their template key as data-snippet

Adapted the views to the data-snippet changes adding
data-snippet="tmpl_key".

Part of: https://github.com/odoo/odoo/pull/44569
task-2189669

closes odoo/odoo#50254

X-original-commit: 28a6cd49b6e87b75c2e70771e241c41778bf9e87
Related: odoo/enterprise#10236
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-27 16:36:31 +00:00
fja-odoo b76b0cbcc7 [FIX] website, website_sale: fix snippet version
Forgot to add the vcss number on some s_title snippets.

task-2233240

closes odoo/odoo#49263

X-original-commit: 7fb36621665c739c7c91395b2bdaee12f908c88c
Related: odoo/enterprise#9773
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-08 16:48:25 +00:00
Samuel Degueldre 807ac81144 [IMP] web_editor, *: set image alt automatically, remove useless alts
*: website, web_unplash

The html alt attribute is supposed to contain a description of an
image's content (an alternative to the visual representation), a lot of
snippets contained alt attributes that were not descriptive of their
content, and would as such be counter-productive in terms of
accessibility. This commit removes those.

Previously, the alt attribute on img tags had to be set manually by the
user through the editor. This commit makes use of the description field
on ir.attachment to store image description, and sets the alt attribute
on images to that description when choosing an image from the media
dialog.

task-2091417
closes odoo/odoo#45174

Related: odoo/enterprise#9520
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-30 11:07:10 +00:00
Romain Derie e27eb978a6 [FIX] website: perf - don't force homepage on website in data
Let the homepage being set in bootstraping

Without this, any -i will set generic homepage as website homepage_id.
This is not really an issue for enduser as they probably don't do -i once
website is already installed.

But this code was useless anyway, as the homepage_id set in XML would be
overriden during bootstraping of the homepage in website create() override.

Note that this is important to have the correct homepage_id in DB, otherwise
it has to prefetch the generic homepage.

Related to #47257
task-2211013

X-original-commit: 385203d7632daeaab762c57319cc93b8312cc043
2020-03-19 15:37:46 +00:00