mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 03:42:19 -06:00
[MIG] document_page_approval: Migration to 17.0
This commit is contained in:
committed by
Bhavesh Heliconia
parent
49f3835e45
commit
a4972a014d
@@ -19,7 +19,6 @@ class DocumentPage(models.Model):
|
||||
related="history_head.approved_date",
|
||||
store=True,
|
||||
index=True,
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
approved_uid = fields.Many2one(
|
||||
@@ -28,7 +27,6 @@ class DocumentPage(models.Model):
|
||||
related="history_head.approved_uid",
|
||||
store=True,
|
||||
index=True,
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
approval_required = fields.Boolean(
|
||||
@@ -137,8 +135,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.sudo().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
|
||||
|
||||
Reference in New Issue
Block a user