Commit Graph
1284 Commits
Author SHA1 Message Date
Romain Derie d92f76592c [IMP] website(_blog/_slides): show a toaster when a record is published
This commit shows a toaster when publishing a record through the toggle in the
topbar.
The `_description` field is used to do that, as it is supposed to contains a
'business oriented' descriptive name, see task-37311. Indeed, this field is
used in studio and in mail templates.

task-2144335
2020-02-03 15:25:20 +00:00
David Beguin 9f73ff62f0 [FIX] website_slides: save video thumbnail on slide creation
Linked to issue: https://github.com/odoo/odoo/issues/43745

At slide creation, as image_1920 was in readonly mode in form view when type is
video, document or presentation, the field was not sent in value to the create.

There is no reason to set this field readonly. If the user want to modify the
thumbnail, that his responsability.

This commit remove the readonly flag for slide.image_1920 field to allow
computed thumbnail to be saved at slide creation.

Task ID: 2182638
PR #44405

closes odoo/odoo#44472

X-original-commit: 15af8734c5d16a358cababb6163863b30e24f8cc
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-03 11:10:04 +00:00
qsm-odoo 599b5910f0 [REF] website, *: review xml using old title classes and structure
* website_event, website_forum, website_slides

Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:03 +00:00
qsm-odoo 4ca401a855 [REM] website, *: remove s_btn snippet
* website_slides

Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:01 +00:00
Florent Lejoly 9b1145001a [FIX] website_slides: use image_1920 instead of invalid 'image' field
Since the renaming of image fields to image_resolution (image_1920 in our case)
slide upload widget is using invalid field.
This commit adapt the field name to use the new naming (image_1920) instead.

Task id: 2179219
PR #43663

closes odoo/odoo#43816

X-original-commit: 5991eb5b3ba9c6fb9426db235da7c8eb3821f0e1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-23 08:40:39 +00:00
Romain Derie 98678199a3 [FIX] *: fix translations inconsistency in 't-set'
This commit fix most `t-set` errors that either led to:
  1. unwanted text to be considered as translatable.
     eg: `<t t-set="classes">text-left bg-100 p4</t>` would create an
     `ir.translation`.
  2. text that should be translatable were not.
     eg: `<t t-set="text" t-value="'Both'"/>` would not create an
     `ir.translation` while it should.

If a text should be translatable, it should never be inside a `t-value`:
  - `<t t-set="text">Both</t>`
If a text should not be translatable, it sould either be inside `t-value`,
`t-valuef` or the `<t>` tag should have `t-translation="off"`:
  - `<t t-set="classes" t-translation="off">text-left bg-100 p4</t>`
  - `<t t-set="classes" t-valuef="text-left bg-100 p4"/>`
  - `<t t-set="classes" t-value="'text-left bg-100 p4'"/>`

https://github.com/odoo/odoo/pull/43660
https://github.com/odoo/enterprise/pull/7839
https://github.com/odoo/design-themes/pull/203

closes odoo/odoo#43660

Related: odoo/enterprise#7839
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2020-01-21 15:32:08 +00:00
51b36c3dbb [IMP] base: add default image for users + placeholder if unassigned
1/ When the new database is created without demo data, the admin has a
   'silhouette' as a default picture. When a new user is created without
   picture given by the current user, the new user will have a 'silhouette'
   as a default profile picture.

2/ web: image for fa-user-slash. This image will be used when a record is
   unassigned.

3/ web, *: Change placeholder by default when record is unassigned.
   We want to have a fa-user-slash icon when a record is unassigned instead
   of 'placeholder.png'. A method is created in the BaseModel to have a
   generic method to change easily the placeholder for other models.

4/ Adapt kanban test to keep the same behaviour. Attention the behaviour is
   a bit different. Because, now the default image is given by the server to
   change easily the default image when a record doesn't have an image.
   Thus, we don't say if it's the default placeholder, but we can say it's
   not the same image of the record (in this test, the record, it's the
   partner).

5/ misc: display 'Unassigned' in the hover on kanban cards if record is unassigned

closes odoo/odoo#41356

Taskid: 2060206
Related: odoo/enterprise#7758
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: jdoutreloux <jud@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2020-01-21 09:22:46 +00:00
Tiffany Chang (tic) 830395e49a [IMP] website_slides,portal_rating: update UX
Minor updates to improve user useability of website_slides primarily with
clearer wording and more intuitive displays/display interactions. Primary
purpose is for onboarding wow.

