Skip to content
Snippets Groups Projects
Commit 6fcedce8 authored by jbm-odoo's avatar jbm-odoo Committed by Yannick Tivisse
Browse files

[IMP] account: add new move reversal line in wizard model


Add new move reversal line in wizard model, those new_move_ids are
usefull for the override in helpdesk.

Currently, we return a form or a list view according to the
number of generated reversed moves.

Now, we link the generated moves on the wizard, so that we can
link the invoice lines correctly to the helpdesk tickets. Now,
the invoice lines are correctly linked only if there is 1 reversed
line.

id=2017554

closes odoo/odoo#39576

Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent 596b3723
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ class AccountMoveReversal(models.TransientModel):
move_id = fields.Many2one('account.move', string='Journal Entry',
domain=[('state', '=', 'posted'), ('type', 'not in', ('out_refund', 'in_refund'))])
new_move_ids = fields.Many2many('account.move')
date = fields.Date(string='Reversal date', default=fields.Date.context_today, required=True)
reason = fields.Char(string='Reason')
refund_method = fields.Selection(selection=[
......@@ -80,6 +81,8 @@ class AccountMoveReversal(models.TransientModel):
else:
return
self.new_move_ids = new_moves
# Create action.
action = {
'name': _('Reverse Moves'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment