Migration of web_tree_dynamic_colored_field to 10.0

pull/1223/head
jesusVMayor 2017-05-22 19:02:44 +02:00 committed by mreficent
parent e8706b1e27
commit 040e66be72
3 changed files with 26 additions and 30 deletions

View File

@ -5,7 +5,7 @@
'name': 'Colorize field in tree views', 'name': 'Colorize field in tree views',
'summary': 'Allows you to dynamically color fields on tree views', 'summary': 'Allows you to dynamically color fields on tree views',
'category': 'Hidden/Dependency', 'category': 'Hidden/Dependency',
'version': '9.0.2.0.0', 'version': '10.0.1.0.0',
'depends': ['web'], 'depends': ['web'],
'author': "Camptocamp,Therp BV,Odoo Community Association (OCA)", 'author': "Camptocamp,Therp BV,Odoo Community Association (OCA)",
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@ -1,22 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<openerp> <odoo>
<data> <record id="view_users_tree" model="ir.ui.view">
<record id="view_users_tree" model="ir.ui.view"> <field name="model">res.users</field>
<field name="model">res.users</field> <field name="inherit_id" ref="base.view_users_tree" />
<field name="inherit_id" ref="base.view_users_tree" /> <field name="arch" type="xml">
<field name="arch" type="xml"> <xpath expr="." position="attributes">
<xpath expr="." position="attributes"> <attribute name="color_field">lang</attribute>
<attribute name="color_field">lang</attribute> </xpath>
</xpath> <field name="login_date" position="attributes">
<field name="login_date" position="attributes"> <attribute name="bg_color">red: login_date == False</attribute>
<attribute name="bg_color">red: login_date == False</attribute> <attribute name="fg_color">white: 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> </field>
</record> <field name="name" position="attributes">
</data> <attribute name="bg_color">red: login == 'admin'</attribute>
</openerp> <attribute name="fg_color">white: login == 'admin'</attribute>
</field>
</field>
</record>
</odoo>

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- vim:fdn=3: <!-- vim:fdn=3:
--> -->
<openerp> <odoo>
<data> <template id="assets_backend" name="web_tree_dynamic_colored_field assets" inherit_id="web.assets_backend">
<template id="assets_backend" name="web_tree_dynamic_colored_field assets" inherit_id="web.assets_backend"> <xpath expr="." position="inside">
<xpath expr="." position="inside"> <script type="text/javascript" src="/web_tree_dynamic_colored_field/static/src/js/web_tree_dynamic_colored_field.js"></script>
<script type="text/javascript" src="/web_tree_dynamic_colored_field/static/src/js/web_tree_dynamic_colored_field.js"></script> </xpath>
</xpath> </template>
</template> </odoo>
</data>
</openerp>