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

[FIX] stock: disable reception "Assign All" when nothing to assign

In the case of draft pickings/MOs, the reception_report_main
component's "Assign All" button was NOT disabled, which could result
in an IndexError if the button was pushed. Note that this issue does not
occur for the "Assign All" button within a table because the button is
correctly not shown at all when there are no assignable lines within it.

Noticed during task: 3046178

Part-of: odoo/odoo#119954
parent 69c557a5
Branches
Tags
No related merge requests found
......@@ -133,7 +133,7 @@ export class ReceptionReportMain extends Component {
}
get isAssignAllDisabled() {
return Object.values(this.state.sourcesToLines).every(lines => lines.every(line => line.is_assigned));
return Object.values(this.state.sourcesToLines).every(lines => lines.every(line => line.is_assigned || !line.is_qty_assignable));
}
get isPrintLabelDisabled() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment