From ce78851ff72b059864218847b5ed2f43dc9bcb5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=BAria=20Sancho?= Date: Thu, 9 Feb 2023 12:00:02 +0100 Subject: [PATCH] [14.0][FIX] stock_request_kanban: fix read --- stock_request_kanban/models/product.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stock_request_kanban/models/product.py b/stock_request_kanban/models/product.py index b757b26af..50c375ae2 100644 --- a/stock_request_kanban/models/product.py +++ b/stock_request_kanban/models/product.py @@ -19,9 +19,9 @@ class ProductTemplate(models.Model): def action_view_kanban_cards(self): self.ensure_one() - action = self.env.ref( + action = self.env["ir.actions.act_window"]._for_xml_id( "stock_request_kanban.stock_request_kanban_action" - ).read()[0] + ) action["context"] = {"default_product_id": self.product_variant_id.id} action["domain"] = [ ("active", "=", True), @@ -45,9 +45,9 @@ class ProductProduct(models.Model): def action_view_kanban_cards(self): self.ensure_one() - action = self.env.ref( + action = self.env["ir.actions.act_window"]._for_xml_id( "stock_request_kanban.stock_request_kanban_action" - ).read()[0] + ) action["context"] = {"default_product_id": self.id} action["domain"] = [("active", "=", True), ("product_id", "=", self.id)] return action