# Return sale with canceled invoice

**URL:** https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125
**Category:** User
**Tags:** accounting, sales
**Created:** [August 16, 2020, 5:42pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125 "2020-08-16T17:42:38Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [August 16, 2020, 5:42pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/1 "2020-08-16T17:42:38Z")

</div>

Hi,

I have the follow case

1. Create a sale and process it.
2. Post the invoice and after cancel (wrong TAX ID), and after create a new invoice with the correct data.
3. Validate the shipment.
4. The customer return the sale for wrong product sended. The currect sale has in invoice state: Exception, but when the Return button is pressed, it creates a new invoice and shipment return with negative amounts. I know these is the expected behavior, but in these case I need to cancel the new invoice created in step 2. I’m not sure how to manage these case.

Another question, some times, when a sale is returned I don’t need to create a new invoice but only cancel the invoice and create the shipment return How can manage these?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 16, 2020, 8:47pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/2 "2020-08-16T20:47:37Z")

</div>

> [@iehoshia](#):
>
> The currect sale has in invoice state: Exception

Well it seems you did not recreate the invoice to fix the tax but do a manual invoice. This is not good for the system as it does not know about this new invoice.

> [@iehoshia](#):
>
> I know these is the expected behavior, but in these case I need to cancel the new invoice created in step 2.

I do not see why. You have an invoice and a credit note which cancel each other. So you just need to reconcile them together.

> [@iehoshia](#):
>
> Another question, some times, when a sale is returned I don’t need to create a new invoice but only cancel the invoice and create the shipment return How can manage these?

In accounting there is no such thing as cancelling an invoice. There is only credit note that “cancel” invoice.

---

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [August 16, 2020, 9:45pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/3 "2020-08-16T21:45:21Z")

</div>

> [@ced](#):
>
> I do not see why. You have an invoice and a credit note which cancel each other. So you just need to reconcile them together.

Could you help me with that? How to reconcile an invoice and a credit invoice?

Can these procedure works if the invoices is paid?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 17, 2020, 9:01am UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/4 "2020-08-17T09:01:13Z")

</div>

> [@iehoshia](#):
>
> How to reconcile an invoice and a credit invoice?

Use the reconciliation wizard on the move lines or the reconcile account wizard.

> [@iehoshia](#):
>
> Can these procedure works if the invoices is paid?

This means that the move line of the invoice is already reconciled so you will have to unreconcile it prior to reconcile with another line.

---

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [August 17, 2020, 3:44pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/5 "2020-08-17T15:44:16Z")

</div>

> [@ced](#):
>
> This means that the move line of the invoice is already reconciled so you will have to unreconcile it prior to reconcile with another line.

I’m using account\_payment module to receive the payment of the invoice.

The procedure is the follow:

1. Post the invoice (created from sale).
2. Create a payment, aprove, process and succeed.
3. The invoice move is reconciled, and the invoice is updated to paid state.

To unreconcile invoice , I tried to fail the payment, but tryton tell that cannot modify invoice “14” because it is posted, paid or cancelled. How to fail the payment? Or to unreconcile the invoice? In the menu I only found moves but not move lines, where it can be found?

I was searching for unreconcile wizard but only find it on Financial \> Processing \> Reconcile Accounts.

Thanks for your help.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 17, 2020, 4:39pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/6 "2020-08-17T16:39:58Z")

</div>

> [@iehoshia](#):
>
> I’m using account\_payment module to receive the payment of the invoice.

This is not the purpose of account\_payment (see [Account Payment Module — Tryton module for payment](https://docs.tryton.org/projects/modules-account-payment/en/latest/#payment)).  
You should use account\_statement or the pay button on the invoice.

> [@iehoshia](#):
>
> To unreconcile invoice , I tried to fail the payment, but tryton tell that cannot modify invoice “14” because it is posted, paid or cancelled.

Are you using an old version. It seems you are hit by [Remove clearing move link before delete it (#6786) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue6786)

> [@iehoshia](#):
>
> I was searching for unreconcile wizard

This wizard is linked to move lines. So you must open for example the payable/receivable lines from the party. Or open the payable or receivable account from the chart of accounts.

---

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [August 17, 2020, 5:32pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/7 "2020-08-17T17:32:26Z")

</div>

> [@ced](#):
>
> You should use account\_statement or the pay button on the invoice.

Thanks for the info, I will use it from now on.

> [@ced](#):
>
> Are you using an old version. It seems you are hit by [Issue 6786: Remove clearing move link before delete it - Tryton issue tracker](https://bugs.tryton.org/issue6786)

I’m using trytond and trytond\_account\_payment\_clearing 5.6.0.

> [@ced](#):
>
> So you must open for example the payable/receivable lines from the party.

To open payable/receivable lines I use Financial \> Payments \> Lines to Pay, but if an invoice is already paid (I tried with account\_statement) the lines doesn’t appear more.

> [@ced](#):
>
> Or open the payable or receivable account from the chart of accounts.

Thanks, I found the move lines in Financial \> Charts \> Open Charts of Accounts and after select the receivable account. BTW, after run the wizard I still receive the message ‘You cannot modify invoice “18” because it is posted, paid or cancelled’.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 17, 2020, 7:02pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/8 "2020-08-17T19:02:26Z")

</div>

> [@iehoshia](#):
>
> Thanks, I found the move lines in Financial \> Charts \> Open Charts of Accounts and after select the receivable account. BTW, after run the wizard I still receive the message ‘You cannot modify invoice “18” because it is posted, paid or cancelled’.

It looks like you have a module that modify other fields than the `Invoice._check_modify_exclude` when the invoice is processed for “unpaid”.

---

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [August 17, 2020, 10:51pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/9 "2020-08-17T22:51:52Z")

</div>

Yes, I have other fields in a custom module and doesn’t not be included in Invoice.\_check\_modify\_exclude.

Thanks for all your help!

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [September 16, 2020, 10:52pm UTC](https://discuss.tryton.org/t/return-sale-with-canceled-invoice/3125/10 "2020-09-16T22:52:00Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
