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).
closesodoo/odoo#31082
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).
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.
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.