Skip to content

Commit

Permalink
[FIX] ddmrp: print BoM Overview correctly show is buffered.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidJForgeFlow committed Jul 12, 2024
1 parent dadef00 commit 60aedb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ddmrp/report/mrp_report_bom_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@ def _get_bom_array_lines(
data, level, unfolded_ids, unfolded, parent_unfolded
)
for component in data.get("components", []):
if not component["bom_id"]:
continue
bom_line = next(
filter(lambda l: l.get("bom_id", None) == component["bom_id"], lines)
filter(
lambda line: line.get("bom_id", False) == component["bom_id"]
and line.get("name", False) == component["name"]
and line.get("level", False) == component["level"],
lines,
)
)
if bom_line:
bom_line["is_buffered"] = component["is_buffered"]
Expand Down
2 changes: 1 addition & 1 deletion ddmrp/report/mrp_report_bom_structure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<xpath expr="//td[@name='td_mrp_bom']" position="before">
<td t-if="data['show_buffered']">
<span>
<span t-if="data['is_buffered']">
<img
src='/ddmrp/static/img/is_buffered.png'
style="width:30px;height:30px;padding:5px"
Expand Down

0 comments on commit 60aedb6

Please sign in to comment.