| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<!-- |
| 4 |
Non-website snippets need to be generated in the same way as other snippets, following the format |
| 5 |
module_name.configurator_{snippet_name} or module_name.configurator_{page}_{snippet_name}. |
| 6 |
Since these snippets are module-specific (e.g. website_sale) and do not exist in the website module |
| 7 |
itself, their parent_id cannot be resolved during generation until the respective module |
| 8 |
is installed. |
| 9 |
|
| 10 |
To handle this, configurator snippet addons are declared inside their own module manifest. |
| 11 |
This makes the generation process independent, generic, and consistent with how themes also declare |
| 12 |
their configurator snippets. As a result, snippet templates are only generated when the |
| 13 |
corresponding module is installed, ensuring that dynamic snippets are correctly created and linked |
| 14 |
at the right time. |
| 15 |
--> |
| 16 |
<function model="ir.module.module" name="_generate_primary_snippet_templates"> |
| 17 |
<value eval="[ref('base.module_website_sale')]"/> |
| 18 |
</function> |
| 19 |
|
| 20 |
</odoo> |