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

Odoo11: kanban background color

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
kanbanbackgroundodoo11JS
1 Balas
9091 Tampilan
Avatar
Lucia C.H.

We are using Odoo11 with the standard CRM addon.

Our users would like to have a (light) red background for lost opportunities and a (light) green background for won opportunities in the kanban view (model: crm.lead).

I have found that the option to color the background was replaced by a colored bar from v10 onwards. See: https://github.com/odoo/odoo/issues/34504

However, one answer to the issue contains a sample of how the background can be colored anyway.

I tried to modify this approach according to my needs but I cannot get it to work. Can someone here help, please?

I tried to add a condition that changes the background color depending on the probability: 0 means "lost" => red background, 100 means "won" => green background.

The resulting error message is all about Javascript & as I'm no pro in JS I'm clueless what it means.

My code looks like this:

<xpath expr="/kanban/templates/t/div//div[@class='oe_kanban_content']"
position="replace">
<div t-if="record.probability.raw_value == 0" style="background-color: #00FF00;">
<div class="oe_kanban_content">
...
... (I inserted code from the original view here - not good practice, I know)
...
</div>
</div>
</xpath>
0
Avatar
Buang
Lucia C.H.
Penulis

Hello Chris, thank you for your answer. This took me on step further (kind of) but it didn't solve my problem.

One step further because the code works & does indead change the color of the kanban items - but instead of the background it only changes the thin bar on the left side.

The field x_studio_vip_color is nothing 'special' coming from JS - it's just a field you added on your own, right?

One question: The original code uses class="oe_kanban_content" and not class="o_kanban_card_content". Does that make a (big) difference?

Chris TRINGHAM

Sorry, this is an example that I managed to get working in a test database without fully understanding all the details. The concept is that there are VIP customers so the Kanban card changes color. That field was added to the customer.

On my system it changes the background color of the card. What version of Odoo are you using?

Lucia C.H.
Penulis

<p>

We are using Odoo11.

<br/></p>

Avatar
Chris TRINGHAM
Jawaban Terbai

This might work.  It uses an (invisible) field x_studio_vip_color to control the color

<kanban string="Customer Product">

<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_bg_custom
#{kanban_color(record.x_studio_vip_color.raw_value)}
oe_kanban_global_click">
<div class="o_kanban_card_content">
<field name="id" modifiers="{"readonly": true}"/>
<field name="x_studio_vip_color" attrs="{}" invisible="1"/>
</div>
</div>
</t>
</templates>
</kanban>
-1
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
trim content in kanban view -Odoo 11
kanban odoo11
Avatar
Avatar
1
Apr 19
5474
TypeError: node is undefined Kanban view Diselesaikan
xml kanban odoo11
Avatar
1
Sep 21
9369
how to change group_by in existing kanban view in odoo 11 Diselesaikan
kanban group_by odoo11
Avatar
Avatar
1
Apr 21
4686
on_create functionality in tree view
tree kanban odoo11
Avatar
0
Nov 19
5016
ODOO11: Total of Colum in kanban view
kanban total odoo11
Avatar
0
Nov 18
3073
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