Commit Graph
85 Commits
Author SHA1 Message Date
Jeremy Kersten 432d15a30e [FIX] website_blog, website_sale: don't show frontend filter in backend
Dyanmic filters uses ir.filters.
But domain is not exactly the same syntax.

e.g. time.strftime() vs context_today()

So we add a fake action_id to avoid to display these filters on each action
of this model into the backend.

task-2654131

closes odoo/odoo#77021

X-original-commit: f92cfa96b9337fce8451080bffd9b7e40bdedc0d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-27 10:59:39 +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
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 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
Thibault Delavallée 187c7239f0 [MOV][IMP] website_{blog/forum}: reorganize qweb / jinja templates used for mailing
PURPOSE

Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.

SPECIFICATIONS

  * move those templates in their own file to ease their discovering and
    maintenance;
  * put them into data (as those are not views even if it contains qweb)
  * guidelines are now :

    -> Qweb templates should be in data/mail_templates.xml;
    -> mail.template records should be in data/mail_template_data.xml;

  * put their declaration in no update when not done if template has no
    technical code or complex dependency on underlying code;
  * move found mail data (mail.message.subtype or mail.activity.type) records
    in a mail_data file that should contain only "core" records linked to mail;

LINKS

Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#19366
2020-11-25 12:31:09 +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 69190959ce [IMP] website, *: introduce new classes to color snippets
*: web, web_editor, website_blog, website_event

New o_cc${xxx} classes where ${xxx} is a number [1-5] to style snippets:
they come with a background color, a text color, headings colors, a
link color, primary button colors and secondary button colors which
will later be possible to customize by the user.

The classes are made so that they are working on two levels. So if a
column receives a color class and the snippet too, everything will work
fine. More than 2 levels are not supported and the editor is made so
those cases should not appear. See o_colored_level class.

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:19 +00:00
Okan SUMER (osu) 9dca556b78 [IMP] website_blog: adjust demo data
This commit add and adjust some data from the demo data

- Modify the authors of blog.post
- Change the field website_published to is_published
  in blog.post to correct the date calculation
- Add comments to blog.post

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

task-2201675
2020-03-17 14:03:08 +00:00
Romain Derie 8fc61fd2b4 [REM] website(_blog/_event): remove filtercolor option on cover
task-2144335
2020-02-04 10:59:22 +00:00
Romain Derie d64eb2981f [REM] website, website_blog, website_event: remove text size on cover
task-2144335
2020-02-03 15:25:20 +00:00
Samuel Degueldre d513c662e0 [IMP] website, *: add full height option and scroll down button
*: website_blog, website_event

This commit adds a "Height" option to sections, allowing them to have a
minimum height of the user's choosing (either full screen height or half
screen height, similar to blog covers). Enabling the full screen option
also allows the user to add a "scroll down button" that will scroll down
to the next section, also similar to blog covers.

As such, the classes doing the corresponding things in website_blog and
website_event have been renamed to reuse the same code.

task-2155710

closes odoo/odoo#41623

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-08 14:13:36 +00:00
qsm-odoo 08cc073369 [REF] website(_blog): make most of the cover_properties system generic
This commit moves most of the logic of cover edition to website. This
will allow to define cover on other non-blog models, like events.

Note: this also "accidentally" fixes a crash during rendering of the
blog page when there is no blog or post.

Part of https://github.com/odoo/odoo/pull/37009
task-2043872
2019-09-27 11:49:53 +00:00
Jeremy Kersten 0a540e0ef2 [IMP] website_blog: improve layout with latest specs
- Hide first post when latest not in full width mode
- Hide navigation Blogs when only 1, else always shown
- Compress image
- Show blog name when in one blog index, show latest when in all blogs
- Merge 2 controllers in one /blog and /blog/<record>
- ...

task-2057433

closes odoo/odoo#36091

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-26 14:49:43 +00:00
Jeremy Kersten 0d1fdb0b95 [IMP] website_blog: refactoring python code for new layout
task-1973902

+ use of img locally
+ last PO review:
+ show latest in the list
+ remove underline
+ force same height if blog or not
+ ...

