From b017faff537c47f9a7b6d3eb5c2aaf38fbad032f Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Thu, 18 Jun 2015 14:35:32 +0200 Subject: [PATCH] [FIX][account_move_batch_validate] Filter on journals doesn't work --- account_move_batch_validate/wizard/move_marker.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/account_move_batch_validate/wizard/move_marker.py b/account_move_batch_validate/wizard/move_marker.py index c018bf190..9db975cd4 100644 --- a/account_move_batch_validate/wizard/move_marker.py +++ b/account_move_batch_validate/wizard/move_marker.py @@ -38,7 +38,11 @@ class AccountMoveMarker(orm.TransientModel): ('mark', 'Mark for posting'), ('unmark', 'Unmark for posting'), ], "Action", required=True), - 'eta': fields.integer('Seconds to wait before starting the jobs') + 'eta': fields.integer('Seconds to wait before starting the jobs'), + 'journal_ids': fields.many2many('account.journal', + 'account_post_journal_rel', + 'wiz_id', 'journal_id', 'Journals', + required=True), } _defaults = { @@ -57,6 +61,10 @@ class AccountMoveMarker(orm.TransientModel): wizard_data = self.read(cr, uid, wizard_id, context=context, load='_classic_write') wizard_data.pop('id') + if wizard_data.get('journal_ids'): + journals_ids_vals = [(6, False, + wizard_data.get('journal_ids'))] + wizard_data['journal_ids'] = journals_ids_vals if context.get('automated_test_execute_now'): process_wizard(session, self._name, wizard_data)