Related to:

closes odoo/odoo#42030

Task: 2070662
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-16 09:11:27 +00:00
Mohammed Shekha a402dba783 [IMP] website_slides: adapt pdfjs 2.2.228
Use window.pdfjsLib instead of window.PDFJS.
PDF returned through getDocument() has _pdfInfo variable instead of
pdfInfo.

task-2124443

closes odoo/odoo#40917

Related: odoo/enterprise#6900
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-01-07 05:21:22 +00:00
Swapnesh Shah eb04e1c9ad [IMP] website_slides: use float_time widget on total_time
In this commit we use the float_time widget on total_time field in order to
achieve an amazing wow onboarding back2basics effect.

closes odoo/odoo#42360

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 15:37:09 +00:00
Patrick Hoste 40d2f95a8d [IMP] website_sale_slides: add buy button to documentation courses
Currently if slides officers or managers define documentation courses as
on payment there is no easy way for customers to buy it.

In this commit we add a button on the frontend to allow the end user to buy
a documentation course like a training course. This button is displayed
only for on payment documentation courses, leaving other documentation courses
displayed untouched.

Task ID : 2125086
PR : odoo/odoo#40679

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 15:12:48 +00:00
Samuel Degueldre 6481d0b353 [REF] website, *: remove unused class oe_custom_bg
*: web_editor, website_forum, website_mass_mailing, website_slides

This class no longer does anything.

Part of odoo/odoo#41561
task-2155808

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-31 13:25:21 +00:00
Thibault Delavallée 9a0267ee36 [FIX] website_slides: do not display links to unviewable slides
Channel allow to browse slides and a list of available slide is displayed
as a left panel in the eLearning frontend. Even slides current user
cannot see are displayed in order to give some information about course
content. Accessible slides are clickable, other slides should be
displayed as strings. However due to some sudo when computing slide
informations all links are set as clickable.

There is no security issue as when being redirected to a slide the
user cannot access there is an acl error. However he should not have
the links displayed, just strings. This commit fixes that behavior.

closes odoo/odoo#42338

X-original-commit: 04a957bb18665957faf87b6c47996643adbd4558
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-24 11:02:33 +00:00
Patrick Hoste 1894dc5414 [IMP] website_slides: allow to download slide content and additional resources
PURPOSE

Currently eLearning lacks feature of having downloadable resources on
lessons. Indeed for example teachers would like to attach zip files or
other resources linked to a given lesson.

SPECIFICATIONS

You can now allow the user to download the slide content for pdf and image
slides. A new icon will be visible next to the fullscreen button on the pdf
viewer.

Course maintainers can also add additional resources to a slide which will be
available to download for the user.

Task ID 2066741
PR #39890

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-24 09:53:20 +00:00
Patrick Hoste e42ee496f8 [IMP] website_slides: add comments on answers showed after answering a quiz
PURPOSE :

A quiz after a course content is a good way to check if the user gets the previous lesson.
Despite, the user/student may not understand why his answer was wrong/correct.
In this task we'll allow the teacher to add a comment next to the asnwer of a quiz.

SPECIFICATION :

The quiz creator will now be able to comment the answers to inform the frontend user why
his answer is wrong/correct. He will be able to add the comments both in backend and frontend.

Task ID : 2072566
PR : #41188

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-24 08:56:12 +00:00
Debauche Stéphane 01dadaecca [IMP] website_slides: improve error message when google API key is invalid
Currently when there is an issue with the google API key, a generic message
is send to the user, with the error details embedded in it in an ugly way.

Now a message is displayed: "Your Google API key is invalid, please update it
into your settings. Settings > Website > Features > API Key". This is done
by parsing the JSON google sends back after request and determining if the
error is linked to the API key.

Task #2082857

closes odoo/odoo#40547

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-20 12:24:43 +00:00
Patrick Hoste 7b0df05706 [MOV/REF] website_slides: move quiz finish modal to its own dialog widget
This commit moves the finished quiz modal into a dedicated dialog widget.
It will lessen the "slide_course_quiz.js" code length and simplify the dialog template.

