Search 1.9 billion lines of Odoo code on GitHub

web_tree_dynamic_colored_field

Author: Camptocamp, Therp BV, Odoo Community Association (OCA)
License: AGPL-3
Branch: 15.0
Repository: AITIC/web
Dependencies: web
Languages: HTML (421, 54.5%), JavaScript (114, 14.7%), PO File (54, 7.0%), Python (17, 2.2%), XML (21, 2.7%), and reStructuredText (146, 18.9%)
Other branches: 10.0, 11.0, 12.0, 12.0-ocabot-merge-pr-1613-by-legalsylvain-bump-patch, 13.0, 13.0_sh, 14.0, 8.0, and 9.0
Other repositories: 001101/web-1, 2FM/web, 718981206/web, 965714601/web-1, A-you/web, ACCOMODATA-BVBA/web, AMhadhbi/web, ARCSKS85/web, Abdulrahman3282/web, AdriaGForgeFlow/web, AlexandreDias23/web, Alfa-90/web, Andyeyo/Odoo-Addons, AnilKesariya/web, Antiun/web, AntoniRomera/web, Appcademy/maintenance, Ark74/web, ArkanSystem/web, As400it/web, AsEAsEAsEROMaSe/web, AwesomeFoodCoops/odoo-production, AyoubZahid/web, AyushP510/web, BADEP/web, BS-creator/web, BT-aestebanez/web, BT-fgarbely/web, BT-nstuder/web, BT-tbaechle/web, Banetese/web, BayarkhuuBataa/oca-web-addons, BenjaHe/web, Bochelly/web, BonwareConsulting/web, BrainInnovApps/web, Bubbles-IT/web, CB-Gran-Canaria/web, CFarhad/web-1, Callino/web, ChanFeei/web, Change2improve/web, ChenBing19980410/web-1, Chure43/web, ClancyQiao/web, ClearCorp/oca-web, Cloudxtreme/web, Colorlessgold/web, ComitorDevTeam/web, CompassionCH/web, Comunitea/web, Confidere/web, CrazyGuo/web, Creamaster/web, Cy-Ghost/web, DITIntl/odoo-production, DMGSys/web, Daemo00/web, Dan-Stephen/web, Daniel-CA/web, DarioLodeiros/web, DarkIsComing/web, Darknroses/web, Decikingship/web, Dhirendrasinh-SerpentCS/web, Digital5-Odoo/web, DjamelEd/web, Dobtor-OCA/web, Domatix/web, Doscaal/web, DreamSpacexx/web, DudhatShivam/web, ELMARDI0107/web, ERPLibre/web, Ecnart/web, EdyKend/web, EgyCrash/web, Elbagoury/OpenERP_V8, ElgatodeSchrodinger/web, Ellafimouheb/web, Endika/web, EssentNovaTeam/web, Feinhe/web, FelixAdler/web, ForgeFlow/web, GEDS1990/web, GSLabIt/web, GabbasovDinar/web, Gabinete-Digital/web, Gebesa-Dev/web, Gio666/web, GlodoUK/oca-web, Glue-Software-Engineering-AG/web, Gofekra/web, Gonscar88/web, GowthamKalyan/web, Groupe-Informatique-LaCoopSurMer/odoo-production, GrupoAlvamex/web, GuavanaUX/web, Guobower/OCA-web, Guobower/Odoo-Addons-2, HardikG/web, HelloXMFJ/web, HirenDangar/web, HomerDeoDatu/web, Horanet/web, IT-Meisterei/web, Idealisconsulting/web, Ingeos/web, IronStraightManUser/web, JBF91/web, Jarsa-dev/web, Jarsa/web, JasonAxesen/web, JayVora-SerpentCS/web, JazziMc/web, JoanMarin/web, JohnLYH/web, JohnmarkEnriquez/web, Jonathan-pr/web, JonathanOsAlc/web, JonnyZhaoYJ/web, KDVN/web, KENLYLST/web, KIKOU2016/web, KKamaa/web, KaiXuoo/web, KareemAbuzaid/web, Kayuulab/web, Khwarizmiat/web, Kiplangatdan/web, KonaERP/web, LL-Akeera/web, LasLabs/web, LeartS/web, Leuan12/web, LevelPrime/web, Linekio/web, LittleSnowFox/web, Lpunk/web, MMorlock/web, MMstp/web, MacqGit/web, MadsackMediaStore/web, Mahmoud-Alaa-Eldeen/web, MamadouDjigo/web, Martronic-SA/web, MathBenTech/web, MaxyMoos/web, MediaJockey/web, MeetKD/web, Mefistous/web, Meyjan/web, MicheleZak/web, MihranThalhath/web, MindAndGo/web, Mixedmick/web, MjAbuz/web, Mohamed-Alaa/web, Morsiesml/web, Muhamed-Git/web, Murtaza-Mithaiwala/web, NESMCO/web, NL66278/web, NaSol/web, NeatNerdPrime/web, Netsoro/web, NextERP-Romania/web, Niboo/web, Nicodebug/odooWeb, Nikul-Chaudhary/web, NiyasOdootec/web, Nowheresly/web, Nucleoos/web, Numigi/odoo-web, OCA-MUK/web, OCA/web, ORETEK/web, OctoComputer/web, Odoo-10-test/web, Odoo-Italia-Associazione/web, OdooBulgaria/Odoo-Addons-17, Ommo73/web, OpenCode/web, OpenPymeMx/web, Otsokop/odoo-production, PCatinean/web, PESOL/web, Palpid/web, Paul98isep/web, PettyBell/web-1, Phaunswater/web, PlanetaTIC/web, PrenorSistemas/web, QANSEE/web, QubiQ/web, RLeeOSI/web, RainerZander/web, RaviBhateliya/web, RealSolutionsLux/web, Reyx9/web, SHEFFIELDAFRICA/web, SalahAdDin/web, SanteLibre/web, SarfarazHussain/web, Sarfarazsajjad/web, Saul-Qiang2/web, ScottAI/web, SequarSrl/web, SerpentConsultingServices/web, SeuMarco/web, Siddhant-Pageni/web, SimoRubi/web, Sirius7/web, SirumTME/web, SodexisTeam/web, SolutionSeekers/web, Sote-LS/web, SportPursuit/web, Sroeurnsuon/web, StefanRijnhart/server-tools, StefanRijnhart/web, StephanRozendaal/web, Studio73/web, Sudokeys/web, Syci-Consulting/web, TDu/web, TRESCLOUD/web, Tardo/web, TechonomicsInc/web, Tecnativa/web, ThanhMany/web, TheCloneMaster/Odoo-Addons, ThijsvOers/web, Turiinjargal/oca-web-addons, VCLS-org/web, VanMoof/web, Vauxoo/web, VbossEkat/web, VishnuArukat/web, VisiionSolucionesTecnologicas/web, VitalPet/web, WEBDEV-PROTEC/web, WilldooIT/web, YarnSeemannsgarn/web, YevhenPechurin/web, YogeshMahera-SerpentCS/web, Zoubid/web, a4435351/web, aaltinisik/web, abgfbr/web, abstract-open-solutions/web, acm1pt-colorado/web, acsone/web, acysos/web, adhoc-dev/web, adriansteel/web, adrienpeiffer/web, agaldona/web, agemticcl/web, agenterp/web, agenterpgmbh/web, agranadosb/web, agrista/odoo-web, ahilali/web, ahmadheriyanto/web, ahmedgenina/web, aimsystems/web, aitorbouzas/web, ajas91/web, ajinvn2019/web, akhdaniel/web, akloptim/web, akretion/web, alan80080/web, alangwansui/web, alejandrosantana/web, alexbclay/web, alexlafalce/web, algiopensource/web, alinolandry/web, altexcorp/web, amarildogolloshi/web, amendoncabh/web, ammarofficewla/web, amonang/web, anandkansagra/web, anderson2304/web, andhit-r/web, andrius-preimantas/web, androettop/web, angaraggantumur/web, angedras/web, angelmoya/web, anhnangcuaanh/web, anhvu-sg/web, aniket852016/web, anishagg17/web, ansinaesmejor/web, antespi/web, antilhue/web, antonioburic/web, antonyrajserpentcs/web, anybox/web, apachesep/web, apertoso/web, archetipo/web, arielwunderlich/web, arkyalpyae/web, aroodooteam/web, aryajimbaran/web, aschenkels-ictstudio/web, ashmita34/web, asitemap/web, asphaltzipper/web, athirapnair/web, atonaltzin/web, augustosamame/oca-web-addons, aurestic/web, avoinsystems/web, awbRJVN/web, ayouweixiansheng/web, azmeuk/odoo-production, babatoko/odoo-production, barkhass89/web, baruklucifer/web, bassoom/web, bealdav/web, beloeuvre/odoo-production, benwillig/web, berpweb/web, bipinprajapatib/web, bishalgit/web, bistaray/web, bizzappdev/web, blackbelts01/web, blaggacao/web, blooparksystems/web, blutecsolutions/web, bmorelax/web, bmya/web, boky1993/web, bolderdene123/web, borni-dhifi/web, boskowski/web, boutitinizar/web, brain-tec/web, brainbeanapps/web, brian10048/web, britoederr/web, bud-e/web, budiiskandar11/web, buidinhsy/web, buiminhthanh3a/web, buoncuaanh/web, burakberkanbostanci/web, buzzy3/web, bvkl/web, cameroun/web, camptocamp/web, carlosmiras/web, cdasadiya74/web, changshuai1/web, chatcharin/web, chenjingxiong/web, chermed/web, chetanrdhaduk/odoo-production, chianggq/web, chintan-ambaliya/web, cialuo/web, ciel-it/web, cix-code/web, clagoa/web, cmutz/web, cocox/web, codewr/web, cogaihien/web, conandark/web, congdpt/web, coopiteasy/web, cormaza/web, cristinamartinrod/web, cvinh/web, cwangED/web, cxinde/web, daemondev/Odoo-Addons, daiweihong/web, damcar/web, damdam-s/web, damendieta/web, dani-xtendoo/web, daniboy2215/web, danieltorres7/web, danztensai/web, daoviet/web, daramousk/web, darshan-odoo/web, davidkhang6/web, ddico/web, delgerS/web, demain-supermarche/odoo-production, denislour/web, denvian/web, dev00007/web, devang-dreambits/web, diagramsoftware/web, diegobgl/web, diggy128/web, digideskio/web-1, dimitrispt/web, dingguijin/web, dinhvannam78/web, dinhvanvuong/web, djangkrix/web, dkruegerkj/web, dlorenzop87/web, dndoanh/web, dntq83/web, docmfried/web, dong-z/web, dossarockia/web, dreispt/web, druidoo-dev/web, druidoo/FoodCoops, duongduong/web, duongngochien/web, durvilchat/web, durvillo/web, duyisu/web, dvalladares66/web, dvitme/web, dynapps/web, dzungtran89/odoo-production, eLBati/web, earthat/web, ecosoft-odoo/web, edlwise/web, eezee-it/web, ehsu0407/web, eil00l/web, elteatroescultura/web, emagdalenaC2i/web, eng-eslam-a-y/web, enmasys/web, enmingc/web, epierre3/web, ericpriou/web, ernestotejeda/web, eslAmer/web, espo-tony/web, essamcis/web, estevebadia/odoo-production, etech-hary/web, etobella/web, euroblaze/web, evansadji/web, evertonteotonio/web, exosoftware/oca-web, ezdoo/web, factorlibre/web, falconsoft3d/web, falinwa/web, falinwasales/web, fallewi/web, fanha99/web, farah-cherif/web, farinoire/web, feketemihai/web, felixvillafranca/web, firefly1994/web, firehang/web, fjouatte/odoo-production, fjouatte/web, fmdl/web, fnguena/web, focusate/web-oca, foramaktiv/web, fossoult/web, franksongfeng/web, fslibre/web, gab-net/web, gajendra117/web-2, gaoyibin0001/web, garzadekoster/web, gastonfeng/web, gbaumgartner-callino/web, gbertolani/web, gdgellatly/web, gelo-landoo/web, gfcapalbo/web, gimebreak/web, githubtaotao/web, gitlabuser/web, glovebx/web, grant-thornton/web, grap/web, grindtildeath/web, grizzlysmit/web, groventure/web, gswf-sha/web, gtorresemmanuel/web, guewen/web, gurneyalex/web, gustitammam/web, haidd/web, halgandd/odoo-production, harinathsrinivasan/web, haroldtamo/web, haryoran04/web, hassanfadl/web, haylahi/web, hbrunn/web, hefeilaowang/web, hemnanikalpana/web, hgminh-pk/web, hgminh95/web, hilarak/odoo-production, hinfo506/web, hiren-serpentcs/web, hoangthithao/web, hoathom/web, houzefa-abba/web, hparfr/web, hpatelserpentcs/web, huntergps/web, hxsam/odoo-web-client, i-vyshnevska/web, iSqXIE/web, iamyeonhan/web, ibudgie/web, ideaspositivas-group/web, ifoelarbeis/web, igor-mitin/web, ilecyang/web, iledarn/web, imrantechexpert/web, inforpordev/web, initOS/web, inspiredbusiness/web, insscn/web, intissarB/web, intoqh/web, isabellerichard/web, isos/web, isoscl/web, it-projects-llc/web, itspeepo/web, jacky82669513/web, jamotion/web, jan-sedivy/web, jans23/web, janverb/web, jas-odoo/web, jason156/Odoo-Addons-4, javausers2014/web, javieralmancevo/web, javiergm02/web, jcdrubay/web, jchanme/web, jeroen7s/web, jguerriat/web, jhasolo/web, jhonaelramos/web, jimmyec/web, jimschuh/web, jjrevilla/web, jjscarafia/web, jladage/web, jo541/web, jobiols/oca-web, johnotoole68/web, jorcan46/web, josueBulle/web, joyshmitz/web, jpaquete/web, jpcweb/web, jrdabrio/web, julenalgios/web, jweste/odoo-production, kaerdsar/web, kamasteve/web, karlis-dreizis/web, karol1985/web, katiakweb/web, kejuswiss/web, kenvac/web, keylor2906/web, khanvuthy88/web, khidir15/web-1, khl2007/web, kibahop/web, killvis/web, kittiu/web, kitworks-systems/web, kkasing11/web, kmee/web, konsoar/web, kos94ok-3D/web, kossovo/web, krunal267/odoo-production, kumarvkash123/web, kurniawanlucky/web, kurt-schmitz/web, kyrylogr/web, lachouettecoop/odoo-production, lakshmidevims/web, laoshuming/web, lasarux/web, lathiphuong/web, lbaldi/web, ldibarbora/web, leangjia/web, leanhtuan1996/web, legalsylvain/odoo-production, legalsylvain/web, leizhan17/web, lembregtse/web, leonidasthe300/web, levkar/web, lfend/web, lfreeke/web, lgharib/web, libregob/web, lideritjnma/web, lilijunlily/web, lilotter45/web, lincersolucoes/oca-web, lincoln6delta/web, linkitspa/web, lisandrogallo/web, lisidan/web, liulongyunwanfeng/web, liunux4odoo/web, llacroix/web, lmignon/web, loftwah/web, logicasoftadmin/web, lonelyleaves/web, losst11/web, loxoalia/web, lpajaresv/web, lubonbvba/web, lubw/web, ludlafTest/web, luisrodriguez-e2e/web, lukebranch/web, luthihongvy/web, lvzhenbang/web, lweiming/web, lxr0912/web, magnuscolors/web, makov44/web, maljac/web, manolain/web, manuelcalerosolis/web, marcelomora/web, marcos-mendez/web, marianoadangelo/web, markeTIC/web, markrobinson85/web, mashanz/web, mathieuvatel/odoo-production, mayankksolves/web, mcojocaru/web, mecva/web, mediaengagers/web, mesebin/web, meta-it/oca-web-addons, metalsartigan/web, mgosai/web, mhadi12/web, mharenz/web, michotm/web, microcom/web, miguelangelorocha/web, mingkongz/web, mingleecqu/web, minhhq09/web, minhphung171093/OpenERP_V8, minhyk/web, mivilsoft/web, mochammadrizanaufal/web, modoolar/oca-web, mohamedhagag/web, molandtoxx/web, monksoftware/web, morrismusumi/web, moustafakhairy4/web, mrshelly/web, msaid251/web, mscenna/web, mszinte/odoo-production, mulaudzicalvin/odoo-production, mulaudzicalvin/web, multidadosti-erp/web, munawirsyam/web, murtuzasaleh/web, myonnet/oca-web, nawawi/OCA_web, neamatKhan/web, nebras-solutions/web, necrodevz/web, netzweltmex/web, newtratip/web, ngocanh67/web, ngovantu3/web, ngrandjean/web, nguyenkimphung/web, nguyenmanhhuy45/web, nguyenthibichngoc/web, nguyenthimonghien/web, nguyenthitieuvy/web, nhannguyen94/web, nicolas74/web, nikhil150355/web, nikul-serpentcs/web, nilshamerlinck/web, niulinlnc/web, njeudy/web, nmenkov/web, nodoo/web, noorealam96/web, novacode-nl/web, novawish/web, npiganeau/web, nrdroque/web, nthnnl/odoo-production, ntsirintanis/web, ob0420/web, oca-sorrento/web, odof/web, odoo-etech/web, odoo-modules/odoo-production, odoobgorg/OCA-web, odoocn/web, odoofans/web, odoogap/web, odoosoft/web, odoousers2014/web, oihane/web, okapandya/web, onurugur/web, onyanga/web, oondeo/web, open-synergy/web, orchidinfosys/web, orlandosorio/web, osamaegypt/web, osanchezm/web, osbzr/gooderp_extra, osfp-Pakistan/web, osiell/web, osoul/web, osstw/web, osvalr/Odoo-Addons, osvalr/web, ovnicraft/web, owaismeo/web, p-tombez/web, pamdinhcu/web, paraita/web, patthamac/web, pedrobaeza/web, pegonzalezspesol/web, peterfbrandl/web, petertbexley/web, petrus-v/odoo-foodcoops, petrus-v/web, phamlelan/web, phamngocmaianh/web, phamnguyentram/web, phamvanchau/web, phanthuyhang/web, phanvanduongba/web, phongsan/web, phucngta/web, phuctranerp/odoo-production, phuctranerp/web, piensom/web, pkagori/web, planesnet/oca_web, pnajman-modoolar/web-1, popcomputadores-desenv/web, popsolutions/web, pratimedia/web, praxigento/oca-web, presenceverte/web, ps-tubtim/web, pscloud/web, putao615/web, pythoner-3k/web, qgzhiguo/web, qibinlin/web, qiuyue/web, qtheuret/web, quentinDupont/web, quentingigon/web, raintao/web, raizs/web, ravishekharco/web, rbuisson/web, redblow/web, redcor/web, rekdal/web, reloadbrain/web, remi-filament/web, richard-willdooit/web, rihene-abdelwahed/odoo-production, ristecona/web, ritwik15/web, rkhalil1990/web, robertrottermann/web, robertsoh/web, robertsvx27/web, rohit-envertis/web, rossasa/web, roussel2nis/web, royalline1/web, rquintanam/web, rschnapka/web, rsullivan2704/web, ruben-tonetto/web, rven/web, saas-addons/web, sagar-developer-92/web, sahil-navadiya/web, samsagaz/web, sanjay-hercules/web, sanube/web, saphiro/web, save85/web, savoirfairelinux/web, sbejaoui/web, sc4you/odoo-production, sc4you/web, scbrianti/web, schout-it/web, scorpion-2000/web, scottliu/web, sebalix/web, sebastiken/web, seifhammami/web, sergiocorato/web, serpentcs-dev1/web, servetechafrica/web, sewisoft/web, sgajardo/web, sgheller/web, sharique1988/web, shengyf1/web, shihas1991/web, shineit-yiwen/web, shiram/web, shurshilov/web-1, sibvip/web, siddharth7815/odoo-production, sidpcomissario/web, simahawk/web, simmatica/web, simplifysolutions/web, sinandurgut07/web, singhadarsh0403/web, siweilai/web, sixtofarfan/web, skyoj/web, smurf-U/web, sodexis/web, solvosci/web, spacemonkeythe/web, spacimek/web, sprevot44/odoo-production, srikesh/web, ssaid/web, sschmid-test-org/web, steigendit/web, steingabelgaard/web, steveferry/web, stevematos/web, stjmonde/web-1, stuti135/web, subteno-it/web, sudhir-erpharbor/web, sudhir-serpentcs/web, sudotech-org/web, sunflowerit/web, suningwz/odoo-production, supercoopbdx/odoo-production, superquinquin/odoo-production, suriyan/web, susport/web, syci/web, sysproluisrodriguez/web, szellmark20/web, tafaRU/web, takinobori/oca-web, tarteo/web, techonomics69/web, teddywudh/web, tedi3231/web, tegin/web, teklay/web, tfossoulw/web, thaiodoo/web, thinkopensolutions/oca-web, thomas-tankengine/web, thomaspaulb/web, thoongnv/web, thuyduongnhi/web, tianshangjun/web, tienhieuD/web, tinvan94/web, tirix/web, tirma-sa/web, tonygalmiche/web, tpa-odoo/web, tqngoc/web, trandainghiaan/web, trannguyengiang/web, tranvanchienlam/web, tranvannam34/web, tranvanthai5/web, trevi-software/web, trionoharjadi/web, trobz/odoo-production, trobz/web, truongtuquynh/web, truongvanquyet5/web, tschanzt/web, tsengeagle/web, ttpphuctran/odoo-production, tungocbui/web, tvtma/web, ubic135/web, umitoprojet/web, unitek-solusi/OCA-web, unpezllamadomiki/web, ursais/web, valtterilattu/web, vanderperre/web, vasiljevicmarko/web, vcloud9ray/web, vdedyukhin/web, veetoki/web, venkateshan-s/web, versada/web, vertelab/web, veryberry/web, vialaurea/OCA-web, vidtsin/OpenERP_V8, vidtsin/odoo-production, vishaltyagityagi/web, vjd8866/web, vnsofthe/web, vsalazar2017/web, wahello/oca-web, watcharapon24/web, waveFuncjs/web, westlyou/Odoo-Addons-4, westlyou/oca-web-addons, whutsongy/web, wilcobergacker/web, willmakenoise/web, wodeguaiguai/web, wuhuizhong/web, x0rzkov/odoo-web, xavidj/web, xavierjimenez/web, xcgd/web, xhair/web, xiaowenzi/web, xiaoyi-yanqing/web, xie8899/web, xiongxxx/web, xpansa/web, xtjie/web, y2gsmith/web, yangxianpku/web, yanpierchirino/web, yelizariev/web, yenbao1340/web, yogesh-serpentcs/web, yostashiro/web, yuchixing/web, yuntux/odoo-production, zakiuu/web, zambee/web, zarumaru/web, zcyuefan/web, zeroheure/web, zeroincombenze/web, zhangshunrao/web, zhujiayuturly/web, zimbora69/web, and zlf4535/web

