Merge PR #1524 into 15.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2022-10-27 15:33:11 +00:00
2 changed files with 6 additions and 3 deletions

View File

@@ -26,7 +26,9 @@ class StockPicking(models.Model):
"""
:return dict: dictionary value for created view
"""
action = self.env.ref("stock_request.action_stock_request_form").read()[0]
action = self.env["ir.actions.act_window"]._for_xml_id(
"stock_request.action_stock_request_form"
)
requests = self.mapped("stock_request_ids")
if len(requests) > 1:

View File

@@ -343,8 +343,9 @@ class StockRequest(models.Model):
return True
def action_view_transfer(self):
action = self.env.ref("stock.action_picking_tree_all").read()[0]
action = self.env["ir.actions.act_window"]._for_xml_id(
"stock.action_picking_tree_all"
)
pickings = self.mapped("picking_ids")
if len(pickings) > 1:
action["domain"] = [("id", "in", pickings.ids)]