mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] account_exception: do not use ensure_one() on post
H11044
This commit is contained in:
@@ -32,7 +32,13 @@ class AccountMove(models.Model):
|
|||||||
return self.env.ref('account_exception.action_account_move_exception_confirm')
|
return self.env.ref('account_exception.action_account_move_exception_confirm')
|
||||||
|
|
||||||
def action_post(self):
|
def action_post(self):
|
||||||
self.ensure_one()
|
if len(self) == 1:
|
||||||
if self.detect_exceptions():
|
if self.detect_exceptions():
|
||||||
return self._popup_exceptions()
|
return self._popup_exceptions()
|
||||||
return super().action_post()
|
else:
|
||||||
|
return super().action_post()
|
||||||
|
else:
|
||||||
|
moves_with_exceptions = self.filtered(lambda m: m.detect_exceptions())
|
||||||
|
other_moves = self - moves_with_exceptions
|
||||||
|
return super(AccountMove, other_moves).action_post()
|
||||||
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user