Commit Graph
516 Commits
Author SHA1 Message Date
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Elisabeth Dickinson b2ef35a431 [IMP] *: replace .bg-color by .text-bg-color on ribbons
Also remove unnecessary CSS on ribbons.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
stefanorigano (SRI) 051ac37232 [IMP] web, * :introduce o_avatar
*: account, gamification, mail, mrp, note, project, website_blog,
   website_event_track.

Uniform design defining a common element shared across different
modules.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
Guillaume (gdi) f10e85b475 [IMP] social_media, *: add TikTok to the social networks stored in DB
*: website, website_blog, website_event

This commit adds the TikTok social network to the other social networks
stored in DB. Thus, users of the Website application will be able to
reference their TikTok page on their websites. This commit also updates
the different templates and the social media block to integrate this new
social network.

task-3235451

Part-of: odoo/odoo#116837
2023-05-11 09:36:21 +02:00
Benjamin Vray 69a11fdab4 [FIX] website_blog: fix read next article block
Before this commit, on a blog page with the "regular cover" and "read
next article" options enabled, the image in the "read next article"
block would shrink when the text was too long.

Steps to reproduce the bug:

- Go to a blog page (e.g. "Sierra Tarahumara").
- Enable the "regular cover" and "read next article" options.
- Enter edit mode.
- Scroll down the page.
- Enter a lot of text as the title of the "read next article" block.
- Bug: As the text increases, the width of the image decreases.

opw-3267842

closes odoo/odoo#120025

X-original-commit: 06a6e78b0f41188dd4c7c45c26f6038ecbd5b311
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-03 12:39:38 +02:00
Benoit Socias 95bb8dc0f8 [FIX] web_editor, website, *: make snippets name translatable
*: mass_mailing, website_blog, website_event, website_mail_group,
   website_mass_mailing, website_payment, website_sale, website_twitter

The names of snippet blocks are not translatable because their name is
obtained from a their template name which is not a translatable item.
For markets that use a non-latin alphabet this is a no go.

This commit makes it possible to specify a `string` attribute in the
`t-snippet` blocks that makes their name inventoried by the translation
process.

closes odoo/odoo#118530

X-original-commit: a501d226d8674ed0c9b183c69a9e754c79682237
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-04-17 08:24:47 +02:00
Louis (loco) abda2bb60a [FIX] website_blog: adjust the width of the border when inside column
Steps to reproduce the bug:
- Go on the blog of the website.
- Edit.
- In the "Customize" section, apply the "List" "Layout" and activate
the "Sidebar".

-> The sidebar appears at the bottom of the page instead of on the
side.

The situation looks like this:
```html
<div class="container">
    <div class="row">
        <div class="col"></div>
        <div class="border-end"></div>
        <div class="col-12"></div>
    </div>
</div>
```
The bug comes from the fact that the `div` with the `border-end` class
is inside a `row` class. Due to that, a bootstrap 5 css rule applies
and puts the `width` of the `div.border-end` element to `100%`. Because
the element tries to fill the entire width of the `div.row`, it is put
at the bottom of the page as well as its following elements (in this
case, the sidebar). This bug is fixed by removing the `div.border-end`
element.

opw-3217775

closes odoo/odoo#117849

X-original-commit: 9d8b895b934e5b0986c932837fd043cf847a8992
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-07 19:43:16 +02:00
Guillaume (gdi) 13e4acd38f [FIX] website_blog: fix the view of the blogs filtered by tag
From [this commit], following these steps:
- Go to /blog
- Click on a tag of a blog post that has at least two tags (eg: hotels)
- Click on another tag (eg: adventure)

=> Instead of having hotels or adventure as a filter we just have
adventure. The problem is that some variables were cached since [this
commit].

[this commit]: https://github.com/odoo/odoo/commit/b0a2a41d78292cb8b9e53788d40c6dc5915a466d

task-3054970

closes odoo/odoo#114250

X-original-commit: 2e7cd8ae13195f9a7527ac6789d9d3aecc920a82
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
2023-03-06 13:13:14 +01:00
Guillaume (gdi) a67528b743 [FIX] website_blog: prevent losing search params
Before this commit, search criteria could be lost when a visitor added a
new search criteria on blogs. This commit solves this problem.

Steps to reproduce the issues (with activate the sidebar):
- Go to the /blog
- Click on the adventure tag
- Select a month in the date filter

=> The adventure tag is lost.

- Go to the /blog
- Select a month in the date filter
- Click on the adventure tag
- Remove the date filter

