mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 03:42:19 -06:00
[MIG] document_page_approval: Migration to 18.0
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
|
||||
from odoo import fields, models
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tools.translate import _
|
||||
@@ -93,12 +94,14 @@ class DocumentPageHistory(models.Model):
|
||||
raise UserError(
|
||||
_(
|
||||
"You are not authorized to do this.\r\n"
|
||||
"Only approvers with these groups can approve this: "
|
||||
)
|
||||
% ", ".join(
|
||||
[g.display_name for g in rec.page_id.approver_group_ids]
|
||||
"Only approvers with these groups can approve this: {}"
|
||||
).format(
|
||||
", ".join(
|
||||
[g.display_name for g in rec.page_id.approver_group_ids]
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
# Update state
|
||||
rec.write(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user