[IMP,MOD]:Set colors in tree view.

bzr revid: apa@tinyerp.com-20091223114311-uabb85obq7prgqe4
This commit is contained in:
apa-tiny 2009-12-23 17:13:11 +05:30
parent e32b5e6225
commit 3d4bf1423f
25 changed files with 205 additions and 204 deletions

View File

@ -114,7 +114,7 @@
<field name="model">account.invoice</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state=='draft'" string="Invoice">
<tree colors="blue:state in ('draft');black:state not in ('draft')" string="Invoice">
<field name="name"/>
<field name="type"/>
<field name="number"/>

View File

@ -162,7 +162,7 @@
<field name="type">tree</field>
<field name="field_parent">child_id</field>
<field name="arch" type="xml">
<tree string="Chart of accounts" toolbar="1" colors="blue:type=='view'">
<tree string="Chart of accounts" toolbar="1" colors="blue:type in ('view');black:type not in ('view')">
<field name="code"/>
<field name="name"/>
<field name="debit"/>
@ -301,7 +301,7 @@
<field name="model">account.bank.statement</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end)" string="Statement">
<tree colors="red:balance_end_real!=balance_end and state=='draft';blue:state=='draft' and (balance_end_real==balance_end);black:state=='confirm'" string="Statement">
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>

View File

@ -8,7 +8,7 @@
<field name="type">tree</field>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<tree colors="red:date and (date&lt;=current_date)" string="Analytic account">
<tree colors="red:(date&lt;=current_date);black:(date&gt;current_date)" string="Analytic account">
<field name="code"/>
<field name="complete_name"/>
<field name="quantity"/>
@ -43,7 +43,7 @@
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree toolbar="True" colors="red:date and (date&lt;=current_date)" string="Analytic account">
<tree toolbar="True" colors="red:(date&lt;=current_date);black:(date&gt;current_date)" string="Analytic account">
<field name="name"/>
<field name="code"/>
<field name="date"/>

View File

@ -12,7 +12,7 @@
<field name="type">tree</field>
<field eval="99" name="priority"/>
<field name="arch" type="xml">
<tree colors="red:date_deadline&lt;current_date;blue:date_deadline==current_date" string="My Tasks">
<tree colors="red:date_deadline&lt;current_date;blue:date_deadline==current_date;black:date_deadline&gt;current_date" string="My Tasks">
<field name="name"/>
<field name="project_id"/>
<field name="date_deadline"/>

View File

@ -127,7 +127,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Bugs Tree" colors="red:state=='open'">
<tree string="Bugs Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Title"/>
<field name="partner_id"/>

View File

@ -10,7 +10,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Claims" colors="red:state=='open'">
<tree string="Claims" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name"/>
<field name="partner_id"/>

View File

@ -10,7 +10,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Funds Tree" colors="red:state=='open'">
<tree string="Funds Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Funds"/>
<field name="categ_id"/>

View File

@ -125,7 +125,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Helpdesk Support Tree" colors="red:state=='open'">
<tree string="Helpdesk Support Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Support Query"/>
<field name="partner_id" string="Partner"/>

View File

@ -10,7 +10,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Jobs - Recruitment Tree" colors="red:state=='open'">
<tree string="Jobs - Recruitment Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Description"/>
<field name="partner_name" string="Name"/>

View File

@ -141,7 +141,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Leads Tree" colors="red:state=='open'">
<tree string="Leads Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Lead Subject"/>
<field name="partner_phone"/>

View File

@ -51,7 +51,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Meetings Tree" colors="red:state=='open'">
<tree string="Meetings Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Title"/>
<field name="date" string="Next Meeting"/>

View File

@ -133,7 +133,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Opportunities Tree" colors="red:state=='open'">
<tree string="Opportunities Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Opportunities"/>
<field name="stage_id" string="Sales Stage"/>

View File

@ -10,7 +10,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Phone Calls" colors="red:state=='open'">
<tree string="Phone Calls" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="date" string="Date"/>
<field name="name" string="Call Summary"/>
<field name="partner_id" string="Partner"/>
@ -30,7 +30,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Phone Calls" editable="bottom" colors="red:state=='open'">
<tree string="Phone Calls" editable="bottom" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="date" string="Date"/>
<field name="name" string="Call Summary"/>
<field name="partner_id" string="Partner"/>

View File

@ -322,7 +322,7 @@
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:date_deadline&lt;current_date and state=='open'" string="Cases">
<tree colors="red:date_deadline&lt;current_date and state=='open';black:state in ('draft', 'cancel','done','pending')" string="Cases">
<field name="id"/>
<field name="section_id"/>
<field name="date"/>

