Skip to content

Commit

Permalink
Merge pull request #1 from akretion/16.0-fix-get-moves
Browse files Browse the repository at this point in the history
[FIX] get_moves method accumulates previously selected entries
  • Loading branch information
alexis-via authored May 6, 2024
2 parents aeefe35 + 8dcf11d commit d2df8bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion account_move_export/models/account_move_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,10 @@ def _csv_encode(self, tmpfile):

def get_moves(self):
self.ensure_one()
assert self.filter_type == "custom"
assert self.filter_type == 'custom'
previous_moves = self.env["account.move"].search([("account_move_export_id", "=", self.id)])
if previous_moves:
previous_moves.write({'account_move_export_id': False})
domain = self._prepare_custom_filter_domain()
moves = self.env["account.move"].search(domain)
if not moves:
Expand Down

0 comments on commit d2df8bb

Please sign in to comment.