[16.0][IMP] mrp_bom_location: logic operator warning

This commit is contained in:
SergiCForgeFlow
2023-09-26 15:36:46 +02:00
parent 48032879ef
commit ea388121fc

View File

@@ -36,7 +36,7 @@ class BomStructureReport(models.AbstractModel):
line_ids = self.env["mrp.bom.line"].search([("bom_id", "=", bom.id)]) line_ids = self.env["mrp.bom.line"].search([("bom_id", "=", bom.id)])
for line in res["components"]: for line in res["components"]:
bom_line = line_ids.filtered( bom_line = line_ids.filtered(
lambda l: l.location_id and l.product_id == line["product_id"] lambda l: l.location_id and l.product_id.id == line["product_id"]
) )
line["location_id"] = bom_line.location_id or "" line["location_id"] = bom_line.location_id or ""
if parent_bom and parent_bom.location_id.complete_name: if parent_bom and parent_bom.location_id.complete_name: