Skip to content

[13.0][OU-FIX] website_slides: categories migration#2924

Merged
pedrobaeza merged 1 commit intoOCA:13.0from
Tecnativa:13.0-ou-fix-website_slides-mig
Oct 5, 2021
Merged

[13.0][OU-FIX] website_slides: categories migration#2924
pedrobaeza merged 1 commit intoOCA:13.0from
Tecnativa:13.0-ou-fix-website_slides-mig

Conversation

@chienandalu
Copy link
Member

The fields is_preview and is_published are values expected be True as default when the category is created. It can be seen how in the create() and in the write() this is explicitly evaluated as long as in the controller, which is the main way to create categories now. Also, we must ensure that those categories are active. Al should be as the old specific model didn't have the field itself.

cc @Tecnativa TT32244

We should also decide what to do with public slides. In v12, they were public or not. In v13 with the eLearing orientation they're visible only if:

  • They are free previews (field is_preview set to True)
  • The user is subscribed to the channel.

So to translate that from one version to the other we should either:

  • Set is_preview on (then an ugly Free preview badge is shown.
  • Autosubscribe public and portal users.

What's would be the better way?

The fields `is_preview` and `is_published` are values expected be `True`
as default when the category is created. It can be seen how in the
`create()` and in the `write()` this is explicitly evaluated as long as
in the controller, which is the main way to create categories now. Also,
we must ensure that those categories are active. Al should be as the
old specific model didn't have the field itself.

TT32244
@MiquelRForgeFlow MiquelRForgeFlow added this to the 13.0 milestone Oct 4, 2021
@pedrobaeza pedrobaeza merged commit dee8235 into OCA:13.0 Oct 5, 2021
@pedrobaeza pedrobaeza deleted the 13.0-ou-fix-website_slides-mig branch October 5, 2021 18:48
@pedrobaeza
Copy link
Member

For the tag for other times, you can put it as [OU-FIX].

For the public thing, are you able to subscribe to groups or to have an auto-subscribe mechanism?

@chienandalu chienandalu changed the title [13.0][OU] website_slides: categories migration [13.0][OU-FIX] website_slides: categories migration Oct 6, 2021
@chienandalu
Copy link
Member Author

For the public thing, are you able to subscribe to groups or to have an auto-subscribe mechanism?

Yes, you can assign groups to the channel and users belonging to them will autosubscribe. Otherwise, only portal and internal users can subscribe manually (I should check this fact) to the public channels in order to view their slides.

@pedrobaeza
Copy link
Member

Then the migration script can subscribe automatically Portal and Public groups to this public channels for equivalent behavior, isn't it?

@chienandalu
Copy link
Member Author

chienandalu commented Oct 6, 2021

Yes if we choose that way to go :) The other is to set those slides as is_preview, which has the lateral effect of showing that ugly label. So answering myself 😅 , yes the more seamless method will be autosubscribing those groups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants