Files
odoo_source/odoo/modules
Benoit Socias a2f8e18b76 [IMP] website, base: generate distinct templates for new pages
This commit is a preparation for the new page from template feature.

In order to make it possible for new page templates to be customizable
at several levels from themes, it was decided to create several layers
of primary templates.
Those templates are build from the descriptions found in manifest files
under the new `new_page_templates` key.
The same principle is also applied for configurator pages (described in
manifest files under the `snippet_lists` key) because we noticed that
some of the changes that were made in themes for some blocks were not
supposed to impact the "drag'n'drop" version of the block, but only
the version used inside the pages generated by the configurator. (E.g.
connecting shapes between blocks)

The manifest entries now have the following structure:
```py
'snippet_lists': {
    'somepagename': ['s_block_name', ...],
},
'new_template_pages': {
    'somecategoryname': {
        'sometemplatename': ['s_block_name', ...],
    },
},
```

This commit finds those entries in the manifests and creates the
following primary templates:
- `s_block_name`: already exists, this is the block that is drag and
dropped using the website builder
- `configurator_s_block_name`: specialization of `s_block_name` used in
all pages generated by the configurator
- `configurator_somepagename_s_block_name`: specialization of
`configurator_s_block_name` for that specific page
- `new_page_template_s_block_name`: specialization of `s_block_name`
used in all new page templates
- `new_page_template_somecategoryname_s_block_name`: specialization of
`new_page_template_s_block_name` used in new page templates of that
specific category
- `new_page_template_somecategoryname_sometemplatename_s_block_name`:
specialization of `new_page_template_somecategoryname_s_block_name` for
that specific template

For the template pages defined in `website` it also creates primary
templates that assemble `t-snippet-call`s of the most specific block
templates. Those templates are named
`new_page_template_sections_somecategoryname_sometemplatename`.

task-3381714

Part-of: odoo/odoo#126719
2023-10-14 03:27:03 +00:00
..
2023-06-08 12:11:07 +02:00
2023-10-06 14:33:43 +00:00