Holger Brunn
8 years ago
committed by
mreficent
5 changed files with 77 additions and 67 deletions
-
17web_tree_dynamic_colored_field/README.rst
-
21web_tree_dynamic_colored_field/__init__.py
-
32web_tree_dynamic_colored_field/__openerp__.py
-
22web_tree_dynamic_colored_field/demo/res_users.xml
-
52web_tree_dynamic_colored_field/static/src/js/web_tree_dynamic_colored_field.js
@ -1,20 +1,3 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
############################################################################## |
|
||||
# |
|
||||
# Author: Damien Crier |
|
||||
# Copyright 2015 Camptocamp SA |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# This program is distributed in the hope that it will be useful, |
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
# GNU Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# © 2015 Camptocamp SA, Damien Crier |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
@ -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> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue