mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-20 10:16:45 -06:00
commit
7e89369543
@ -58,7 +58,7 @@ class IrAttachmentCategory(models.Model):
|
||||
|
||||
def action_attachment_view(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("base.action_attachment").read()[0]
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id("base.action_attachment")
|
||||
action["domain"] = [("category_ids", "child_of", self.id)]
|
||||
context = self.env.context.copy()
|
||||
context.update({"default_category_ids": [self.id]})
|
||||
|
@ -130,8 +130,9 @@ class DocumentPage(models.Model):
|
||||
|
||||
def action_changes_pending_approval(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("document_page_approval.action_change_requests")
|
||||
action = action.read()[0]
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"document_page_approval.action_change_requests"
|
||||
)
|
||||
context = literal_eval(action["context"])
|
||||
context["search_default_page_id"] = self.id
|
||||
context["default_page_id"] = self.id
|
||||
|
Loading…
Reference in New Issue
Block a user