summaryrefslogtreecommitdiff
path: root/fixco_custom/models/account_move_reversal.py
diff options
context:
space:
mode:
Diffstat (limited to 'fixco_custom/models/account_move_reversal.py')
-rw-r--r--fixco_custom/models/account_move_reversal.py5
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