Use data res_id instead of modifying action domain
issue10471 review358151003
This commit is contained in:
+4
-7
@@ -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}
|
||||
|
||||
@@ -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
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user