=> The adventure tag is lost.

- Go to the /blog
- Select a month in the date filter
- Search for the blogs containing the word "heli"

=> The date filter is lost.

task-3058239

X-original-commit: 53ac1736b323257b2545946a8f96d06294c7b8c8
Part-of: odoo/odoo#114253
2023-03-03 15:56:49 +01:00
Guillaume (gdi) a48346d30a [FIX] website_blog: fix the blogs search
Before this commit, following these steps:
- Go to /blog
- Enable the customize option 'Top banner - Name / Latest Post'
- Disable the customize option 'Full-Width Cover'
- Search for the word 'helicopter' in the blog post search bar

Two problems are then visible:
1) The top banner is always visible with a blog post that does not match
the search. This top banner should not be visible (like for tag and date
searches).
2) There is an alert message 'No results for "helicopter".' while the
blog post 'Maui helicopter tours' matches the search.

This commit corrects both errors.

task-3058239

X-original-commit: c28cf4b44c4fd9a1800d5fb1ad6e8c734feb9057
Part-of: odoo/odoo#114253
2023-03-03 15:56:48 +01:00
Romain Derie 1d309793d4 [FIX] website_blog: show search bar even if more than one blog
Commit [1] hid the blog navigation bar if there is only one blog.
It made sense as that navigation bar purpose is simply to select a
specific blog and not "all".

But commit [2] introduced a search bar in that blog navigation template
which was hidden if only one blog existed.
It does not make sense as the search targets blog posts which you still
want to be able to search even if you have a single blog.

This commit fixes that by moving the visibility condition from the whole
container (which includes both the search bar and the navigation bar) to
the navigation bar only.

[1]: https://github.com/odoo/odoo/commit/0a540e0ef25a439e29a762de5b35a2c6a63ad7f7#diff-6ed720c420b3e0591aeaf1c45061775765e1901d1592c46eb36b804c4c7c39f5R8
[2]: https://github.com/odoo/odoo/commit/ea009585e1d14041fe19f1e6e190b286e96c0681#diff-6ed720c420b3e0591aeaf1c45061775765e1901d1592c46eb36b804c4c7c39f5R24

closes odoo/odoo#113928

X-original-commit: 1e0bd3143623d89f504e67fb74e0f56b540530cc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-01 20:54:59 +01:00
4de1e6a375 [FIX] website_blog: show blog tag option
Since [1] the blog tag option was not shown in the website editor
option's panel anymore. Because the tag is not in an editable element
and the `data-no-check` was not specified.

After this commit the blog tag option is restored.

The `_patchForComputeSnippetTemplates()` method (added thanks to [2])
was backported here and used to set `dataset.noCheck` in stable. This
can be removed in master because setting `data-no-check="true"` in
the XML will be sufficient.

[1]: https://github.com/odoo/odoo/commit/86e3bb5e24c2d125ec4ec84ac788601c63182d0f
[2]: https://github.com/odoo/odoo/commit/faf19ef7f87fc043fb9a814516e01b8eeafd9b61

task-2811746

closes odoo/odoo#108763

X-original-commit: a6d16f1109634b596102869bcd12dd93e471f788
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Co-authored-by: xO-Tx <mou@odoo.com>
2022-12-28 17:29:11 +01:00
Romain Derie e86f09c027 [FIX] website_blog: let the date format being handled by qweb field
We have internal utils that will use a wanted format in a localized way.
We should use those utils rather than hardcoding a format, otherwise
that format will be used for all languages which is weird.

So, passing a `short` / `medium` etc format directly to babel will avoid
that issue. On top of that, the `value_to_html` of our
`ir.qweb.field.datetime` also provided options like `date_only`,
`hide_seconds` etc.

This commit simply gets rid of those hardcoded format and achieve the
same thing using utils & tools, which will be localized on top of that.

The "error" was report by our translator: `MMM d, yyyy` in french leads
to `oct. 18, 2022` which is not ideal. It should be `18 oct. 2022`.

closes odoo/odoo#105197

X-original-commit: 4a443736523547fb516c70f45e7e70df32b13147
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-11-07 17:59:55 +01:00
Romain Derie 84ef92fef7 [FIX] website_blog: fix misusage of t-attf
This commit fixes wrong usage of t-attf of [1].
It would output in the DOM `rel="len(active_tag_ids) and 'nofollow'"`

[1]: https://github.com/odoo/odoo/commit/0f2cada32319b3910d6ace6d412cfa94a646c9c7

closes odoo/odoo#104306

