Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5194 Lượt xem

 I am working on changing the color in tree view for those record whose has start the timer and stop the timer upto 35 minutes. Those record should be in red color.

 xml what I need but not working:

<tree string="Break Form" version="7.0" colors="red:[current_date-start_timing] &gt; 35;">

<field name="date"/>

<field name="break_reason"/>

<field name="partner_id"/>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Yojana walunj,

Try This

<tree string="Break Form" version="7.0" colors="red:current_date-start_timing <= '35';">

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Palkesh,

Thank you so much for your answer....

i want 35 in minutes...so it is in minutes or in hour??

because my both fields are in datetime....

Right now 35 is simple String. if You need as Datetime Format for that than you have to Add DateTime Format and replace with 35.

Tác giả

can you please tell me how to do that???

For That You have to Add Another Two Field Which is Compute Field and That Store Only Minute From Datetime Field.

And Simply Compare That field with '35' in Tree View

Tác giả

Hi Palkesh,

Thank you so much for your reply..

I am new to odoo, so can you please elaborate??