Skip to content
Snippets Groups Projects
Commit 69c557a5 authored by Tiffany Chang (tic)'s avatar Tiffany Chang (tic)
Browse files

[FIX] stock: "Print Labels" non-int qtys in reception report

Steps to reproduce:
- activate Reception Report in settings
- create outgoing picking for a product (qty > qty in stock)
- create an incoming picking for the same product with a non-int qty
- confirm the incoming picking + click on "Allocation" smartbutton
- assign product to outgoing picking + click "Print Labels" (either at
  top of report or within the table of outgoing moves)

Expected result:
Labels and created + printed

Actual result:
ValueError because int() is called on a non-int value within the label
template

Note that the the `onClickPrint` within the reception_report_line.js
already correctly did the Math.ceil rounding on the qty

Noticed during task: 3046178

Part-of: odoo/odoo#119954
parent 86e63e08
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ export class ReceptionReportMain extends Component {
for (const line of lines) {
if (!line.is_assigned) continue;
modelIds.push(line.move_out_id);
quantities.push(line.quantity || 1);
quantities.push(Math.ceil(line.quantity) || 1);
}
}
if (!modelIds.length) {
......
......@@ -49,7 +49,7 @@ export class ReceptionReportTable extends Component {
for (const line of this.props.lines) {
if (!line.is_assigned) continue;
modelIds.push(line.move_out_id);
quantities.push(line.quantity || 1);
quantities.push(Math.ceil(line.quantity) || 1);
}
if (!modelIds.length) {
return;
......
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