From e5f75346e61a1ea1c8c3d8adbc75d711a9ab9629 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Tue, 22 Mar 2016 10:14:50 +0100 Subject: [PATCH] delete unused code, move files to standard locations --- web_tree_dynamic_colored_field/__openerp__.py | 2 +- .../js/web_tree_dynamic_colored_field.js | 41 ++----------------- .../xml/web_tree_dynamic_colored_field.xml | 4 +- .../views/web_tree_dynamic_colored_field.xml | 4 +- 4 files changed, 8 insertions(+), 43 deletions(-) rename web_tree_dynamic_colored_field/static/{ => src}/js/web_tree_dynamic_colored_field.js (54%) rename web_tree_dynamic_colored_field/static/{ => src}/xml/web_tree_dynamic_colored_field.xml (64%) diff --git a/web_tree_dynamic_colored_field/__openerp__.py b/web_tree_dynamic_colored_field/__openerp__.py index 45c2be52..b4c13385 100644 --- a/web_tree_dynamic_colored_field/__openerp__.py +++ b/web_tree_dynamic_colored_field/__openerp__.py @@ -30,7 +30,7 @@ 'views/web_tree_dynamic_colored_field.xml', ], 'qweb': [ - 'static/xml/*.xml', + 'static/src/xml/*.xml', ], 'auto_install': False, 'installable': False, diff --git a/web_tree_dynamic_colored_field/static/js/web_tree_dynamic_colored_field.js b/web_tree_dynamic_colored_field/static/src/js/web_tree_dynamic_colored_field.js similarity index 54% rename from web_tree_dynamic_colored_field/static/js/web_tree_dynamic_colored_field.js rename to web_tree_dynamic_colored_field/static/src/js/web_tree_dynamic_colored_field.js index 2c3b5e4f..c1a22d76 100644 --- a/web_tree_dynamic_colored_field/static/js/web_tree_dynamic_colored_field.js +++ b/web_tree_dynamic_colored_field/static/src/js/web_tree_dynamic_colored_field.js @@ -1,8 +1,4 @@ openerp.web_tree_dynamic_colored_field = function(instance){ - var _t = instance.web._t, - _lt = instance.web._lt; - var QWeb = instance.web.qweb; - var pair_colors = function(pair_color){ if (pair_color != ""){ var pair_list = pair_color.split(':'), @@ -25,10 +21,7 @@ openerp.web_tree_dynamic_colored_field = function(instance){ var ctx = _.extend( {}, record.attributes, - { - uid: obj.session.uid, - current_date: new Date().toString('yyyy-MM-dd') - } + instance.web.pyeval.context() ); for(i=0, len=colors.length; i - fct_colorize(record, column) + columns.fct_colorize(record, column) - \ No newline at end of file + diff --git a/web_tree_dynamic_colored_field/views/web_tree_dynamic_colored_field.xml b/web_tree_dynamic_colored_field/views/web_tree_dynamic_colored_field.xml index 4d425fd9..7341731d 100644 --- a/web_tree_dynamic_colored_field/views/web_tree_dynamic_colored_field.xml +++ b/web_tree_dynamic_colored_field/views/web_tree_dynamic_colored_field.xml @@ -5,8 +5,8 @@ - \ No newline at end of file +