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
    • Discuss
    • 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

odoo 16: how to create a new record in custom model (table)?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
activityodoo16features
1 Balas
4647 Tampilan
Avatar
SmithJohn45

when user MARK AS DONE or DONE & SCHEDULE NEXT a Schedule Activity i want to create a record in a custom model (table) through functions in mail.activity.


function name is action_done and action_done_schedule_next, if it success then required record should be created with below mentioned attributes from mail.activity.   i want it because when a user marked activity as DONE, Odoo delete from activity and i want to check it, if its DONE then create next default sheduled activity. (if you have a better idea, please advise)


the fields required from mail.activity are: (please add fields which required necessarily for activity marked as DONE)

id, res_id, res_model, summary, write_date


my custom model (table) 'mail_activity_done' contains fields:

ma_id, ma_res_id, ma_res_model, ma_summary, ma_write_date


all types of DONE activity will be recorded here for later use.


regards


0
Avatar
Buang
Avatar
Karan BK
Jawaban Terbai

You can override the _action_done method which is a common method called whenever from action_done and action_done_schedule_next as follows


Adjust the field names and data stored in them as per your implementation.


Automated action to create record:


Regards,

Karan BK

1
Avatar
Buang
SmithJohn45
Penulis

thank you @Karan , but i am restricted to customize through Odoo frontend only, i am not allowed to add a custom module to do this. how to achieve this through Odoo frontend in Developer mode using Settings -> Technical?

regards

Karan BK

Okay, in that case you can use an automated action which will be triggered whenever an activity is deleted. One limitation of this approach is since there is no way of knowing whether activity was deleted manually or by system when it was marked as done, it will create new record for all activitives.

I have updated the answer to include automated action. See if this is something you can work with.

SmithJohn45
Penulis

thank you very much for your concerns, highly appreciated for your help. will check it how it can be beneficial.

as mentioned in my opening post, main reason is to create Next Schedule Activity when user 'mark as done' or 'done & schedule next' . the same problem is here when a record deleted i don't know if its actually Done or something else? if you have any solution for this problem, please guide.

regards

tang

Hello karan,
do you know what method will be triggered when the user clicks cancel? Now I have written the corresponding method in unlink, but there is an obvious problem: if the user clicks MARK AS DONE, my method will also be triggered. Looking forward to your reply

SmithJohn45
Penulis

@tang you should create new topic, as this one is marked Answer so rare chance a senior can visit to Answer.

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
odoo 16: inherit & add field in CRM Activity Mark Done tiny popup view
activity odoo16features
Avatar
Avatar
1
Agu 23
3081
odoo16: filter with List of distinct Mobile numbers to select
filter activity odoo16features
Avatar
1
Sep 23
2596
CRM - activities should be created for today's date by default instead of next day
leads activity odoo16features
Avatar
1
Agu 23
2863
ValueError: <class 'psycopg2.ProgrammingError'>: "can't adapt type 'mail.activity.type'" Diselesaikan
activity AutomatedActions odoo16features
Avatar
1
Agu 23
3764
ValueError: [class 'psycopg2.ProgrammingError']: "can't adapt type 'ir.model'" while evaluating Diselesaikan
activity AutomatedActions odoo16features
Avatar
Avatar
1
Agu 23
4549
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