[IMP] don't use new action manager for do_action

bzr revid: mat@openerp.com-20130527093738-2dp8uw5nli7xzahu
This commit is contained in:
Martin Trigaux 2013-05-27 11:37:38 +02:00
parent b605ff4242
commit a51a1fe65d
2 changed files with 3 additions and 6 deletions

View File

@ -389,8 +389,7 @@ class gamification_goal(osv.Model):
views = [(view_id, mode)]
break
action['views'] = views
# doesn't seem to work if not in popup
action['target'] = 'new'
return action
if goal.computation_mode == 'manually':

View File

@ -29,8 +29,7 @@ openerp.gamification = function(instance) {
goal_action['action'] = res;
});
$.when(goal_action).done(function() {
var action_manager = new instance.web.ActionManager(this);
var action = action_manager.do_action(goal_action.action);
var action = self.do_action(goal_action.action);
$.when(action).done(function () {
new instance.web.Model('gamification.goal').call('update', [[goal_id]]).then(function(res) {
self.get_goal_todo_info();
@ -46,8 +45,7 @@ openerp.gamification = function(instance) {
plan_action['action'] = res;
});
$.when(plan_action).done(function() {
var action_manager = new instance.web.ActionManager(this);
action_manager.do_action(plan_action.action).done(function () {
self.do_action(plan_action.action).done(function () {
self.get_goal_todo_info();
});
});