Use data res_id instead of modifying action domain

issue10471
review358151003
This commit is contained in:
Cédric Krier
2021-06-06 09:37:26 +02:00
parent d08a7eee3f
commit 9dbc4e473e
3 changed files with 6 additions and 11 deletions
+4 -7
View File
@@ -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}
+1 -2
View File
@@ -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)
+1 -2
View File
@@ -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':