mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_request: fix access on act_window
This commit is contained in:
@@ -245,7 +245,9 @@ class StockRequestOrder(models.Model):
|
||||
return
|
||||
|
||||
def action_view_transfer(self):
|
||||
action = self.env.ref("stock.action_picking_tree_all").sudo().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:
|
||||
@@ -256,7 +258,9 @@ class StockRequestOrder(models.Model):
|
||||
return action
|
||||
|
||||
def action_view_stock_requests(self):
|
||||
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"
|
||||
)
|
||||
if len(self.stock_request_ids) > 1:
|
||||
action["domain"] = [("order_id", "in", self.ids)]
|
||||
elif self.stock_request_ids:
|
||||
@@ -338,7 +342,9 @@ class StockRequestOrder(models.Model):
|
||||
],
|
||||
)
|
||||
)
|
||||
action = self.env.ref("stock_request.stock_request_order_action").read()[0]
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock_request.stock_request_order_action"
|
||||
)
|
||||
action["views"] = [
|
||||
(self.env.ref("stock_request.stock_request_order_form").id, "form")
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user