summaryrefslogtreecommitdiff
path: root/addons/account/wizard
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2020-03-25 12:57:09 +0000
committerAaron Bohy <aab@odoo.com>2020-03-30 13:33:40 +0000
commit7c740639fd78b6b59509e07ef2478913a183c9c1 (patch)
tree5044b2fba4cfa4c543984ddbae08b46b09759063 /addons/account/wizard
parent009fe3e81bc982f25b052dc4430f6a232e4bff95 (diff)
[REF] account: remove select_all
Following the new selection feature in list view, we can remove the custom handling in the resequence action, aiming to perform the action on the active_domain when all records of the page were selected. Part of task 2185145
Diffstat (limited to 'addons/account/wizard')
-rw-r--r--addons/account/wizard/account_resequence.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/account/wizard/account_resequence.py b/addons/account/wizard/account_resequence.py
index b585395f5f5..bd0b9378cd4 100644
--- a/addons/account/wizard/account_resequence.py
+++ b/addons/account/wizard/account_resequence.py
@@ -26,9 +26,7 @@ class ReSequenceWizard(models.TransientModel):
def default_get(self, fields_list):
values = super(ReSequenceWizard, self).default_get(fields_list)
active_move_ids = self.env['account.move']
- if self.env.context.get('select_all') and self.env.context.get('active_model') == 'account.move' and 'active_domain' in self.env.context:
- active_move_ids = self.env['account.move'].search(self.env.context['active_domain'])
- elif self.env.context['active_model'] == 'account.move' and 'active_ids' in self.env.context:
+ if self.env.context['active_model'] == 'account.move' and 'active_ids' in self.env.context:
active_move_ids = self.env['account.move'].browse(self.env.context['active_ids'])
if len(active_move_ids.journal_id) > 1:
raise UserError(_('You can only resequence items from the same journal'))