2017-04-10 195 views
0

在Odoo 9中,我根據字段更改了樹視圖。這個工程,但我也想使字體粗體。我讀到可以結合decfa-bf使顏色更好地突出。Odoo Treeview顏色和字體

<tree string="Status" decoration-danger="status=='open'" 
      decoration-success="status=='complete'" 
      decoration-info="status=='progress'" 
      decoration-warning="status=='response'" 
      decoration-primary="status=='pickup'"> 
       <field name="x_partner_id"/> 
       <field name="status" editable="true"/> 
       <field name="create_date"/> 
      </tree> 

我試圖

<tree string="Status" decoration-danger="status=='open'" 
      decoration-success-bf="status=='complete'" 
      decoration-info-bf="status=='progress'" 
      decoration-warning-bf="status=='response'" 
      decoration-primary-bf="status=='pickup'"> 
       <field name="x_partner_id"/> 
       <field name="status" editable="true"/> 
       <field name="create_date"/> 
      </tree> 

回答

1

我相信decoration-bf應單獨[source]設定,讓你可以寫這樣的事情:

<tree string="Status" decoration-danger="status=='open'" 
     decoration-success="status=='complete'" 
     decoration-info="status=='progress'" 
     decoration-warning="status=='response'" 
     decoration-primary="status=='pickup'" 
     decoration-bf="status in ('complete', 'progress', 'response', 'pickup')"> 
    <field name="x_partner_id"/> 
    <field name="status" editable="true"/> 
    <field name="create_date"/> 
</tree> 
+0

感謝Naglis奏效。 – user2379186