Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2306 Zobrazení

Hello everybody,

I wanted to insert pictures in a ckeditor editor to send a email in OpenERP v7

I made a popup form with a image gallery and I open it when I press a button

The code of the action window:

<record id="action_wizard_gallery" model="ir.actions.act_window" >
    <field name="name">Galeria</field>
    <field name="type">ir.actions.act_window</field>
    <field name="src_model">mail.compose.message</field>            
    <field name="res_model">email.template.image</field>
    <field name="view_type">form</field>
    <field name="view_mode">form</field>
    <field name="view_id" ref="email_template_gallery_image_form_view" />
    <field name="target" >new</field>
    <field name="nodestroy">True</field>            
</record>

And I call the button like this:

<record model="ir.ui.view" id="mail_compose_message_form_image">
    <field name="name">mail.compose.message.form</field>
    <field name="model">mail.compose.message</field>
    <field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
    <field name="arch" type="xml">
        <xpath expr="/form//field[@name='body']" position="after">
            <button name="(mail_extended.action_wizard_gallery)d" type="action" class="oe_button oe_form_button oe_insert_image oe_edit_only" string="Insert Picture"  />
        </xpath>
    </field>
</record>

If I call the gallery popup from a form that is not a popup everything works fine, if I call the gallery from a popup the previous popup is overrided

Is possible to indicate to the new form who is its father or how can I fix this?

Thanks in advance!!

Avatar
Zrušit