Task ID : 2126621
PR : #40801

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-18 09:11:24 +00:00
Thibault Delavallée 4ef326de3c [FIX] website_slides: fix wrong comodel name in many2many
Channels uses tags allowing to categorize and filter content. For that
purpose a m2m exists between channels (slide.channel) and tags (slide.channel
.tag). The 2many relationship from tags to channels holds however a wrong
comodel name. It has no impact on code since relationship table is
correctly defined and current code does not use the channel_ids fields
from tags.

closes odoo/odoo#42244

X-original-commit: 46c3ac94485292c59fdfe4b21a8e32eef9d1f998
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-20 10:38:22 +00:00
Jérémy Hennecart cbab93f40c [IMP] website_slides: rename string for quiz attempts
When exporting fields, the reward attempts fields were split from each other. By grouping them, it allows
easier management from user as all rewards fields are now grouped in the export wizard.
Additionaly, they are also grouped in the dropdown for custom filter.

task-2155189

closes odoo/odoo#42103

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-18 11:54:40 +00:00
Aurélien Warnon 648bbbec9a [FIX] website_slides: fix slide.slide statistics compute method
The slide.slide and slide.channel "_compute_slides_statistics" methods do not
always assign a default value for the "total_slides" field.

This can cause some CacheMiss and seem related to nondeterministic errors on
the runbot.

Task#2123711
Runbot build error ID 247

closes odoo/odoo#41942

X-original-commit: c240d04ed0518897f76b315cd354ea6606aea645
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2019-12-12 13:38:51 +00:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Florent Lejoly 39979b7558 [FIX] website_slides: fix cancel of uploaded file
Steps to reproduce

  * connect as any user with right to edit website;
  * go to website and chose a course;
  * add content -> chose any of the possibilities;
  * click on choose file, select a file and open it;
  * click on choose file again, and then cancel

You get a traceback. This is due to the right panel that displays a preview
of the selected file. IN this commit we fix that issue by removing the
preview panel.

Task id 2146217
PR#40895

closes odoo/odoo#41837

X-original-commit: e59b86e6474ae994307952d53f4e5a7571ac1763
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-13 09:53:13 +00:00
mcm-odoo 90bf317c01 [REF] website_slides: define specific eLearning user groups
PURPOSE

Have user groups specific to eLearning to separate them from generic website
editors. Indeed this is a specific work area and require more than pure design
skills.

SPECIFICATIONS

Two user groups are added in this commit

  * group_website_slides_officer

    + can read any course/slide
    + can create a course (will be responsible)
    + can write on its courses
    + can upload slides to the courses he is responsible
    + can publish slides to the courses he is responsible
    - cannot unlink courses/slides (you should archive them)

    * implies group_website_publisher in order to see the top navbar in
      frontend with the publish toggle button and the new content button;

  * group_website_slides_manager: has full rights

    + can read any course/slide;
    + can create a course;
    + can add slide to any courses;
    + can publish any courses/slides;
    + can unlink any courses/slides;
    + has access to reporting menu entries;

Rights for other groups are untouched for courses / slides. As a reminder
we still support responsibles being outside of eLearning groups, for example
if an employee is a teacher that handles a course:

  * people in upload_group_ids of a channel can upload slides, even if they
    don't belong to any eLearning group;
  * people responsible of a course can upload and publish slides even if they
    don't belong to any eLearning group (done through controller as they
    don't have real rights on underlying models);

We choose to keep the survey rights separated from eLearning ones. Indeed
it is easy in odoo to update the imply_ids field of groups if necessary
to link survey / eLearning groups; default user template can also be updated
easily. Standard Odoo should therefore correctly separate those groups. The
only specific rights is that eLearning officers can read all surveys, allowing
to choose them for certification-based courses.

LINKS

Task ID 2062462
PR #39485

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-12 14:12:51 +00:00
Nicolas Martinelli b0605b4adc [FIX] *: make ribbon text translatable
closes odoo/odoo#41749

