Skip to content
Snippets Groups Projects
Commit b180c66a authored by qmo-odoo's avatar qmo-odoo Committed by Thibault Delavallée
Browse files

[REF] website_slides: replace slide.category by slide with is_category flag

PURPOSE

Like already done for sale order, invoice of survey, purpose of this commit
is to remove category model and replace by a flagged line (slide). It allows
to easily reorder slides in an embedded list view.

SPECIFICATIONS

Instead of having a fully fledged slide.category model, slide.slide will serve
that purpose with a is_category flag. This will allow to drag and drop slides
and sections in the channel form view.

This change had an impact on the way slides were added/sorted on the front-end.
In fact, whenever a slide is added from the front-end, a resequencing of all
the slides in the course has to be triggered.

Category of a slide is now a computed field based on the sequence. Order
of slides is based on sequence, with categories splitting the slide list based
on is_category flag.

In this commit tests are added. Some cleaning in tests is also performed to
speedup a bit tests (savepointcase) and some cleaning / renaming to ease
their understanding.

Future commit will add JS necessary to manage slides in the section list view.

LINKS

TaskID: 1978731
PR: #33255
parent 5f4c7c5a
No related branches found
No related tags found
No related merge requests found
Showing
with 433 additions and 390 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment