Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16.0 fix down payment #95

Closed
wants to merge 2 commits into from
Closed

Conversation

cpintofonseca
Copy link

The goal of this PR is to allow to deduct down payments on an invoice using InvoiceXpress.

First problem:

  1. Create an invoice with a down payment;
  2. Create a second invoice and deduct down payments.
    Odoo will create a negative line with the down payments on the second invoice. We can't have negative lines in InvoiceXpress.

Second problem:
We can't register a payment on a credit note. When we finalize a credit note in InvoiceXpress (the equivalent of posting a credit note in Odoo) it automatically changes the state to paid.

Solution to first problem:
When we post an invoice, we will look for down payments with negative amounts. Before the post, we will delete those negative lines from the invoice and delete the down payment section. After the post we will create, post and reconcile a new credit note linked with the invoice, using the deleted lines.

Solution to second problem:
We will prevent in Odoo the registration of a payment in the credit note, forcing a reconciliation in the source invoice instead. We will also prevent the registration of a payment in the source invoice, if the source invoice has outstanding credits.

@OCA-git-bot
Copy link
Collaborator

Hi @dreispt,
some modules you are maintaining are being modified, check this out!

@dreispt
Copy link
Sponsor Member

dreispt commented Nov 16, 2023

I believe this is a workflow need, and not a InvX connector need.
When creating the invoice, a separate Credit Note document should be also created for the down payment.
Both document will eventually need to be sent to InvX, but no change in the connector will be needed for that.

@dreispt
Copy link
Sponsor Member

dreispt commented Jan 27, 2024

See #104 for a proof of concept of what I think the the right solution.

Copy link

github-actions bot commented Jun 2, 2024

There hasn't been any activity on this pull request in the past 4 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 PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 2, 2024
@github-actions github-actions bot closed this Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants