bzr revid: sgo@tinyerp.com-20120406110852-b4z3nj5k47kbnh21
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-04-06 16:38:52 +05:30
parent c5c72d25a3
commit 6baa76220e
2 changed files with 12 additions and 2 deletions

View File

@ -3,7 +3,13 @@ openerp.project_issue = function(openerp) {
bind_events: function() {
self = this;
self._super();
console.log("ISSUES :: ",self)
console.log(self);
if(this.view.dataset.model == 'project.project') {
if(this.record.task.raw_value && this.record.issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks');
if(!this.record.task.raw_value && this.record.issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_issues');
//if(!this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','dummy');
};
}
});
}

View File

@ -3,7 +3,11 @@ openerp.project_timesheet = function(openerp) {
bind_events: function() {
self = this;
self._super();
console.log("project_timesheet :: ",self)
if(this.view.dataset.model == 'project.project') {
if(this.record.task.raw_value && this.record.issues.raw_value && this.record.timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks');
if(!this.record.task.raw_value && !this.record.issues.raw_value && this.record.timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_timesheets');
//if(!this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','dummy');
};
}
});
}