summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorjbm-odoo <jbm@odoo.com>2019-10-30 10:47:37 +0000
committerYannick Tivisse <yti@odoo.com>2019-11-07 09:22:43 +0000
commit6fcedce834bd204351bfc91da62a76618dd27f0a (patch)
treeaa513dce4e503bfc0c0960c7274f637ff974fa24 /addons
parent596b3723f249e0f556fc4a47abe5dd8db2d070dd (diff)
[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: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/wizard/account_move_reversal.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/account/wizard/account_move_reversal.py b/addons/account/wizard/account_move_reversal.py
index 63208d6469b..d51de2a7e69 100644
--- a/addons/account/wizard/account_move_reversal.py
+++ b/addons/account/wizard/account_move_reversal.py
@@ -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'),