View File

@ -107,7 +107,7 @@
<field name="model">event.event</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Events" colors="red:register_min>register_current">
<tree string="Events" colors="red:register_min>register_current;black:register_min&lt;=register_current">
<field name="name" string="Name"/>
<field name="user_id"/>
<field name="date_begin"/>

View File

@ -27,7 +27,7 @@
<field name="register_prospect" position="after">
<separator string="Remaining Tasks" colspan="4"/>
<field name="task_ids" colspan="4" nolabel="1" widget="one2many_list" >
<tree string="All tasks" colors="red:date_deadline&lt;current_date and state=='draft';blue:date_deadline==current_date and state=='draft';grey:state=='cancel' or state=='close'">
<tree string="All tasks" colors="red:date_deadline&lt;current_date and state=='draft';blue:date_deadline==current_date and state=='draft';grey:state in ('cancel','done');black:state not in ('cancel','done')">
<field name="sequence"/>
<field name="name"/>
<field name="user_id" />

View File

@ -67,7 +67,7 @@
<field name="model">hr_timesheet_sheet.sheet.day</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:total_difference&lt;=0.1;blue:total_difference&gt;=0.1" string="Timesheet by Days">
<tree colors="red:total_difference&lt;0.1;blue:total_difference&gt;=0.1" string="Timesheet by Days">
<field name="sheet_id"/>
<field name="name"/>
<field name="total_timesheet" sum="Total Timesheet"/>
@ -146,7 +146,7 @@
</page>
<page string="By Day">
<field colspan="4" name="period_ids" nolabel="1">
<tree colors="red:total_difference&lt;=0.1;blue:total_difference&gt;=0.1" string="Period">
<tree colors="red:total_difference&lt;0.1;blue:total_difference&gt;=0.1" string="Period">
<field name="name"/>
<field name="total_attendance" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
<field name="total_timesheet" widget="float_time"/>

View File

@ -375,7 +375,7 @@
<field name="model">mrp.production</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:date_planned&lt;current_date and state not in ('done','cancel')" string="Production orders">
<tree colors="red:date_planned&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date and state in ('done','cancel') " string="Production orders">
<field name="name"/>
<field name="product_id"/>
<field name="product_qty" sum="Total Qty"/>

View File

@ -36,7 +36,7 @@
<field name="type">tree</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<tree colors="red:virtual_available&lt;0;blue:state in ['draft', 'end', 'obsolete']" string="Products">
<tree colors="red:virtual_available&lt;0;blue:virtual_available&gt;=0 and state in ('draft', 'end', 'obsolete');black:virtual_available&gt;=0 and state not in ('draft', 'end', 'obsolete')" string="Products">
<field name="default_code"/>
<field name="name"/>
<field name="variants" groups="product.group_product_variant"/>

View File

@ -68,7 +68,8 @@
</page>
<page string="Tasks">
<field name="tasks" nolabel="1" attrs="{'readonly':[('state','in',['cancelled','done'])]}">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) &amp; (date_deadline&lt;current_date) &amp; (state in ('draft','open'))" string="Tasks">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) and (date_deadline&lt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<!-- <tree string="Tasks">-->
<field name="sequence"/>
<field name="name"/>
<field name="user_id"/>
@ -349,7 +350,7 @@
<field name="type">tree</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) &amp; (date_deadline&lt;current_date) &amp; (state in ('draft','open'))" string="Tasks">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) and (date_deadline&lt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<field name="sequence" string="Seq."/>
<field name="name"/>
<field name="project_id" icon="gtk-indent"/>
@ -372,7 +373,7 @@
<field name="type">tree</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<tree editable="top" colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) &amp; (date_deadline&lt;current_date) &amp; (state in ('draft','open'))" string="Tasks">
<tree editable="top" colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) and (date_deadline&lt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<field name="sequence" string="Seq."/>
<field name="name"/>
<field name="project_id" icon="gtk-indent"/>
@ -395,7 +396,7 @@
<field name="type">tree</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) &amp; (date_deadline&lt;current_date) &amp; (state in ('draft','open'))" string="Tasks">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) and (date_deadline&lt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<field name="sequence" string="Seq."/>
<field name="name"/>
<field name="project_id"/>

View File

