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

Change Calendar Colors (Event State)

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
calendarcolorsodoo12
1 Balas
16572 Tampilan
Avatar
Rick

Is it possible to assign colors to a certain event state as default? (Calendar)

I.e. Ocupied is red / available is green / no-show is blue / ready to start is yellow...

right now odoo as default color for 1st event, 2nd event is another color.. i want by state! is it possible and how? Thanks!

2
Avatar
Buang
Edwin valdez

Lo resolviste te puedo ayudar?

Avatar
Jainesh Shah(Aktiv Software)
Jawaban Terbai

Hello Rick,

FYI odoo is currently setting event colors based on different partners not based on different events.
Regarding your requirement, yes you can replace this current functionality with the state field. For that, you just need to do the following steps.

For odoo12,
1)Inherit calendar view and change attribute color="state(your_field_name)"
2)Then you have to assign a color index to your state by updating the init method for "web.CalendarRenderer".
E.g - this.color_map.state(your_field_name) = 2(will be index value);

For more information, you can contact us.

Regards,





Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   ​

0
Avatar
Buang
Rick
Penulis

This is 1):

<record id="view_calendar_event_calendar_inherit" model="ir.ui.view">

<field name="name">calendar.event.calendar.inherit</field>

<field name="model">calendar.event</field>

<field name="inherit_id" ref="view_calendar_event_calendar"/>

<field name="arch" type="xml">

<calendar string="Meetings" date_start="start" date_stop="stop" date_delay="duration" all_day="allday"

readonly_form_view_id="%(calendar.view_calendar_event_form_popup)s"

event_open_popup="true"

event_limit="3"

color="NEWCOLOR">

</calendar>

</field>

</record>

But i didn't exactly understood the 2) part, can you explain it better if you can? It would be a huge help!

Thank you for your understanding.

Jainesh Shah(Aktiv Software)

Hello Ricardo Gil,

-In the calendar module, you can find the "web.CalendarRenderer" class.

-You have to change that class's init function.

-So inherit that function and you can find the "color_map" variable in that.

-In that "color_map" you will get data for "NEWCOLOR" field, so you have to assign a color index value to those data. then your functionality will work.

FYI We have already developed a module for this functionality for V12, if you need that then you can contact us.

Rick
Penulis

in this: init: function (parent, state, params) {

this._super.apply(this, arguments);

this.displayFields = params.displayFields;

this.model = params.model;

this.filters = [];

-> this.color_map = {};

if (params.eventTemplate) {

this.qweb = new QWeb(session.debug, {_s: session.origin});

this.qweb.add_template(utils.json_node_to_xml(params.eventTemplate));

and i have the getColor:

getColor: function (key) {

if (!key) {

return;

}

if (this.color_map[key]) {

return this.color_map[key];

}

// check if the key is a css color

if (typeof key === 'string' && key.match(/^((#[A-F0-9]{3})|(#[A-F0-9]{6})|((hsl|rgb)a?\(\s*(?:(\s*\d{1,3}%?\s*),?){3}(\s*,[0-9.]{1,4})?\))|)$/i)) {

return this.color_map[key] = key;

}

var index = (((_.keys(this.color_map).length + 1) * 5) % 24) + 1;

this.color_map[key] = index;

return index;

Have to say color_map[0] = red / color_map[1] = green in my inherence... right?

Rick
Penulis

if possible , if you could show what you did in your module, it would hep me a lot!!

I've build the module i want with the changes i need but the only thing missing is the colors... I would realy appreciate it!! Thank you :)

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
Set Calendar Colors in Sytstem Parameters
javascript calendar colors odoo12
Avatar
0
Agu 19
3518
Calendar Colors - please help
calendar colors
Avatar
1
Jul 24
3597
How to remove Favorite List (attendees) from Calendar( and set 'everybody's calendar' by default) Diselesaikan
calendar odoo12
Avatar
Avatar
1
Jul 20
5653
How to set 'Everybody's Calendar' by default? Diselesaikan
javascript calendar odoo12
Avatar
Avatar
Avatar
Avatar
4
Jul 24
11597
How to add google meeting link in odoo calendar? Diselesaikan
calendar meeting odoo12
Avatar
1
Des 21
4942
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