X-original-commit: 79ea8540c63c652f117237609ef7b477c7c17bb3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-27 14:41:35 +02:00
Arthur Detroux (ard) 10f1c9b222 [FIX] website_blog: restore styles post BS5 migration
[1] migrated to Bootstrap 5 and in doing so, changed the way badges are
styled. Now to give correct styles to badges, utility classes must be
added.

This commit fixes that by adding .text-primary and .text-decoration-none
to the badge.

[1]: https://github.com/odoo/odoo/commit/1fcd098af5fa18e848c66bb83bdceb6ba0308512

task-3001319

closes odoo/odoo#104180

X-original-commit: b606df22ecd07e4acf87feadd1e6f20ed730f058
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2022-10-26 17:07:23 +02:00
qsm-odoo eed3f1bc59 [FIX] website, *: hide page options for non-designer users
*: website_blog, website_crm_partner_assign, website_customer,
   website_event, website_event_exhibitor, website_event_meet,
   website_event_track, website_forum, website_hr_recruitment,
   website_membership, website_sale, website_sale_loyalty,
   website_sale_slides, website_slides, website_slides_forum

With commit [1], the "customize_show" options were moved in edit mode.
They were wrongly displayed for non-designer users. Trying to use those
would throw a warning at the user.

[1]: https://github.com/odoo/odoo/commit/17a8a37e9bfc5b787d9666597d43e63f0064919f

closes odoo/odoo#103142

X-original-commit: f2ca62a4a9ccb6713a39c100fc87c112619eac41
Related: odoo/enterprise#32768
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-12 10:35:05 +02:00
Arthur Detroux (ard) d3307aaa08 [IMP] website, *: give flexibility to dynamic snippet templates
*: website_blog, website_event

Commit [1] introduced new templates. This commit's goal is to build on
that template system to provide more flexibility for designers.
It adds new data-attributes to set on the first node of a template.

- data-row-per-slide: Allows for the template to tell a dynamic snippet
carousel how many rows of cards it should display.

- data-arrow-position: Allows for the template to tell a dynamic snippet
carousel where the arrows should be positioned.
(for now just bottom, or side)

- data-extra-classes: give the template the possibility to add extra
classes to the dynamic snippet instead of just the card.

This commit also removes options to select the amount of elements
displayed on each row. This is now only changeable through templates, or
by directly editing the snippet's DOM through debug tools. This was done
to reduce the amount of options visible, so that the user just chooses
a template and it is ready to go.

[1]: https://github.com/odoo/odoo/commit/49bd79b0bdca76415780bdfa199195371c2692e5

task-2677203

Part-of: odoo/odoo#80128
2022-10-04 14:56:50 +02:00
xO-Tx b0484d64c4 [FIX] website, *: fix website content kanban views
*: website_blog, website_forum, website_hr_recruitment, website_sale,
   website_slides

The goal of this commit is to set the missing 'view_ids' on some
actions linked to website 'pages' tree/kanban views.

Linking a form view to actions will make the 'Edit' & 'Configuration'
buttons work correctly (on kanban record dropdown for 'hr.job' &
'slide.channel').

The website url on "product pages" kanban should start on a new line
after this commit too.

Related to task-2889981

closes odoo/odoo#101814

X-original-commit: a61e730cd9f92b2c343646f33f3e59cef518c3bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-03 20:19:53 +02:00
xO-Tx f23399db1d [IMP] website, *: add website content kanban views
*: website_event, website_forum, website_hr_recruitment,
   website_sale, website_slides

The website content list views should act as a page manager (click on
a record redirects to iframe, "CREATE" and "Publish / Unpublish"
buttons, ...).

The goal of this commit is to add a kanban version of these views for
key app models ('website.page', 'blog.post',...) since the same code
can now be used for list and kanban controllers / renderers since [1].
It is especially important in mobile where the kanban views are nicer
than list views by default.

[1]: https://github.com/odoo/odoo/commit/ed09db19c372da8d8be541f365117d1ce8e965ba

task-2889981

closes odoo/odoo#101174

Related: odoo/enterprise#31821
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-27 14:54:40 +02:00
qsm-odoo c682e8d41c [IMP] website, *: use multi-edit where possible on "pages" list views
*: website_blog, website_hr_recruitment

Add multi-edit on the remaining "pages" list views not using it:
- pages
- blog posts

The only remaining one would be "jobs" but editing the Department field
seems broken at the moment.

Related to task-2889981

closes odoo/odoo#101215

