Inner content snippet cannot be placed

Đang mở
#8,771 5 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@CVDE-odoo đang làm issue này rồi.

Từ ngày 16/4/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
reStructuredText
Star
1.4k
Fork
12.3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của odoo/documentation

Tất cả issue của odoo/documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.