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.

1

can i send email to many people

By
codefans
on 5/27/13, 1:07 AM 1,309 views

my email templaes like this :

    <!-- Email template for holiday -->
    <record id="holidays_require_email" model="email.template">
        <field name="name">holiday require</field>
        <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
        <field name="email_from">holiday@test.com</field>
        <field name="email_to">
            <![CDATA[
                % if len(object.employee_id.parent_id):
                  'codefans3@gmail.com '
                % endif
                % for p_id in object.employee_id.parent_id:
                ${p_id.work_email}  
                % endfor
            ]]>
            </field>
        <field name="subject">Holiday require</field>
        <field name="body_html"><![CDATA[

${object.user_id.partner_id.name} have a leave action, please login in opnerp to comfirm




${object.web_url}

]]></field> </record>

but this did not work.
the field parent_id is many2many

how can i do with this

thanks

5

Sandeep

--Sandeep--
6083
| 6 5 8
Delhi, India
--Sandeep--
Python OpenERP Developer http://in.linkedin.com/pub/sandeep-rana/3b/a16/786/
Sandeep
On 5/27/13, 3:30 AM

Hi

Of course you can send mail to many recipient

but you need to add , commas too

add emails after , commas

thanks
Sandeep

ok, thanks.

now i use a function field to store email.

if can i use this:

<field name="email_to"> <![CDATA[ % if len(object.employee_id.parent_id): 'codefans3@gmail.com ' % endif % for p_id in object.employee_id.parent_id: ${p_id.work_email}
% endfor ]]> </field>

codefans
on 5/27/13, 4:40 AM

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

0 follower(s)

Stats

Asked: 5/27/13, 1:07 AM
Seen: 1309 times
Last updated: 3/16/15, 8:10 AM