mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_location_tray: fix permission on act_window in v14
This commit is contained in:
@@ -82,7 +82,9 @@ class StockLocation(models.Model):
|
||||
)
|
||||
location.ensure_one()
|
||||
view = self.env.ref("stock.view_location_form")
|
||||
action = self.env.ref("stock.action_location_form").read()[0]
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.action_location_form"
|
||||
)
|
||||
action.update(
|
||||
{
|
||||
"res_id": location.id,
|
||||
|
||||
@@ -106,7 +106,9 @@ class StockLocationTrayType(models.Model):
|
||||
)
|
||||
|
||||
def open_locations(self):
|
||||
action = self.env.ref("stock.action_location_form").read()[0]
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.action_location_form"
|
||||
)
|
||||
action["domain"] = [("tray_type_id", "in", self.ids)]
|
||||
if len(self.ids) == 1:
|
||||
action["context"] = {"default_tray_type_id": self.id}
|
||||
|
||||
Reference in New Issue
Block a user