Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

how to change leave color?

By
syazren
on 4/8/13, 2:31 AM 2,070 views

hi all. i am new and still noob in openerp and would like to ask how i want to change leave color?let say if my leave are being approve, it change from red to green. what should i do? (sorry for my bad english)

currently i am using openerp ver 7.

syazren
on 4/8/13, 2:32 AM
3

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

Sudhir Arya (SA)
On 4/8/13, 2:45 AM

You can use colors attribute inside tree tag like this:

<tree string="Leave" colors="blue:state=='approved';red:state in ('draft','waiting')">

can u teach me where can i edit it?

syazren
on 4/8/13, 2:56 AM

In hr_holidays_view.xml add colors attribute given in answer, update hr_holidays module.

Sudhir Arya (SA)
on 4/8/13, 3:36 AM

Hi Sudhir Arya, thanks for this answer. I'm also looking for this. Can you help me solve another question? Question:How to add supplier field in Sales order form? I posted this question.

Remya
on 4/8/13, 3:43 AM

i had edit it but no change.can somebody help me? :(

syazren
on 4/9/13, 12:20 AM
0
test
On 4/8/13, 3:30 AM

File

hr_holidays/hr_holidays_view.xml

In this file search exact tree view where you need to change for color,

then apply.

<tree string="Leave" colors="blue:state=='approved';red:state in ('draft','waiting')">

color attribute

color1:condition1;color2:condition2;......colorN:conditionN;

I hope this will resolve your Question.

is that its original coding? ------> <tree colors="red:state == 'refuse';blue:state == ' draft';green:state in ('confirm','validate','validate1')" string="Leave Requests"> if yes do i need to dlete it?

syazren
on 4/8/13, 4:49 AM

yes. that is original file and responsible for leave feature.

test
on 4/8/13, 8:55 AM

i had edit it but no change.can somebody help me? :(

syazren
on 4/9/13, 12:21 AM

Dear just editing is not enough, you have to update your current database.

start server and pass proper parameters.

openerp-server -d database -u hr_holidays .... other parameters....

test
on 4/9/13, 2:53 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/8/13, 2:31 AM
Seen: 2070 times
Last updated: 3/16/15, 8:10 AM