Odoo Help


Help adding button to partner to create templated email

Steven Haufe
on 8/18/14, 4:06 PM 840 views

I want to add a button to the partner view to compose a templated email instead of having to select the one row from the list view and selecting partner mass mailing

I have a button added to the form

                    <button class="oe_inline oe_stat_button" type="action"
                        context="{'search_default_partner_id': active_id, 'default_duration': 1.0}">
                        <field string="Templated Email" name="" widget="statinfo"/>


and an action defind

        <record id="agent_compose_message" model="ir.actions.act_window">
            <field name="name">Template Emails</field>
            <field name="src_model">res.partner</field>
            <field name="res_model">mail.compose.message</field>
            <field name="multi">True</field>
            <field name="target">new</field>
            <field name="view_id" ref="mail.email_compose_message_wizard_form"/>
            <field name="context">{
                            'default_composition_mode': 'mass_mail',
                            'default_partner_to': '${object.id or \'\'}',
                            'default_use_template': True,

When I use the button in get the following error

      Error: Got non-search view after asking for a search view: type form, arch root form


Any ideas?



About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/18/14, 4:06 PM
Seen: 840 times
Last updated: 3/16/15, 8:10 AM