closes odoo/odoo#34609

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-20 15:47:39 +00:00
sri-odoo bb0cdec459 [REF] website_blog: new blog layout
task-1973902
2019-08-20 15:33:36 +00:00
Romain Derie cc1d78a80b [IMP] *: correctly read/write website_published
The `website_published` field from the website's mixins is basically a readonly
from `is_published` field.
On read, this field will simply read `is_published` and check if the record's
website_id is accessible (only for the multi mixin).
On write, it will always write on `is_published`.

This commit improves a few things:
- A lot of code was writting on website_published which was just then writting
  on is_published. Writting directly on is_published makes more sense.
- Some backend fields would still reference `website_published` instead of
  `is_published` which would just go through the related for no reason.
  Plus, using `is_published` will make the field tooltip more accurate as we
  are not in a website context ('Visible on current website' to 'Is Published')
- Filter and search on tree view were still using the `website_published`
  related field, which is just a readonly when we are not in a frontend
  context.
- Some create and write function would have security check on
  `website_published` value but that was wrong as the user could bypass that by
  simply writting on `is_published`. For the write method, check `is_published`
  is more accurate as it will cover both case since `website_published` will
  then call the write method on `is_published`
2019-08-03 09:51:22 +00:00
Thanh Dodeur c212cfe899 [REF] *: removes datas_fname from ir.attachment
This commit removes the field `datas_fname` from `ir.attachment` as
it was unnecessary and most of the time the duplicate of `name` or
`url`.

Task #1909865

closes odoo/odoo#32976

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-05 09:12:13 +00:00
Nans Lefebvre c26eb41f9e [FIX] *: put all mail.message.subtype as noupdate
The mail.message.subtype model contains a field internal,
which decides if the messages are visible to external users or not.
Such a value should not be overriden at module update,
so all subtypes should be in noupdate.

opw 1946043

closes odoo/odoo#32214

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-28 13:40:41 +00:00
Romain Derie 17573f4094 [FIX] website_blog, website_forum: missing template name
This commit adds various fixes to blog and forum:
  - Some templates were mising a name, resulting in ugly page title
    (eg: forum_all)
  - Latest Blogs page was checking seo keywords to display tags, maybe it was
    coming from an old tag implementation that used seo keywords?
  - If only one forum, land on it directly when accessing /forum, like blog
    does
  - ..
2018-09-25 16:51:31 +02:00
Kishan Gajjar f87d1dad94 [IMP] website_blog: Remove meta from website_blog template.
add default meta tags into product page by override '_default_website_meta' in 'blog.post'
2018-08-22 14:01:32 +02:00
Jeremy KerstenandDerie Romain 602807acdf [FIX] website: improve/fix menu, copy on unlink, clone page, unique_path, sale_report, ...
Fix bug from the initial poc of JOV

Fix menu creation
   - creating a menu would create a 'container' menu in the DB (.create is call without website_id)
   then writing on it would copy (if condition to cow) the menu with a website_id leaving the first
   one as a menu container unused.
   - website_menu should always have a website_id
     we dont want to support the multiwebsite system that allow to have generic/specific menu
     unlink/write is useless now since we always have a website_id

Make unique_path website dependent, 2 distinct website can have a page with same name

Make Sale report multiwebsite compliant

Make website_id on sale_order / account.invoice as a related stored from partner_id.

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
qsm-odoo ed1b18f103 [REF] *: BS4, adapt col-related classes
col-lg-* -> col-xl-*
col-md-* -> col-lg-*
col-sm-* -> col-md-*
col-xs-* -> col-*

col-lg-offset-* -> offset-xl-*
col-md-offset-* -> offset-lg-*
col-sm-offset-* -> offset-md-*
col-xs-offset-* -> offset-*

col-lg-pull-* -> order-xl-1
col-md-pull-* -> order-lg-1
col-sm-pull-* -> order-md-1
col-xs-pull-* -> order-1

