Skip to content

Commit

Permalink
Merge PR #271 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed May 11, 2023
2 parents f158f8b + badbc2e commit a79d193
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ddmrp/models/stock_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1690,26 +1690,23 @@ def action_view_supply(self, outside_dlt=False):
result = self.env["ir.actions.actions"]._for_xml_id("purchase.purchase_rfq")
# Remove the context since the action display RFQ and not PO.
result["context"] = {}
result["domain"] = [("id", "in", pos.ids), ("active", "in", (False, True))]
result["domain"] = [("id", "in", pos.ids)]
elif self.item_type == "manufactured":
moves = self._search_stock_moves_incoming(outside_dlt)
mos = moves.mapped("production_id")
result = self.env["ir.actions.actions"]._for_xml_id(
"mrp.mrp_production_action"
)
result["context"] = {}
result["domain"] = [("id", "in", mos.ids), ("active", "in", (False, True))]
result["domain"] = [("id", "in", mos.ids)]
else:
moves = self._search_stock_moves_incoming(outside_dlt)
picks = moves.mapped("picking_id")
result = self.env["ir.actions.actions"]._for_xml_id(
"stock.action_picking_tree_all"
)
result["context"] = {}
result["domain"] = [
("id", "in", picks.ids),
("active", "in", (False, True)),
]
result["domain"] = [("id", "in", picks.ids)]
return result

def action_view_supply_inside_dlt_window(self):
Expand Down

0 comments on commit a79d193

Please sign in to comment.