@ -102,7 +102,7 @@
<field name="type">tree</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<tree editable="top" colors="grey:state in ('done',);red:state=='cancelled'" string="Tasks">
<tree editable="top" colors="grey:state in ('done',);red:state in ('cancelled');black:state not in ('done','cancelled')" string="Tasks">
<field name="name"/>
<field name="user_id"/>
<field name="timebox_id" widget="selection"/>

View File

@ -53,7 +53,7 @@
<field name="partner_ref" select="2"/>
<newline/>
<field colspan="4" name="order_line" nolabel="1" mode="tree,form">
<tree colors="red:date_planned&lt;=current_date" string="Purchase Order Lines">
<tree colors="red:date_planned&lt;=current_date;black:date_planned&gt;current_date" string="Purchase Order Lines">
<field name="date_planned"/>
<field name="name"/>
<field name="product_id"/>
@ -212,7 +212,7 @@
<field name="model">purchase.order.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:date_planned&lt;=current_date" string="Purchase Order Lines">
<tree colors="red:date_planned&lt;=current_date;black:date_planned&gt;current_date" string="Purchase Order Lines">
<field name="name"/>
<field name="date_planned"/>
<field name="product_id"/>

View File

@ -89,7 +89,7 @@
<field name="model">report.invoice.created</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state=='draft'" string="Invoices">
<tree colors="blue:state in ('draft');black:state not in ('draft') " string="Invoices">
<field name="create_date" select="1"/>
<field name="name" select="1"/>
<field name="type"/>

View File

@ -129,7 +129,7 @@
<field name="model">stock.location</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Stock Location" colors="blue:usage=='view';darkred:usage=='internal'">
<tree string="Stock Location" colors="blue:usage=='view';darkred:usage=='internal';black:usage not in ('view','internal')">
<field name="complete_name"/>
<field name="usage"/>
<field name="stock_real_value" />

View File

@ -139,7 +139,7 @@
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree color="grey:not active" string="Tracking Number">
<tree colors="grey:not active" string="Tracking Number">
<field name="name" select="1"/>
<field name="serial" select="1"/>
<field name="date" select="1"/>
@ -228,7 +228,7 @@
<field name="type">tree</field>
<field name="field_parent">move_history_ids</field>
<field name="arch" type="xml">
<tree color="grey:state=='cancel'" string="Moves">
<tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Moves">
<field name="product_id" select="1"/>
<field name="product_qty" select="1"/>
<field name="product_uom" select="1" string="UOM"/>
@ -250,7 +250,7 @@
<field name="type">tree</field>
<field name="field_parent">move_history_ids2</field>
<field name="arch" type="xml">
<tree color="grey:state=='cancel'" string="Moves">
<tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Moves">
<field name="product_id" select="1"/>
<field name="product_qty" select="1"/>
<field name="product_uom" select="1" string="UOM"/>
@ -364,7 +364,7 @@
<field name="model">stock.location</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Stock location" colors="blue:usage=='view';darkred:usage=='internal'">
<tree string="Stock location" colors="blue:usage=='view';darkred:usage=='internal';black:usage not in ('view','internal')">
<field name="complete_name"/>
<field name="usage"/>
<field name="stock_real" invisible="'product_id' not in context"/>
@ -499,7 +499,7 @@
<field name="model">stock.picking</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree color="red:state=='cancel'" string="Picking list">
<tree colors="red:state in ('cancel');black:state not in ('cancel')" string="Picking list">
<field name="name"/>
<field name="origin"/>
<field name="address_id" select="1"/>
@ -619,7 +619,7 @@
<field name="model">stock.picking</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree color="red:state=='cancel'" string="Picking list">
<tree colors="red:state in ('cancel');black:state not in ('cancel')" string="Picking list">
<field name="name"/>
<field name="origin"/>
<field name="address_id" select="1"/>
@ -774,7 +774,7 @@
<field name="model">stock.picking</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:state=='cancel';grey:state=='confirmed';blue:state=='done'" string="Picking list">
<tree colors="red:state in ('cancel');grey:state in ('confirmed');blue:state in ('done');black:state not in ('cancel','confirmed','done')" string="Picking list">
<field name="name"/>
<field name="origin"/>
<field name="address_id"/>
@ -919,7 +919,7 @@
<field name="model">stock.picking</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree color="red:state=='cancel'" string="Picking list">
<tree colors="red:state in ('cancel');black:state not in ('cancel')" string="Picking list">
<field name="name"/>
<field name="origin"/>
<field name="address_id"/>
@ -1105,7 +1105,7 @@
<field name="type">tree</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<tree color="grey:state=='cancel'" string="Moves">
<tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Moves">
<field name="name"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>