col-lg-push-* -> order-xl-2
col-md-push-* -> order-lg-2
col-sm-push-* -> order-md-2
col-xs-push-* -> order-2
2018-07-27 12:36:54 +02:00
qsm-odoo de214e3742 [REF] *: BS4, 'img-responsive' -> 'img-fluid' 2018-07-27 12:36:54 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00
qsm-odoo 7cbb2e6ed3 [FIX] website_blog: set public visibility for default cover images 2016-09-28 14:49:56 +02:00
qsm-odoo 4dd31f645e [IMP] website_blog: add consistent behaviors for cover options
There was no bug but now the behaviors are more consistent :

- Demo data now declare a black invisible filter instead of nothing.
This allows user to see the effect of filter intensity option
(otherwise it had no visible effect since there was no filter color).

- If the filter intensity is set to "None" (invisible filter) and that
a filter color option is highlighted or chosen, a "Low" filter
intensity is automatically highlighted or chosen so that the user see
the filter color he is chosing (instead of having to choose the filter
intensity first).

- Hide the "Size" option on the blog list page since it has not visible
effect there.

- Some code "performance" improvements in option selection.
2016-09-28 13:05:39 +02:00
Martin Trigaux 11812b0b9e [FIX] all: remove external ids fakely from base
Several modules defines records with the external ID `base.foo_bar` while it is
created inside this module (typically menus and groups).
While there is no technical reasons to do so but this may introduce issues:

- these records will not be deleted during uninstall
- if a language is loaded before the installation of the module, it won't be
  translated

The uninstallation will only remove the records with an external id linked to
this module (these would only be removed when removing base).

Installing a language before the module will drop the translations not linked
to an existing external id (as it can not be resolved).

This commit correct all the external ids tagged as from base or other incorrect
modules.
2016-09-02 16:14:26 +02:00
stefanorigano 1ec38c02c5 [IMP] website_blog: replace images and add xml ids
* Replace demo blog post covers
* Add xml ID to demo images so they can be easily replaced by themes
* Remove unused images
2016-09-02 14:57:40 +01:00
qsm-odoo 1c87f1d3bb [IMP] website(_blog): remove "Style" (blog-style) snippet option
The "bigger text" option was an useless option as redundant with the
summernote editor one.

The "narrow" option always resulted in an ugly layout with bugs in
many contexts.

Note: the styling classes are kept for compatibility for now.

+ Adapt demo data of website_blog which rely on the "narrow" option.
Use up to date snippets with reduced column width to get the same
result.
2016-08-31 16:37:20 +02:00
qsm-odoo 74d7de465e [REF] website_blog: refactore cover option and change opacity behavior
* Isolate website_blog style
* Simplify/Correct the cover option JS
* Allow to modify the cover from the blog list page
* Change cover layout (use a more conventionnal odoo design with a
div which is full width, which contains a container(-fluid) then its
content) -> easier to customize.
* Refactore code to be understandable
* Change behavior of opacity filter: before this commit the cover
filter was not intuitive and did not work on IE or Edge, it mixed
the color of the bg-image and the bg-color in a complex way and the
opacity was just controlling if the image was visible clearly or not
(which led in general to ugly style if the opacity was used). Now, the
color in applied *on top* of the image so that its color changes the
hue of the underlying image. The opacity value controls only the
opacity value of the color to mix.

[MIGRATION] Note: as the opacity behavior has changed, the exact same
behavior is not reproductible at all. But for the change to make a bit
of sense in old databases, this should be applied for the field
"cover_properties" of blog posts (with changes in layout):

if cover_properties.background-color != "oe_none":
    cover_properties.opacity = 0.6
else:
    cover_properties.opacity = 1.0 - cover_properties.opacity
2016-08-19 17:44:28 +02:00
fwi-odoo 5e7ccc0e96 [MIG] website_blog: migrate xml files 2016-08-10 17:57:03 +02:00
Thibault Delavallée efd55ab8a5 [REF] various: rename openerp node to odoo in xml files 2016-08-10 15:48:10 +02:00
qsm-odoo a3585b84b5 [FIX] website(_*): stop launching old tours on installation
On website/theme installation and other website_* module installation,
an action was triggered to launch tours. These tours are now used only
for tests and should not be used as onboarding anymore.

