How to add Sales Person (from SO) to recipient field on "Delivery: Send by Email" template?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- Müşteri İlişkileri Yönetimi
- e-Commerce
- Muhasebe
- Envanter
- PoS
- Project
- MRP
Bu soru işaretlendi
Hi,
To do it from UI: (This will be deleted if you upgraded the stock module)
Enable developer mode and Go to settings -> Technical -> Email Templates, Search for "Delivery: Send by Email" and then open it, click on Edit and in Email Configuration tab, in To (Emails) paste the below:
{{object.sale_id.user_id.email_formatted}}
To do it using custom module, you need to
<?xml version = "1.0"?>
<odoo>
<data noupdate="1">
<!-- Make the record updatable -->
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval=" [('name', '=', 'mail_template_data_delivery_confirmation'), ('module', '=', 'stock')] "/>
</function>
<value eval="{'noupdate': False}"/>
</function>
<!-- Inherit Email template -->
<record id="stock.mail_template_data_delivery_confirmation" model="mail.template">
<field name="email_to">${object.sale_id.user_id.email_formatted|safe}</field>
</record>
<!-- Set the record inupdatable -->
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('name', '=', 'mail_template_data_delivery_confirmation'), ('module', '=', 'stock')] "/>
</function>
<value eval="{'noupdate': True} "/>
</function>
</data>
</odoo>
Thank you very much!
I testes from UI and looks like it required id to work. Like
${object.sale_id.user_id.id}
I need to test same with custom module.
For mean time, is possible to add multiple recipient from UI?
Yes you can add multiple recipient from UI.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Olİlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
---|---|---|---|---|
|
1
Şub 24
|
2655 | ||
|
1
Tem 23
|
3537 | ||
|
3
Ara 23
|
19238 | ||
Failed to render template
Çözüldü
|
|
1
Şub 22
|
6311 | |
|
0
Ağu 21
|
2668 |