Odoo Help


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.


Help adding button to partner to create templated email

Steven Haufe
on 8/18/14, 4:06 PM 514 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?



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)


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