Skip to content
Snippets Groups Projects
Commit 2ad9079e authored by Thomas Beckers's avatar Thomas Beckers
Browse files

[FIX] purchase: don't mix PO's lines in generated invoices


If we use the auto-complete feature to add PO's lines to an bill or we select multiple PO's then use
'create bill' button, the generated invoice line will copy the sequence line from the PO's line. This
can lead to situation where we will have all the first lines of each PO then all the second, etc, ending
with a mix of all PO's in the bill.

Example:
Purchase order 1
- seq 10 line A
- seq 11 line B
- seq 12 line C

Purchase order 2
- seq 10 line A'
- seq 11 line B'
- seq 12 line C'

Invoice created from those PO's
- seq 10 PO1:line A
- seq 10 PO2:line A'
- seq 11 PO1:line B
- seq 11 PO2:line B'
- seq 12 PO1:line C
- seq 12 PO2:line C'

After this PR this PR the lines from the same PO's will be contiguous like:

Invoice created from those PO 1 and 2
- seq 10 PO1:line A
- seq 11 PO1:line B
- seq 12 PO1:line C
- seq 13 PO2:line A'
- seq 14 PO2:line B'
- seq 15 PO2:line C'

opw-2749682

closes odoo/odoo#95052

X-original-commit: 49b143e1
Signed-off-by: default avatarSteve Van Essche <svs@odoo.com>
Signed-off-by: default avatarBeckers Thomas (tbs) <tbs@odoo.com>
parent ef131064
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment