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

[FIX][12.0 -> 13.0]Duplicate move when invoice is draft #4250

Open
wants to merge 2 commits into
base: 13.0
Choose a base branch
from

Conversation

dansanti
Copy link

@dansanti dansanti commented Dec 10, 2023

In some cases, when the invoice is in draft status and has an associated move line, the previous code associated the invoice with the invoice ID. This fix associates the invoice with the associated move line's move_id.
to reproduce:

  • create invoice in draft
  • create a move in draft
  • create a move line for this move
  • reference that line to draft invoice

In some cases, when the invoice is in draft status and has an associated
move line, the previous code associated the invoice with the invoice ID.
This fix associates the invoice with the associated move line's move_id.
@pedrobaeza
Copy link
Member

By definition, a draft invoice can't have an associated move, so that should be a customization on your end, so you should handle this on your side.

@dansanti
Copy link
Author

The original code try to support that case, so this means that is not a customization, I only fix the reference, because originally reference to invoice_id, but must be referenced to move id,, maybe happens when a invoice is open and late was closed.

With the original code, get not found id or is associate to another record (because invoice_id)

@pedrobaeza pedrobaeza added this to the 13.0 milestone Dec 11, 2023
@pedrobaeza
Copy link
Member

Well, unless you put some clear steps to reproduce the problem, this code has been working since a lot without issues reported, so if it's something without extra custom flows, nobody has seen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants