Commit Graph
5 Commits
Author SHA1 Message Date
Aurélien Warnon 3c88e75c86 [FIX] website_slides: handle publishing rights of channel/slide
Purpose
=======

Handle publishing of the slide.slide/slide.channel accordingly to the new
'can_publish' field in the website published mixin.
2019-02-19 07:08:03 +00:00
Thibault Delavallée 752a3a5169 [FIX] website_slides: improve can upload / publish computation
New rules are

 * on channel type documentation: can upload like before (employee or upload
   groups specified); can publish like before (can upload and publisher)
 * on channel type training: can upload like before (employee or upload
   groups specified); can publish restricted to channel responsible

Tests are added.

This commit is a sub-part of task ID 1902304 (main eLearning task).

closes odoo/odoo#31082
2019-02-13 18:20:05 +00:00
Aurélien Warnon 82ce815a8c [REF] website_slides: rework slide's public and embedded views
Purpose
=======

A slide's 'Embedded views' are reworked as 'Public views' to simplify
the model and be more compliant with the new 'is_preview' field.

The rule is now the following:

A slide is a preview or the view is done as public user (once per session)
-> increment public_views

A slide is viewed as a logged in user that has access to the content
-> increment slide_views
Technically slide_views is a compute of the slide_slide_partner count.

Tests are also added to ensure it is effectively working.

This commit is a sub-part of task ID 1940360 (eLearning integration with
survey) and task ID 1902304 (main eLearning task).
2019-02-13 18:20:05 +00:00
Aurélien Warnon c4c067509e [REM] website_slides: remove the 'state' field of slide.channel.partner
Purpose
=======

The 'state' field for a member of a channel did not imply anything functionally
so we decided to remove it. It allows to remove an unnecessary computed fields.
ACLs are updated accordingly.

If needed, we will soon be able to check partner_ids that have ordered but
not paid a channel / course product by searching the related 'sale.order' model
for such products.
2019-02-08 11:33:09 +00:00
Thibault Delavallée b91add891c [IMP] website_slides: add tests
Currently website_slides module lacks tests. This commit adds base for tests
and add some tests related to recently cleaned access rules and rights.

Future commits will gradually add more tests to the module as it evolves
towards a more broad and up-to-date application.

This commit is linked to task ID 1937411 and PR #30847.
2019-02-07 13:45:57 +00:00