X-original-commit: 64c259fc74a8181aa381b6647a9816b6f5530dfd
Related: odoo/enterprise#7216
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-04 12:01:16 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
Julien Castiaux c999d98421 [FIX] website_slides: image no more available
[Nighly Runbot #730241](http://runbot.odoo.com/runbot/build/730241)

closes odoo/odoo#41571

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-12-10 10:46:05 +00:00
Julien Castiaux ffeea439ca [FIX] website_slides: move tours under /static/
All assets have to be loadable directly from the browser, /tests/ is not
accessible, /static/ is.
2019-12-10 10:46:00 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Thibault Delavallée 9e0677882d [MOV] website_rating: move to portal_rating
PURPOSE

Clean posting process and improve mail.message definition and comprehension.
Move as much possible content from website_* modules to portal_* modules
to ease their use in customer portal

SPECIFICATIONS

Now that publish feature is replaced by internal directly in mail and portal
rating portal inclusion can be done safely in a portal_ratign module instead
of website_rating. It allows to remove the dependency and give the rating
feature of customer chatter directly in portal applications.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:45 +00:00
Thibault Delavallée 5649fc88e8 [REF] {website_}mail: move and replace published field of mail.message to is_internal
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

Website mail defines a website_published field allowing to publish / unpublish
comments on the frontend of some modules. This field has several drawbacks :

  * it is used only for front-end people (portal, public) and has no real
    effect in chatter / classic discussions;
  * it is used only in some advanced front-end module and is not available
    in portal by default;
  * its naming is not really correct as it is not linked to fields coming
    from the website_published mixin and its behavior is not really
    the same;
  * its use is a bit duplicated with internal flag coming from subtype
    allowing to hide messages related to an internal subtype;
  * there are overrides of standard mail.message methods just to handle
    this flag;

In this commit we change that field by an is_internal flag directly on
mail.message model itself. It tells if share people (customers, share users)
are allowed to read the message. This field can be given through posting
API or set manually using widgets. It is also used in access rights custom
methods and managed like the internal flag of subtypes.

Mailgateway was already using an internal flag for internal note replies. It
is renamed to is_internal and propagated as it is now a standard field. It
also eases code understanding.

Portal is updated to allow managing the flag directly. It means customer portal
now natively allows to moderate customer comments without any need of website
modules.

Rating is updated accordingly. An is_internal field is added, replacing the
related on website published.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Thibault Delavallée e2b33f460d [REF] mail, various: rename subtype parameter of message_post to subtype_xmlid
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

In order to be more explicit subtype parameter is renamed to subtype_xmlid.
It therefore clearly indicates it should be a valid subtype Xml ID. Support
of ill formatted Xml IDs is removed because there is no reason to try to
add some random prefix. Give something that exists or go to hell, punk !

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Julien Castiaux 98374bb0cd [FIX] website_slides: external tour used old code
Fine tunning of 07f70e3c1

closes odoo/odoo#41194

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-02 15:05:48 +00:00
Florimond Husquinet (fhu) 0a46e086c0 [IMP] website_slide: improve the ways to search through courses
PURPOSE

Purpose of this commit is to improve search capabilities of eLearning
frontend application. Searching tags and content should be easier to
do, update and notice.

SPECIFICATIONS

Before this commit
- There is no visual indication to what are the selected filters.
- The user can only select one tag in each dropdown box.
- When the user selects a tag on one course card, this tag replaces all other
filters.
- When the user enters custom search terms, it replaces all other filters.
- When searching a documentation, a stacktrace appears.

After this commit
- Selected tags appear as little tag boxes under the search bar.
- The custom search terms appear as one tag box.
- It's possible to remove a search tag by clicking on the cross present in each
little box.
- It's possible to select multiple tags in each dropdown box.
- Tags in course cards work the same as tags in dropdown boxes, and add
themselves to the list of filters.
- To generate the list of courses to display, a logical OR is operated between
tags of the same group, and a logical AND is operated between groups of tags.
- A logical AND is operated between the custom search terms and other filters.
- A logical AND is operated between the "My courses" options and other filters.
- Bug when searching a documentation is fixed.

LINKS

Task ID: 2080617
PR #39259

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-02 10:18:36 +00:00
qmo-odoo a82fd08813 [FIX] website_slides: Fix traceback when creating content in mobile
This commit fixes the traceback that happens when we try to create
a question from the survey form in mobile mode.

The problem was due to the context not being propagated
to the "add record" button that appears in mobile mode.
Therefore, as we use that context in our widget, it crashes.

The solution to this is to just use the normal tree view behavior
instead of our override when we are in a mobile environment.

LINKS

closes odoo/odoo#41143

Taskid: 2071342
Pr: #40694
X-original-commit: 0dc7d956c59dfbece1f05e475c227affd51ce435
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-29 16:00:05 +00:00
Thibault Delavallée 1838191eec [REF] mail, various: improve mail creation calls, notably author and email from default computation
Purpose of this commit is to correctly compute author_id and email_from
in mail_message and mail_mail as they depends from each other. Moreover it
is a good idea in various flows to specify email and author when giving
creation values to avoid default computation that is not always guaranteed to
be accurate notably when involving super user.

Mail message creation could lead to desynchronized values between author
and email_from. This is improved with this commit by correctly inheriting
from default_get and computing both of them at the same time instead of having
two default values. Indeed they depend on each other.

Same thing is done for mail composer. Mail Thread offers a tool method to
find email_from / author_id based on having one of those values or current
user and it is called whenever necessary.

Some calls to mail template send_mail are also cleaned.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Thibault Delavallée b9a22d2f24 [IMP] mail: add computed fields for company emails
Purpose of this commit is to give a way to access to company email and catchall
with formatting. Those will be used in various automated emails. Indeed
currently several templates use either ``company_id.partner_id.email``,
``company_id.email``, or even don't provide fallback values.

With this commit from a company record people will be able to use

  * a correctly formatted catchall: ``"My Company Name"
    <catchall_alias@catchall_domain>``
  * an email_formatted field like partner email_formatted that is either its
    partner-related email_formatted value, or formatted catchall if its partner
    is not correctly configured;

Various calls to mail creation are updated accordingly.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Hoste Patrick ec9e389f2f [IMP] website_slides: allow to create and update quizzes directly in frontend
Purpose is to ease designing your courses by allowing to create and update
slide quiz directly in frontend, within the slide display.

With this commit you are able to

  * add a quiz to a slide or add a question to an existing quiz;
  * edit an existing question from a quiz:

   * change the title of the Question;
   * add, remove or update answers;
   * change the right answer;
   * delete an existing question;
   * reorder the questions from a quiz;
   * reset the quiz for the current user if he is a website designer, allowing
     to test the quiz and its answers;

New frontend widgets are introduced allowing to manipulate quiz. Slide page
now supports a readonly / taking quiz mode and an edit mode for quizzes
used notably for website designers / course maintainers.

Task ID : 1999636
PR : #35326

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-29 13:36:25 +00:00
Thibault Delavallée a4abdfa316 [IMP] website_slides: merge slide quiz answers constraints in a single method
Currently there are several checks on answer integrity for slide quiz
questions. In this commit we simplify code to effectively implement
what is requested: 1 valid answer and at least 1 invalid answer.

Task ID 1999636
PR #35326
2019-11-29 13:36:25 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Aurélien Warnon 34b1ceb942 [FIX] website_slides: fix slide.slide statistics compute method triggers
The slide.slide "_compute_slides_statistics" method is missing the 'slide_ids.sequence' trigger.
It should be specified for cases when one of the slide_ids changes category (determined by the
sequence).

This can cause some CacheMiss and seem related to nondeterministic errors on the runbot.

PR #40705
Task#2123711
Runbot build error ID 247

closes odoo/odoo#40867

X-original-commit: 1994f544694051a767ecda88a12dee5c5579add2
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2019-11-25 08:38:03 +00:00
David Beguin be3f074a91 [REF] gamification, * : rename challenge.category into challenge.challenge_category
To ease grep in the code, especially that challenge is quite heavily used.

Task ID : 1961053
PR #32594
2019-11-22 14:45:39 +00:00
Romain Derie 4178a383fd [IMP] http_routing, portal, website_*: clean 404 templates
A nicer 404 layout was introduced with e9106f8f98 but the specs got changed
just after it was merged.

It has been decided to make the 404 fully editable (before, everything was
fully editable except the popular page div).

In order to do this, the 404 template can't have inherited views, which brings
the following changes:
1. Remove every main website module xpath view adding their most popular page
2. Remove the xpath view in portal to add popular page part (was not needed
   in http_routing/web). It has been decided that having `Home` ('/' url) even
   without portal and/or website is not a big deal.

Those changes allow the 404 template to be written in a single view without any
inherited views.
The 404 will be the same for backend only databases, portal and website.

task-1966460

closes odoo/odoo#40637

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-21 14:12:47 +00:00
Florimond Husquinet (fhu) 07f70e3c10 [IMP] website_slide: add a card description independent from short description
The Channel model contains the two following fields: `description` and
`description_html`. The former is a short plain-text description that can be
filled in the creation form. The latter is a long html-formatted description.

Before this commit:

The description displayed on the card of the course is the `description` field.

After this commit:

There is an additional `description_short` field, which is initialized to the
same value as the `description` field. If the `description` field is modified
the `description_short` reflects the modifications. This happens however only
if the user didn't modify the `description_short` field manually. If it is
modified to another value manually, the link is broken.

Description short is now used only on the course page, below title, in the
header. Description short is used in kanban card displayed in homepage.
Html description is used as a long course description on course page.

Beside, in the creation form of a course, the description textarea is now a
one-line input field to reflect the fact that it's supposed to be a relatively
short description.

Task ID: 2026165
PR #39388

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-21 12:25:52 +00:00
laa 92cc770c90 [IMP] website_slides: indicate new content on courses to users
Purpose of this commit is to help users knowing there is new content in a
course by adding a visual insight. It is done through a new content arrow
displayed in courses homepage.

Regarding the file "website_slides_templates_homepage.xml", the choice to
incorporate the t-call attribute into a 't' balise was necessary to display
the customize option (part front) associated with the model course_card.

Side dish usability improvements raised during development

  * display completed courses as last instead of first in "my courses";
  * do not show promote strategy field for training courses as it has no
    use, only for documentation courses;

TASK ID 2025186
Closes PR #36703

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 14:59:07 +00:00
Thibault Delavallée a8449773dc [FIX] website_slides: add explicit depends on non stored computed fields
Even if it works in current flows it is better to give some fields their
right triggers (fields and uid).

PR #36703
2019-11-20 14:43:15 +00:00
Thibault Delavallée 7a3217f810 [MOV] website_slides: keep files well organized
Oversight of 9b38bcec12

PR #36703
2019-11-20 14:43:03 +00:00
Debauche Stéphane 249aad8f70 [IMP] website_slides: update demo data course responsible / attendee
Before
======
In the demo data, we manually add ``admin`` as an attendee of his course,
and then we remove it with ``_remove_membership`` because he will be added
automatically in python.

Now
===
We do not add ``admin`` as an attendee of the course, and we remove the
``_remove_membership`` call. We also change the responsible of some courses
so admin can join some courses.

Task ID 2120225
PR #39886

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 13:07:20 +00:00
ryv-odoo c7a1a2d964 [REF] rating, various: improve rating.rating ACLs
PURPOSE

Rating model should be available only for internal users. External users
access them only through dedicated routes or controllers using sudo and/or
granting access through tokens. Therefore simplifying ACLs should be feasible.

SPECIFICATIONS

Remove access to rating.rating for public and portal users. Only employees
can access it, with full access given to system admins.

Update various functional flows to use sudo() and check that access is
verified before using sudo.

Impacted modules

  * rating / mail: add groups on some rating related fields as only
    internal users should access them now;
  * rating / mail: set some statistics fields using compute_sudo as their
    value should be accessible for external people even without access to
    the underlying rating.rating records;
  * project: makes some use of rating and has to be updated, notably for
    the public rating page;
  * website_{livechat, rating, slides}: add sudo in public routes as access
    is already granted;
  * website_slides: set statistics field using compute_sudo as their
    value should be accessible for external people;

TASK ID 2053096
PR #36592

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-19 15:46:51 +00:00
Romain Derie e9106f8f98 [IMP] http_routing, portal, website: nicer 404 layout
This commit introduces a nicer 404 page, which is basically the same layout as
the one used on Odoo.com.

Also, the 404 is now fully customizable, blocks can be drag'd & drop'd.

task-1966460

closes odoo/odoo#38901

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-18 13:59:09 +00:00
Victor Feyens 4e3e268083 [FIX] website_slides: default values for all compute fields.
closes odoo/odoo#40263

X-original-commit: 2cab75b41763fed0b86d919e005d9a65cd3b85ac
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-14 12:56:57 +00:00