İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

send email to res.partner on change of field value insted of log Odoo V8

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
emailsnotificationslogs
2 Cevaplar
12233 Görünümler
Avatar
dennyjoyaldaviz

greetings all,

I need to send email notification to ship_owner (res.partner),when any field value is changed

This is my code fragment( .py file)

 ship_owner = fields.Many2one('res.partner', string="Ship Owner", ondelete='set null')
hull_number = fields.Char(string="Hull Number", size=64, track_visibility='onchange')   
engine_number = fields.Char(string="Engine Number", size=64, track_visibility='onchange', )   
name = fields.Char(string="Vessel Name", size=64, track_visibility='onchange')
.xml
<div class="oe_chatter">
    <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
    <field name="message_ids" widget="mail_thread"/>
this creates a log i need to send email at the same time when this log is created

 

1
Avatar
Vazgeç
Avatar
Ankit Gauri
En İyi Yanıt

Hello 

you have added chatter it just creates a log but for sending an email you have write method also you have create email template as well.

below is the code which i have write to send an email when picking validates/done with template design you can create your own template design

@api.multi 

def make_pickings_auto_done(self):

        emails = []

        email_to = ''

        mail_mail = self.env['mail.mail']

        for pick in self:

            partner_ids = pick.message_follower_ids and \

                          pick.message_follower_ids.ids or []

            for partner in self.env['mail.followers'].browse(partner_ids):

                emails.append(partner.partner_id.email)

            product_dic = {}

            for picking_line in pick.pack_operation_product_ids:

                product_dic.update({str(picking_line.product_id.name) :

                                        picking_line.qty_done})

        for email in emails:

            email_to = email_to and email_to + ',' + email or email_to + email

        do = pick.name and pick.name or ""

        body_html = '''

                            <div>

                               <p>

                        Hello,

                        <br/><br/>

                            Delivery order ''' + do + ''' is move to done

                            state.

                            <br/><br/>

                            The details of shipping is as below.

                            <br/><br/>

                        </p>

                        <table border="1" cellpadding="5" cellspacing="1">

                        <tbody>

                            <tr>

                                <th>Delivery Order</th>

                                <th>Customer</th>

                                <th>Product</th>

                                <th>Qty</th>

                            </tr>'''

        for nm,qty in product_dic.iteritems():

            body_html += '''<tr>

                                <td>''' + do + '''</td>

                                <td>''' + pick.partner_id.name + '''</td>

                                <td>''' + nm + '''</td>

                                <td>''' + str(qty) +'''</td>

                            </tr>'''

        body_html += '''</tbody>

                        </table>'''

        mail_values = {

            'email_from': self.company_id.partner_id.email or

                          'noreply@localhost',

            'email_to': email_to,

            'subject': 'Delivery order ',

            'body_html': body_html,

            'state': 'outgoing',

            'message_type': 'email',

        }

        mail_id = mail_mail.create(mail_values)

        if mail_id:

            for mail in mail_id:

                # To avoid sending mail/notification multiple times

                return mail.send()

        else:

            return True


5
Avatar
Vazgeç
Avatar
Sehrish
En İyi Yanıt

Yes you can send email on the change of fields in odoo. I have a code that sends email on button click you can modify the method of button click to onchange method and that it. To get complete code and description read: http://learnopenerp.blogspot.com/2017/08/odoo-how-to-send-email-on-button-click.html

0
Avatar
Vazgeç
Sehrish

Odoo how to send email on button click

just copy the method of sending email and use it in onchange method.

http://learnopenerp.blogspot.com/2017/08/odoo-how-to-send-email-on-button-click.html

Thanks

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
Email Notification - Per Date in Maintenance Schedule
emails notifications
Avatar
Avatar
1
Ağu 23
3092
How to avoid sending notifications per Email? Çözüldü
emails social notifications
Avatar
Avatar
Avatar
Avatar
Avatar
10
Eyl 21
56258
Odoo send 3 emails to notify a request contact
emails alias notifications localhost
Avatar
0
Mar 18
4460
How to develop a notification module?
emails notifications followers mail.thread
Avatar
Avatar
Avatar
3
Mar 15
8862
How often are email messages sent from Odoo?
emails
Avatar
Avatar
Avatar
2
Eyl 25
3595
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now