diff --git a/addons/project/project.py b/addons/project/project.py index f1f6c5f285f..826cc43c780 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -204,6 +204,8 @@ class project(osv.osv): 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), } + def dummy(self, cr, uid,ids, context): + return False def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index f5e6bdd99d6..b7c37d9671e 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -26,14 +26,15 @@ openerp.project = function(openerp) { $('#list').replaceWith(my_list); //it opens action in sequence which ever is first. - + click_button = $(this.$element).find('.click_button') if (my_list.length!=0){ - click_button = $(this.$element).find('.click_button') click_button.attr('data-name',my_list[0].getAttribute('data-name')); - if(isNaN(parseInt(click_button.attr('data-name')))){ - click_button.attr('data-type',"object") - } } + else{ + click_button.attr('data-name','dummy'); + } + if(isNaN(parseInt(click_button.attr('data-name'))))click_button.attr('data-type',"object"); + /* set background color. we can do other way to implement new widget. because we need to rpc call for that.