<h1 class="title">Colorize field in tree views</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_tree_dynamic_colored_field"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_tree_dynamic_colored_field"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module aims to add support for dynamically coloring fields in tree view according to data in the record.</p> <a name="features"></a> <h2>Features</h2> <ul class="simple"> <li>Add attribute <code>bg_color</code> on field's <code>options</code> to color background of a cell in tree view</li> <li>Add attribute <code>fg_color</code> on field's <code>options</code> to change text color of a cell in tree view</li> </ul> <p><strong>Table of contents</strong></p> <a name="usage"></a> <h2>Usage</h2> <ul> <li><p class="first">In the tree view declaration, put <code>options='{&quot;bg_color&quot;: &quot;red: customer==True&quot;}</code> attribute in the <code>field</code> tag:</p> <pre> <code>... &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; &lt;tree string=&quot;View name&quot;&gt; ... &lt;field name=&quot;name&quot; options='{&quot;bg_color&quot;: &quot;red: customer == True&quot;}'/&gt; ... &lt;/tree&gt; &lt;/field&gt; ... With this example, column which renders 'name' field will have its background colored in red.</code> </pre> </li> <li><p class="first">In the tree view declaration, put <code>options='{&quot;fg_color&quot;: &quot;white:customer == True&quot;}'</code> attribute in the <code>field</code> tag:</p> <pre> <code>... &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; &lt;tree string=&quot;View name&quot;&gt; ... &lt;field name=&quot;name&quot; options='{&quot;fg_color&quot;: &quot;white:customer == True&quot;}'/&gt; ... &lt;/tree&gt; &lt;/field&gt; ... With this example, column which renders 'name' field will have its text colored in white on a customer records.</code> </pre> </li> <li><p class="first">In the tree view declaration, use <code>options='&quot;color_field&quot;: &quot;my_color&quot;'</code> attribute in the <code>tree</code> tag:</p> <pre> <code>... &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; &lt;tree string=&quot;View name&quot; colors=&quot;color_field: my_color&quot; &gt; ... &lt;field name=&quot;my_color&quot; invisible=&quot;1&quot;/&gt; ... &lt;/tree&gt; &lt;/field&gt; ...</code> </pre> </li> <li><p class="first">You can also use <code>colors=&quot;bg_color_field: my_color&quot;</code> to defined the field name that will be used for the background color of the line.</p> </li> <li><p class="first">If you want to use more than one color, you can split the attributes using ';':</p> </li> </ul> <pre class="code"> <code class="code">options='{&quot;fg_color&quot;: &quot;red:red_color == True; green:green_color == True&quot;}'</code> </pre> <p>Example:</p> <pre> <code lang="xml">... &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; &lt;tree string=&quot;View name&quot;&gt; ... &lt;field name=&quot;name&quot; options='{&quot;fg_color&quot;: &quot;red:red_color == True; green:green_color == True&quot;}'/&gt; ... &lt;/tree&gt; &lt;/field&gt; ... With this example, the content of the field named `my_color` will be used to populate the `my_color` CSS value. Use a function field to return whichever color you want depending on the other record values. Note that this overrides the rest of `colors` attributes, and that you need the tree to load your field in the first place by adding it as invisible field.</code> </pre> <p><strong>Note that you should always use single quotes for fields' ``options`` and wrap nested values in double quotes since ``options`` is a JSON object.</strong></p> <a name="known-issues-roadmap"></a> <h2>Known issues / Roadmap</h2> <ul class="simple"> <li>Before version 13.0, this module had a feature allowing to change the color of a line depending on a field, using a <code>colors</code> attribute with the name of the field on the <code>&lt;tree&gt;</code> element. Since 13.0, the <code>colors</code> attribute is no longer in the RelaxNG schema of the tree view, so we can't use it anymore. This feature has then been dropped, but could be reimplement in another way.</li> </ul> <a name="bug-tracker"></a> <h2>Bug Tracker</h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed <a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_tree_dynamic_colored_field%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2>Credits</h2> <a name="authors"></a> <h3>Authors</h3> <ul class="simple"> <li>Camptocamp</li> <li>Therp BV</li> </ul> <a name="contributors"></a> <h3>Contributors</h3> <ul class="simple"> <li>Damien Crier &lt;<a class="reference external" href="mailto:damien.crier&#64;camptocamp.com">damien.crier&#64;camptocamp.com</a>&gt;</li> <li>Holger Brunn &lt;<a class="reference external" href="mailto:hbrunn&#64;therp.nl">hbrunn&#64;therp.nl</a>&gt;</li> <li>Artem Kostyuk &lt;<a class="reference external" href="mailto:a.kostyuk&#64;mobilunity.com">a.kostyuk&#64;mobilunity.com</a>&gt;</li> <li>Guewen Baconnier &lt;<a class="reference external" href="mailto:guewen.baconnier&#64;camptocamp.com">guewen.baconnier&#64;camptocamp.com</a>&gt;</li> <li>Phuc Tran Thanh &lt;<a class="reference external" href="mailto:phuc&#64;trobz.com">phuc&#64;trobz.com</a>&gt;</li> <li>Sylvain LE GAL &lt;<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>&gt;</li> </ul> <a name="other-credits"></a> <h3>Other credits</h3> <p>The development of this module has been financially supported by:</p> <ul class="simple"> <li>Camptocamp</li> </ul> <a name="maintainers"></a> <h3>Maintainers</h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_tree_dynamic_colored_field">OCA/web</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>