Note: in master these tours will be removed to use the new test system.
2016-07-15 17:47:03 +02:00
Jigar Patel 7853d0da26 [IMP] website_blog: Add published date, sort posts on this date + frontent filters
=======
Purpose
=======

For now all the views of blog posts sort them based on creation date. This creation date cannot be
changed (even with server actions). This leads to issues in several cases:

- import of old blog posts from a former system -> all the blog posts have the same date, on the website as well
- website visitors see when the blog post has been created, not published...

=============
Functional Spec
=============

Display blog post sorted by publish date in descending order. If the post has not been published yet,
the published date = creation date. When a post is unpublished and then published again, the publish
date should be updated to the last time it is published.

Add a status filter for published/not published blog posts, by default both are active (only visible
for website admin)
2016-06-06 12:56:56 +02:00
David Monjoie 3e3aa74ea8 [FIX] website_blog: fixed typo in demo data
Change is not retroactive to avoid breaking existing translations.
Courtesy of nmi.
2015-07-30 16:13:42 +02:00
Hitesh Trivedi f2987ea412 [IMP] website_blog : onboarding. The cover image of a blog post is editable (opacity, color, size, ...). Add a new tour, views improvements and new default images 2015-03-17 09:09:27 +01:00
Christophe Simonis 4eb385fc0b [MERGE] forward port of branch 8.0 up to 0ec3c75 2015-01-23 14:57:07 +01:00
Aaron Bohy 3cae676619 [FIX] Use local copies of png instead of fetching them from websites
Debian does not allow fetching data from external website at runtime.
This fixes the privacy-breach-generic lintian warnings for Debian packaging.
The removed youtube url was a dead link...
2015-01-23 11:23:04 +01:00
Jérome Maes aaf37d8e87 [IMP] website_blog : allow multi tags and date filter, clean all the routes, remove group_comment from website_mail (only user and portal can post comment on blog.post, but the form is visible for all), modify the redirect controller to the login form when posting comment, and remove the description field of blog.blog 2014-12-26 16:04:29 +01:00
Christophe Simonis 1d3f8eba87 [MERGE] forward port of branch 8.0 up to 591e329 2014-12-02 16:18:08 +01:00
Amit Vora 4bf9dc4078 [IMP] [FIX] website_blog: better follow mechanism. Now people following
a blog will receive notifications only for published posts. They
will not receive all comments of all posts anymore.
When commenting a post users will receive the answers.

Added tests to try to test this behavior.
2014-11-28 15:12:14 +01:00
Goffin Simon 5f258c831e [WIP] Multi website 2014-09-16 14:11:08 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Thibault Delavallée fbecb8da26 [CLEAN] website_blog: removed some demo data to avoid bloating the diff
bzr revid: tde@openerp.com-20140402115939-q0gh61wp7owov64c
2014-04-02 13:59:39 +02:00
ajay javiya (OpenERP) eff3ce022c [REM] : image
bzr revid: aja@tinyerp.com-20140401092101-neuzx2xuet0e8m7x
2014-04-01 14:51:01 +05:30
Fabien Pinckaers 48afa1fac7 [IMP] security improvement, removing empty doc
bzr revid: fp@tinyerp.com-20140322221507-4xya3el8uxsvkfdz
2014-03-22 23:15:07 +01:00
ajay javiya (OpenERP) 9d0e551091 [IMP] : demo data
bzr revid: aja@tinyerp.com-20140224103628-fsopxc78rywmeoz7
2014-02-24 16:06:28 +05:30
Fabien Pinckaers c12ee07b02 [IMP] cover by default
bzr revid: fp@tinyerp.com-20140223171532-p2ts7i40l8vlmx2p
2014-02-23 18:15:32 +01:00
Fabien Pinckaers a851a16bef [IMP] changes in main view
bzr revid: fp@tinyerp.com-20140223141706-otrugczrfkolidue
2014-02-23 15:17:06 +01:00
ajay javiya (OpenERP) 762598ad9f [IMP] :demo data
bzr revid: aja@tinyerp.com-20140220065732-sftm2n16ww3eq9mi
2014-02-20 12:27:32 +05:30