X-original-commit: be58687284884550cc4e6c2ac7255abee4eb1125
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-27 11:41:53 +02:00
xO-Tx b60db0df9b [IMP] website, *: adapt code to work on "pages" kanban views
*: website_blog

The goal of this commit is to update JS code to have the same behaviour
from the 'website content' list view (trigger the 'new content' dialogs
on "CREATE", add a website selector to filter content) on kanban views
too.

The blog post kanban view has been adapted to use this. Other "website
content" related records will receive a kanban view in a further update.
This is is also important so that the mobile UX is nicer.

task-2889981

X-original-commit: ed09db19c372da8d8be541f365117d1ce8e965ba
Part-of: odoo/odoo#101215
2022-09-27 11:41:52 +02:00
qsm-odoo da3f4c2aff [IMP] website, *: fill the "Content" area of the main website menu
*: website_blog, website_event, website_forum, website_hr_recruitment,
   website_sale, website_slides

As indicated by previous commits, new custom list views are created to
fill the "Content" area of the main website menu with key app models:
blog posts, events, forum posts, jobs, products and courses (+ some in
the enterprise version, see related commit).

Those list views will act as the page manager one: a click on an item
redirect to the website iframe, the create button acts as creating a
record via the "+ New" systray button while being on the iframe, the
delete button will in the future allow to know the page that mentions
the related object before deleting it, etc etc.

task-2889981

closes odoo/odoo#98937

Related: odoo/enterprise#30782
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-05 05:21:06 +02:00
qsm-odoo 2bd1ba0e06 [MOV] *: move future page manager related views and action
*: website_blog, website_forum

A "page manager" list view will be created for key models in other
apps. This commit moves blog and forum views to a dedicated file to
save some history for the future introduction of that "page manager"
list view.

task-2889981

Part-of: odoo/odoo#98937
2022-09-05 05:21:05 +02:00
xO-Tx d7a5a06c68 [REF] website, *: use OWL views for new content
*: website_blog, website_event, website_forum, website_livechat,
website_sale, website_sale_slides, website_slides, website_slides_forum

The goal of this commit is to adapt the website "new content" form
views to OWL.

Follows the merge of the "website in backend" task at [1].

[1]: 31cc10b91d

task-2687506

Part-of: odoo/odoo#96346
2022-09-04 14:39:44 +02:00
Swapnesh Shah 4722dc8f7e [IMP] website_blog: display no of views field on form
Before this commit field `visits` was not displayed on form view.

With this commit, Field is now readonly at model level and
added on form view.

closes odoo/odoo#74336

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-08 14:16:45 +02:00
qsm-odoo 29613c6ec4 [FIX] web_editor: fix the look of the indent symbol in the editor panel
As a stable fix, to not touch XML templates and break existing
translations, the ⌙ character was automatically replaced by └ which
makes more sense for the usecase and should work properly in all
browsers. The ⌙ character is actually rendered mirrored on Windows 11
Chrome (and others) as the font used for those unicode characters is
left to the browser. We could force a font of our own but it's probably
not worth it.

A better solution with a SVG or CSS solution has to be done in master.
That would unify the look of the symbol across all browsers and
also prevent special characters to be placed in translations.

With this forward-port commit, we'll start first by using └ via a CSS
rule. Three new classes have been created: o_we_sublevel_1,
o_we_sublevel_2 and o_we_sublevel_3. Adding any of them on a widget
automatically adds the └ character. Then choosing 1, 2 or 3 controls
the indentation, which was previously controlled by placing the &emsp;
HTML entity directly inside strings.

This commit also takes the opportunity to fix some of those level
indentations (sometimes 2 was used instead of 1 or 1 was used instead of
2, etc) and also review some related labels.

closes odoo/odoo#97361

X-original-commit: e5d45643598671077ade7e41f0dbfe2b502665b8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-04 11:45:31 +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
Romeo Fragomeli ac584e171d [REF] *: BS5: Migrate Badge
From [1]:
> Dropped all .badge-* color classes for background utilities
> (e.g., use .bg-primary instead of .badge-primary).

We now have to manage constrast for some badge. It's why we
add 'text-dark' at some point.

Note:
Due to the backport of 'text-bg-#{theme}', we can use this to
avoid to use 'text-dark'.

Ref:
[1] https://getbootstrap.com/docs/5.1/migration/#badges

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:18 +02:00
Arthur Detroux (ard) e5b094b683 [IMP] website, *: remove unused assets
*: website_blog, website_event, website_forum, website_links,
   website_livechat, website_slides, survey, web_editor

