[14.0][FIX] stock_request_kanban: fix read

This commit is contained in:
Núria Sancho
2023-02-09 12:00:02 +01:00
parent bcf77e1047
commit 9fbd3b9fb7

View File

@@ -19,9 +19,9 @@ class ProductTemplate(models.Model):
def action_view_kanban_cards(self): def action_view_kanban_cards(self):
self.ensure_one() self.ensure_one()
action = self.env.ref( action = self.env["ir.actions.act_window"]._for_xml_id(
"stock_request_kanban.stock_request_kanban_action" "stock_request_kanban.stock_request_kanban_action"
).read()[0] )
action["context"] = {"default_product_id": self.product_variant_id.id} action["context"] = {"default_product_id": self.product_variant_id.id}
action["domain"] = [ action["domain"] = [
("active", "=", True), ("active", "=", True),
@@ -45,9 +45,9 @@ class ProductProduct(models.Model):
def action_view_kanban_cards(self): def action_view_kanban_cards(self):
self.ensure_one() self.ensure_one()
action = self.env.ref( action = self.env["ir.actions.act_window"]._for_xml_id(
"stock_request_kanban.stock_request_kanban_action" "stock_request_kanban.stock_request_kanban_action"
).read()[0] )
action["context"] = {"default_product_id": self.id} action["context"] = {"default_product_id": self.id}
action["domain"] = [("active", "=", True), ("product_id", "=", self.id)] action["domain"] = [("active", "=", True), ("product_id", "=", self.id)]
return action return action