diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-03-22 09:51:51 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-03-22 09:51:51 +0100 |
| commit | f691d138103ec351be61855d226239d47054b7d4 (patch) | |
| tree | 75432c0f1bfc9564b11d8255cbb5860fb7ee6ecc /addons/gamification/static/src/js/gamification.js | |
| parent | 555ea3810ee770b7535cc24851b5a1da6d4afe01 (diff) | |
[IMP] skip plans with all goals finished
bzr revid: mat@openerp.com-20130322085151-r6sse6383z6ya9by
Diffstat (limited to 'addons/gamification/static/src/js/gamification.js')
| -rw-r--r-- | addons/gamification/static/src/js/gamification.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/gamification/static/src/js/gamification.js b/addons/gamification/static/src/js/gamification.js index 4c7e25980d9..2820666d56d 100644 --- a/addons/gamification/static/src/js/gamification.js +++ b/addons/gamification/static/src/js/gamification.js @@ -22,6 +22,10 @@ openerp.gamification = function(instance) { var self = this; target.append(instance.web.qweb.render(template,{'widget': self})); }, + render_template_replace: function(target,template) { + var self = this; + target.html(instance.web.qweb.render(template,{'widget': self})); + }, get_goal_todo_info: function() { var self = this; var goals_info = this.res_user.call('get_goals_todo_info', {}).then(function(res) { @@ -30,7 +34,7 @@ openerp.gamification = function(instance) { $.when(goals_info).done(function() { console.log(self.goals_info.info); if(self.goals_info.info.length > 0){ - self.render_template(self.$el.find(".oe_gamification_goal"),'goal_list_to_do'); + self.render_template_replace(self.$el.find(".oe_gamification_goal"),'goal_list_to_do'); } }); }, |