This commit removes the website navbar root widget, as the edition is
now handled in the backend through the client action and custom menus.

It removes associated widgets and their css.

See merge commit for more information.

task-2687506
2022-06-24 10:28:06 +02:00
Benjamin Vray 59e01b7a76 [IMP] website_blog: adapt customize show options in blog pages
This commit adapts "customize show" options from the website blog module
by creating new options available in edit mode.

See merge commit for more information.

task-2710582
2022-06-24 10:28:05 +02:00
xO-Tx 8925df7e75 [IMP] website, *: add new content dialogs
*: website_blog, website_event, website_forum, website_livechat,
   website_sale, website_sale_slides, website_slides,
   website_slides_forum

The goal of this commit is to add dialogs to create new website content
using a 'target:new' action on the form view and an overridable
"website" form controller.

See merge commit for more information.

task-2687506
2022-06-24 10:28:05 +02:00
Younn Olivier f260e3c144 [IMP] website, *: add edit in backend systray dropdown
*: website_blog, website_customer, website_event_exhibitor,
   website_event_track, website_hr_recruitment, website_sale,
   website_slides

See merge commit for more information.

task-2687506
2022-06-24 10:28:05 +02:00
Younn Olivier a9a0107f7c [IMP] website, *: reorganize website menus
*: website_blog, website_forum, website_mail_group, website_sale,
website_sale_comparison

task-2687506
2022-06-24 10:28:04 +02:00
Gorash b0a2a41d78 [IMP] all/website: using lazy values and t-cache in templates
Using lazy values allows you to not do query when the content is not
displayed or if it is already cached. Adding `t-cache` only reduces
render time, but combining it with lazy values saves browses, computes
and query.
Thus for the `/shop` page the page is displayed in 60ms (before: 250ms).

Part-of: odoo/odoo#88276
2022-06-03 16:40:40 +02:00
xO-Tx 7a74418b42 [IMP] website_blog: change blog cover title to h1
SEO issue: blog post doesn't have <h1> for post title.

The goal of this commit is to change the main cover title to <h1>.

task-2454130

closes odoo/odoo#66844

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-26 15:10:02 +00:00
Benoit Socias 7559626c54 [IMP] website, *: make a generic search bar snippet available
(*: website_blog, website_event, website_forum, website_sale,
website_slides)

Before this commit the search bar was specific to products.

After this commit a generic search bar is available as a general feature
of website which can be configured to inspect specific models.
The snippet is used to replace the old search bar in blog, courses,
event, forum, page and shop.
The search results of these pages and the autocomplete of the search bar
run through the same search mechanism.
A new hybrid results page has also been created as a target of a search
on "Everything".

In each involved module, `website._search_get_details()` is implemented
to return search metadata for every model related to the `search_type`
parameter.
Search metadata for a single model is returned by `_search_get_detail()`
on that specific model.

The autocomplete runs through the additional
`website._search_render_results()` pre-rendering step that prepares the
data to fit in the autocomplete template.

task-2379555
https://github.com/odoo/odoo/pull/65871

Part-of: odoo/odoo#65871
2021-09-03 06:59:33 +00:00
Kamen Zhekov 22a76c230b [IMP] website: clarify drag&drop zones for website edit mode
When using drag&drop for adding elements to a product's page through
the website edit mode, users sometimes find the feature confusing to
use. Two examples of said confusion can be seen here:
- https://dashboard.userbrain.net/shared/qwl65bqlk6jg?t=404
- https://dashboard.userbrain.net/shared/k796mnj95pow?t=258

The suggestion for improvement was to reduce height and opacity for
the top and bottom droppable zones (available on all products), and
make any element not explicitly dropped in those zones go to the
zone below the product, available only on the product's own page.

This behaviour is extended to be more generic and is applied when
a dropzone has the class oe_structure_not_nearest, which excludes
it from the nearest search, unless the element is dropped explicitly
in a zone that has the class oe_structure_not_nearest.

task-2581641

closes odoo/odoo#73580

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-15 12:16:14 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Xavier Morel 996cb85c27 [FIX] *: mass replace known t-raws by t-out
* QWeb bodies should be markup-safe so `0` should always be
  markup-safe.
* `head` is qweb-rendered so the same.
* The `json` pseudo-module in qweb templates is `json.scriptsafe`,
  which should be markup-safe.
