Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Popup overrides previous popup

By
chesucr
on 1/21/15, 5:13 AM 364 views

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!!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/21/15, 5:13 AM
Seen: 364 times
Last updated: 3/16/15, 8:10 AM