Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Merge chatter messages in two modules (Sales and Project task)

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
automatedactionsmessageschatter
3 Replies
3137 Tampilan
Avatar
Peter Jonsson

I am in need of merging messages in sale order with associated project task and i would like to do this using automated action. Does someone have an idea on how to achieve this? I'm on Odoo 14.


Thanks

Peter


1
Avatar
Buang
Avatar
Yaroslav Lyusikov
Jawaban Terbai

Hi Peter,

  1. Create new Automated Action.
  2. Model = Message
  3. Trigger = On Creation.
  4. Action To Do = Execute Python Code.
  5. Enter the code: 
if record.model == 'sale.order':
sale_order = env['sale.order'].browse(record.res_id)
for task in env['project.task'].search([('sale_line_id', 'in', sale_order.order_line.ids)]):
task.message_post(body=record.body)

This script checks if the new message is linked to a sale order.

If it is, it gets the sale order and finds the associated project tasks by searching the project.task model for tasks related to the order lines in the sale order.

Then it posts the new message on each of these tasks (there may be many tasks related to one sale order).

_______________________

OR you can restrict domain on the form of Automated action and leave the code without 

if record.model == 'sale.order':

__________________________________

Also note that the system creates a new letter in the project task by simply copying the text from the sale order message. And this means that if the task and the sale order have the same users in the followers, then such followers will receive duplicates of the original letter.

__________________________________
Please add more business context next time)

2
Avatar
Buang
Peter Jonsson
Penulis

Many Thanks Yaroslav! This is exactly what i was looking for and it works just the way i need it to.

I´m sorry if i was a bit short in my question about the use case. We work with services and each order line on a sales order creates a task in project. Mainly the communication with the customer is made from sales, but the information needs to pass over to task department.
It is not a problem that the complete message history are tracked in each of the corresponding tasks, it still serves its purpose. I understand what you mean with the followers getting duplicates and maybe i´ll have to handle this further on.

What if i want to do the opposite, pass information from task to sales order? Would it be possible to merge tasks messages into one sales order? So that when a sales person communicates with a customer, they also have a complete service history from our technicians.

Many thanks and regards
Peter

Yaroslav Lyusikov

Peter, I'm glad the automatic action worked the way you wanted.
But I don't like your second idea, because you want to trigger automatic message creation in the Task, which should trigger automatic message creation in the Sales Order and so on infinitely.
This is not necessarily a blocker in general, for example you can check if the message is created by an actual user and not the system itself ( if record.create_uid.id != 1: ):

if record.model == 'sale.order':
sale_order = env['sale.order'].browse(record.res_id)
if record.create_uid.id != 1:
for task in env['project.task'].search([('sale_line_id', 'in', sale_order.order_line.ids)]):
task.message_post(body=record.body)

but I advise you to contact Odoo partners for more complex solutions.

Peter Jonsson
Penulis

I understand what you are saying.

I have been looking for some apps that could achieve this more advanced solution but without success. I might leave it as a one way communication channel for the moment and bring it up with my Odoo partner later on.

Your solution is beautiful and of great help to me! Many thanks Yaroslav!

//Peter

Avatar
Peter Jonsson
Penulis Jawaban Terbai

I understand what you are saying. 

I have been looking for some apps that could achieve this more advanced solution but without success. I might leave it as a one way communication channel for the moment and bring it up with my Odoo partner later on. 

Your solution is beautiful and of great help to me! Many thanks Yaroslav!


//Peter

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
Code automated actions for custom Sale Order sequences in Odoo 12
automated actions
Avatar
Avatar
1
Feb 21
5326
Automated Actions : Created Product Name automatically and internal reference automatically
automated actions
Avatar
Avatar
3
Jun 20
5845
Automated actions - creating directories (v13)
automated actions
Avatar
0
Jun 20
3485
How to set automated action to inactive a user on cretin date ?
automated actions
Avatar
0
Feb 16
4589
Warnings in automated actions
automated actions warning
Avatar
0
Agu 23
4508
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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