[IMP]:added def dummy

bzr revid: apa@tinyerp.com-20120508105521-1mqur1isvkw0j5n7
This commit is contained in:
Amit Patel (OpenERP) 2012-05-08 16:25:21 +05:30
parent 645d2437e0
commit abdc6e0383
2 changed files with 8 additions and 5 deletions

View File

@ -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)

View File

@ -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.