odoo / odoo/documentation

Inner content snippet cannot be placed

Open
#8,771 5 comments 0 reactions 1 assignee View on GitHub

@CVDE-odoo is already working on this.

Since Apr 16, 2024.

Dominant language
reStructuredText
Stars
1.3k
Forks
12.1k
PR merge metrics
No merged PRs in 30d

Description

Impacted versions: 17.0

Steps to reproduce:

    <?xml version="1.0" encoding="utf-8"?>
    <odoo>
        <template id="s_custom_snippet" name="Custom snippet">
            <div class="s_custom_snippet" data-drop-in=".content, nav" data-selector="custom-snippet">
                Foo Bar
            </div>
        </template>
    </odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="snippets" inherit_id="website.snippets" name="Custom">
        <xpath expr="//div[@id='snippet_content']/div[@class='o_panel_body']" position="inside">
            <t t-snippet="custom_web_blocks.s_custom_snippet" t-thumbnail="/website/static/src/img/snippets_thumbs/s_card.svg">
                <keywords>Custom</keywords>
            </t>
        </xpath>
    </template>
</odoo>

Current behavior:
image
Snippet cannot be dragged, is disabled and when inspected with devtools it has the title "No location to drop in" - even though data-drop-in is filled.

Wrapping the snippet into <section></section> works as expected

Expected behavior:
Snippet should be draggable into .conent and nav elements.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.