@@ -201,7 +201,9 @@ class project(osv.osv):
|
||||
'task': fields.boolean('Task',help = "If you check this field tasks appears in kanban view"),
|
||||
'open_task': fields.function(_open_task , type='integer',string="Open Tasks"),
|
||||
}
|
||||
|
||||
def dummy(self, cr, uid, ids, context=None):
|
||||
return False
|
||||
|
||||
def open_tasks(self, cr, uid, ids, context=None):
|
||||
#Open the View for the Tasks for the project
|
||||
"""
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
</t>
|
||||
</a>
|
||||
</h4>
|
||||
<button class="click_button" type="object">
|
||||
<button class="click_button" type="object" t-att-id="record.id.value">
|
||||
<table class="project_fields">
|
||||
<tr id="deadline" t-if="record.date.raw_value">
|
||||
<th align="left">Deadline</th>
|
||||
|
||||
@@ -9,7 +9,22 @@ openerp.project = function(openerp) {
|
||||
}).mouseout(function() {
|
||||
return $(this).find('.oe_project_kanban_action').hide();
|
||||
});
|
||||
$('.click_button').attr('data-name','open_tasks');
|
||||
|
||||
|
||||
$('.click_button').mouseover(function() {
|
||||
click_button = this
|
||||
var domain = [['id','=',this.getAttribute("id")]];
|
||||
var dataset = new openerp.web.DataSetSearch(self, 'project.project', self.session.context, domain);
|
||||
dataset.read_slice([]).then(function(result){
|
||||
if(result[0].task){
|
||||
click_button.setAttribute('data-name','open_tasks');
|
||||
}
|
||||
else
|
||||
{
|
||||
click_button.setAttribute('data-name','dummy');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
_.each($('.oe_project_kanban_vignette'),function(record){
|
||||
_.each(record.getElementsByTagName('img'),function(img){
|
||||
|
||||
Reference in New Issue
Block a user