Commit 69af81c
committed
[FIX] account_invoice_report_grouped_by_picking: skip non-return moves on refunds
When a credit note is created without physical return, its lines
inherit move_line_ids from the original delivery moves. The report
processed these delivery moves as if they were return moves,
showing wrong picking associations and wrong quantities.
Now delivery moves (location_id.usage != 'customer') are skipped
for out_refund invoices. Affected lines fall through to the
module's existing lines_dict/no_picking path and render under
'Without reference' in the report.
Updates test assertions to verify product lines have no picking
and 'Without reference' appears when no return picking exists.1 parent 344c5e7 commit 69af81c
2 files changed
Lines changed: 42 additions & 1 deletion
File tree
- account_invoice_report_grouped_by_picking
- models
- tests
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
| |||
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
204 | 217 | | |
205 | 218 | | |
206 | 219 | | |
| |||
351 | 364 | | |
352 | 365 | | |
353 | 366 | | |
354 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
355 | 380 | | |
356 | 381 | | |
357 | 382 | | |
| |||
373 | 398 | | |
374 | 399 | | |
375 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
376 | 408 | | |
377 | 409 | | |
378 | 410 | | |
| |||
0 commit comments