From a04fce47e99723cb82f023b783ae2dfab0e817f3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 18 Feb 2016 13:41:09 +0100 Subject: [PATCH] [FIX] account: methods calling `reverse_moves` expects a list The methods calling `reverse_moves` expects a list as returned result. For instance, in `account_move.py`, `account.partial.reconcile`, method unlink: ``` reversed_moves = exchange_rate_entries.reverse_moves() for rev_move in self.env['account.move'].browse(reversed_moves): ``` If there was no reversed moves, the method returned a boolean, and a list otherwise. It should always return a list, empty in the above first case. opw-669790 --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index c6f8dd3165f..af0bfab855a 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -211,7 +211,7 @@ class AccountMove(models.Model): reversed_moves._post_validate() reversed_moves.post() return [x.id for x in reversed_moves] - return True + return [] @api.multi def open_reconcile_view(self):