diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2026-01-14 17:04:53 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2026-01-14 17:04:53 +0700 |
| commit | cc31429011b566c64792898b63d1e62d723ab127 (patch) | |
| tree | 434f82538291f5dab6e6cf55f8fcc8221ae8b952 /fixco_custom/models/account_move_reversal.py | |
| parent | 467d67725055822e048e2e0a689a8cc3ffe4a271 (diff) | |
push req iqmal
Diffstat (limited to 'fixco_custom/models/account_move_reversal.py')
| -rw-r--r-- | fixco_custom/models/account_move_reversal.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fixco_custom/models/account_move_reversal.py b/fixco_custom/models/account_move_reversal.py index 2645645..745346a 100644 --- a/fixco_custom/models/account_move_reversal.py +++ b/fixco_custom/models/account_move_reversal.py @@ -45,8 +45,13 @@ class AccountMoveReversal(models.TransientModel): for move in moves.with_context(include_business_fields=True): moves_vals_list.append(move.copy_data({'date': self.date if self.date_mode == 'custom' else move.date})[0]) new_moves = self.env['account.move'].create(moves_vals_list) + + new_moves.action_post() moves_to_redirect |= new_moves + move_line = self.env['account.move.line'].search([('move_id', '=', new_moves.id), ('account_id', '=', 347), ('journal_id', '=', 17)], limit=1) + if move_line and move_line.move_id.reversed_entry_id: + moves.js_assign_outstanding_line(move_line.id) self.new_move_ids = moves_to_redirect |
