mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[14.0][FIX] stock_request_kanban: fix read
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user