This question has been flagged
2 Replies
4878 Views

hello all
i'm new to odoo and i have a problem in my snippet where i trying to create new one but it seems required  something called insert action 
her's my snippet xml code 


<template id="snippet_selection" inherit_id="website.snippets">
        <xpath expr="//div[@id='snippet_structure']/div[hasclass('o_panel_body')]/t[@t-snippet='website.s_cover']"         position="after">
<t t-snippet="bootstraptheme.snippet_testimonial" 
            t-thumbnail="bootstraptheme/static/img/emp.png"/>
         </xpath>
</template>


<template id="snippet_testimonial" name="Testimonial snippet">
<div id="snipt" >
  <img alt="client" class="img-circle" src="bootstraptheme/static/img/emp.png"/>
            <h3>Employee Name</h3>
          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
          </div>
</template>

      when i trying to upgrade my snippet the error is:

" Testimonial snippet have not insert action: data-drop-near or data-drop-in"


Thanks

Avatar
Discard
Best Answer

Hi,

data-drop-near and data-drop-in attributes defines where the snippet should be droppable. If you start your snippet with a section tag, then it will be droppable on all divs with classes oe_structure and oe_empty. You can mention where your snippet should be droppable using data-drop-near and data-drop-in attributes.

Example

<div id=“id_of_div”


    data-selector=“selector_of_snippet”


    data-drop-near=“tags or class or id of elements where the snippet should be dropped near to”


    data-drop-in="tags or class or id of elements where the snippet should be able to be dropped in to"/>


Regards

Avatar
Discard
Best Answer

Hi,

I am also facing this same issue. I have created a custom snippet and while I drag and drop the snippet into the page, I got this error:
snippet have not insert action: data-drop-near or data-drop-in


Avatar
Discard