Skip to main content

Odoo: Colorize Treeview

In odoo treeview we can colorize record lines depend on specific field. In this example i make each line green and red color based on field 'state' which is selection field ('confirm','reject'). this is also work in treeview of One2many.

Simple isn't ? Questions comment down below.

Comments

  1. The next question is: how to change color of for example decoration-danger to BLACK? for example in specific field only.

    and how to add new decoration attribute?

    ReplyDelete

Post a Comment

Popular posts from this blog

Install odoo 12 : Linux/Ubuntu/Debian

clone/download odoo 12 community from odoo github: https://github.com/odoo/odoo (optional) clone odoo 12 enterprise addons from github: https://github.com/odoo/enterprise move odoo 12 and enterprise addons to "System Disk" so we have this directory: Directory path would be /odoo12 Download this install script and execute/modify to adjust folder position (if you plan to store odoo in different directory than mine) https://github.com/akhmadkresna/odoo12-_install_script.git # Adjust the script to match your environment sudo nano odoo-install.sh # Adjust permission sudo chmod +x odoo-install.sh # Execute the script to install Odoo: ./odoo-install install python requirement  pip3 install libsass THATS IT !!!

Odoo: Create Web Page/Controller

This simple tutorial will give you an idea how data flow/concept of odoo route to render xml template(interface) 1. simply create the interface (xml) 2. define new route via controller (python) Here we go. now everytime "/custom/url" triggered, it will cexecute the python code in the controller and render desired xml template.

Odoo: Get File Name of Uploaded Binary File

When uploading a file binary on odoo sometimeS we need to store the original file name for informative purpose. So thats why this tutorial will come in handy. well that was ridiculously fast !!! Things that need to take into account is make sure you add those xml on your formview because most of uploading file operation happen in formview. And then ypu can use the field file name in treeview.