2021-04-29 05:34:20 +00:00
Julien Mougenot 3e3dce0eb8 [REF] *: rename assets 'glob' to 'path'
Rationale:
The majority of cases where an ir.asset is manually declared
outside of manifest files is to specifically add a single asset file.
This means developers are specifying a single asset *path*, and not a
glob expression. In this context, it seems better to name the filepath
field `path`, and document that it can be specified with a glob
expression when (seldom) needed, rather than making the exception appear
to be the norm - possibly puzzling many developers (What's a glob and
why do I need one?)

The doc is updated as well, and some spell-checking and wording
improvements were done too.

This required some adaptations to the existing `ir.asset` declarations:
- odoo/enterprise#17465
- odoo/design-themes#459

closes odoo/odoo#68695

Related: odoo/upgrade#2348
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-04-07 20:39:10 +00:00
Younn Olivier e3d86cfd2a [FIX] website_blog: hide content width button in blog context
The user was not able to change the width of the first content of a blog
because it's not part of a blog.

This commit will hide content width option for every content in a blog
post.

Part of https://github.com/odoo/odoo/pull/68823
task-2446852

X-original-commit: 85051e88707e61b7d3756a666236386c5056ed19
2021-04-06 17:50:17 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Benoit Socias 862dc45f56 [IMP] website_blog: remove references to unused CSS class
Before this commit the blog post snippet templates still contained
CSS references to the cover image loading mechanism that was removed.

After this commit those references have been removed.

https://github.com/odoo/odoo/pull/68529
2021-03-30 13:53:54 +00:00
Benoit Socias e306ec7ca3 [IMP] website_blog: remove the old latest blog posts snippet
Before this commit the old latest blog posts snippet was still
available.

After this commit the old latest blog posts snippet has been removed.

task-2477207
https://github.com/odoo/odoo/pull/67334
See https://github.com/odoo/upgrade/pull/2262
2021-03-29 14:27:58 +00:00
Benoit Socias 3c0d98bcd8 [IMP] website_blog: add a blog snippet that relies on snippet filters
Before this commit the latest posts snippet implemented the lookup for
its templates and its rendering procedure.

After this commit a new blog posts snippet is introduced which relies on
the dynamic snippet mechanisms.

task-2477207
https://github.com/odoo/odoo/pull/67334
2021-03-29 14:27:58 +00:00
Benoit Socias d65101b254 [MOV] website_blog: prepare for blog snippet refactoring
The purpose of this commit is to isolate the move operations that happen
before the refactoring of the blog snippet into a dynamic snippet so
that the refactoring diffs can be understood.

task-2477207
https://github.com/odoo/odoo/pull/67334
2021-03-29 14:27:58 +00:00
Samuel Degueldre 73f4fad9ee [REF] website_blog, *: adapt blog-post option to use new m2m for tags
*: web_editor

This commit refactors the website blog option to use the newly
introduced Many2manyUserValueWidget

Part of https://github.com/odoo/odoo/pull/67832
task-2274732

closes odoo/odoo#67832

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-25 09:27:18 +00:00
Oussama MESSAOUDI bb2b791e3b [FIX] website_blog: avoid overlap around blog's paragraph
Fixing anchor selector to pick only section and div elements.

task-2449620

closes odoo/odoo#68298

X-original-commit: a384dc0905190e9e469ed5c6e65fc0e9abd93b8d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-24 11:55:13 +00:00
Nasreddin (bon) 9857b96b97 [FIX] website_blog: display post_date on latests blogs
Issue

	- Install 'Blogs' module
	- Create a blog post
	- Set published_date to 01/01/1997
	- Go to website
	- Edit any page and add a 'Blog Posts' Block
	- Set 'Layout' to 'Cards' (or 'Horizontal')
	- Save

	In snippet cards, the blog post date is not the published date.

Cause

	Displaying update date ('write_date' field) instead of
	the published date ('post_date' field).

Solution

	Replace 'write_date' by 'post_date'.

opw-2443104

closes odoo/odoo#67985

X-original-commit: 681e709b239c2456c71d1c16bb40de055dfb927c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-16 16:54:39 +00:00
Jeremy Kersten 82977b0428 [FIX] website_blog: avoid double indexation of blog post
Until now, if you have 2 tags (t1, t2) on blog post (P) of blog (B),
we ask to index:
    /blog/B/post/P
    /blog/B/post/P/t1
    /blog/B/post/P/t2

Now, we only ask to index:
    /blog/B/post/P

opw-2413811

closes odoo/odoo#67845

X-original-commit: bd8268a36cbe098935555edee8c16b7667c912fc
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-15 12:08:06 +00:00