Holger Brunn
8 years ago
No known key found for this signature in database
GPG Key ID: 1C9760FECA3AE18
2 changed files with
25 additions and
0 deletions
-
web_tree_dynamic_colored_field/__openerp__.py
-
web_tree_dynamic_colored_field/demo/res_users.xml
|
@ -10,6 +10,9 @@ |
|
|
'author': "Camptocamp,Therp BV,Odoo Community Association (OCA)", |
|
|
'author': "Camptocamp,Therp BV,Odoo Community Association (OCA)", |
|
|
'license': 'AGPL-3', |
|
|
'license': 'AGPL-3', |
|
|
'website': 'https://github.com/OCA/web', |
|
|
'website': 'https://github.com/OCA/web', |
|
|
|
|
|
'demo': [ |
|
|
|
|
|
"demo/res_users.xml", |
|
|
|
|
|
], |
|
|
'data': [ |
|
|
'data': [ |
|
|
'views/web_tree_dynamic_colored_field.xml', |
|
|
'views/web_tree_dynamic_colored_field.xml', |
|
|
], |
|
|
], |
|
|
|
@ -0,0 +1,22 @@ |
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
|
|
<openerp> |
|
|
|
|
|
<data> |
|
|
|
|
|
<record id="view_users_tree" model="ir.ui.view"> |
|
|
|
|
|
<field name="model">res.users</field> |
|
|
|
|
|
<field name="inherit_id" ref="base.view_users_tree" /> |
|
|
|
|
|
<field name="arch" type="xml"> |
|
|
|
|
|
<xpath expr="." position="attributes"> |
|
|
|
|
|
<attribute name="color_field">lang</attribute> |
|
|
|
|
|
</xpath> |
|
|
|
|
|
<field name="login_date" position="attributes"> |
|
|
|
|
|
<attribute name="bg_color">red: login_date == False</attribute> |
|
|
|
|
|
<attribute name="fg_color">white: login_date == False</attribute> |
|
|
|
|
|
</field> |
|
|
|
|
|
<field name="name" position="attributes"> |
|
|
|
|
|
<attribute name="bg_color">red: login == 'admin'</attribute> |
|
|
|
|
|
<attribute name="fg_color">white: login == 'admin'</attribute> |
|
|
|
|
|
</field> |
|
|
|
|
|
</field> |
|
|
|
|
|
</record> |
|
|
|
|
|
</data> |
|
|
|
|
|
</openerp> |