diff --git a/fiscalyear.py b/fiscalyear.py index 1450418274..4e0d85e33f 100644 --- a/fiscalyear.py +++ b/fiscalyear.py @@ -460,11 +460,9 @@ class BalanceNonDeferral(Wizard): return move def do_balance(self, action): - self.create_move() - action['pyson_domain'] = PYSONEncoder().encode([ - ('move.origin', '=', str(self.start.fiscalyear)), - ]) - return action, {} + move = self.create_move() + action['views'].reverse() + return action, {'res_id': move.id} class CreatePeriodsStart(ModelView): @@ -635,6 +633,5 @@ class RenewFiscalYear(Wizard): def do_create_(self, action): fiscalyear = self.create_fiscalyear() - action['res_id'] = [fiscalyear.id] action['views'].reverse() - return action, {} + return action, {'res_id': fiscalyear.id} diff --git a/move.py b/move.py index e0a5edf56c..7fc0ee1c5f 100644 --- a/move.py +++ b/move.py @@ -1963,8 +1963,7 @@ class GroupLines(Wizard): def do_group(self, action): move, balance_line = self._group_lines(self.records) - action['res_id'] = [move.id] - return action, {} + return action, {'res_id': move.id} def _group_lines(self, lines, date=None): move, balance_line = self.group_lines(lines, self.start.journal, date) diff --git a/move_template.py b/move_template.py index 6f278fee9a..a7696d29db 100644 --- a/move_template.py +++ b/move_template.py @@ -342,8 +342,7 @@ class CreateMove(Wizard): def do_open_(self, action): move = self.create_move() - action['res_id'] = [move.id] - return action, {} + return action, {'res_id': move.id} def end(self): if self.model and self.model.__name__ == 'account.move.line':