Browse Source

Migration of web_tree_dynamic_colored_field to 10.0

pull/1223/head
jesusVMayor 8 years ago
committed by mreficent
parent
commit
040e66be72
  1. 2
      web_tree_dynamic_colored_field/__manifest__.py
  2. 38
      web_tree_dynamic_colored_field/demo/res_users.xml
  3. 16
      web_tree_dynamic_colored_field/views/web_tree_dynamic_colored_field.xml

2
web_tree_dynamic_colored_field/__openerp__.py → web_tree_dynamic_colored_field/__manifest__.py

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

38
web_tree_dynamic_colored_field/demo/res_users.xml

@ -1,22 +1,20 @@
<?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>
<odoo>
<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>
</record>
</data>
</openerp>
<field name="name" position="attributes">
<attribute name="bg_color">red: login == 'admin'</attribute>
<attribute name="fg_color">white: login == 'admin'</attribute>
</field>
</field>
</record>
</odoo>

16
web_tree_dynamic_colored_field/views/web_tree_dynamic_colored_field.xml

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