OCA/l10n-france

Remaining bug when creating a refund for a chorus invoice

Closed this issue · 2 comments

Module

l10n-france/l10n_fr_chorus_account/models/account_move.py

Describe the bug

Around line 285 in v12

elif self.move_type == "out_refund": if self.payment_mode_id: raise UserError( _( "The Payment Mode must be empty " "for customer refunds sent to Chorus." )

The payment_mode_id is transfered from the invoice to the refund when refunding the invoice.

Exceptionnally, when refunding a Chorus type invoice, the payment_mode_id MUST be set to Null.

Here the refund invoice can not be validated because the payment_mode_id IS NOT set to Null before raising the error.

To Reproduce

In V12.

  1. Create an invoice for a customer having payment_mode_id = chorus.
  2. Create a refund for the invoice, the error message will display and the refund invoice is not created.

Expected behavior

A refund invoice should be created having payment_mode_id = Null.

I agree it can be improved. Please create a PR to fix this.

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.