[MIG] document_page_approval: Migration to 14.0

This commit is contained in:
Jeroen Vet 2021-02-23 16:48:02 +08:00 committed by Laurence Lars Labusch
parent a6db017bde
commit 25cf10aad2
No known key found for this signature in database
GPG Key ID: 3B1EDFC4A8180B85
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
{ {
"name": "Document Page Approval", "name": "Document Page Approval",
"version": "13.0.1.0.0", "version": "14.0.1.0.0",
"author": "Savoir-faire Linux, Odoo Community Association (OCA)", "author": "Savoir-faire Linux, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/knowledge", "website": "https://github.com/OCA/knowledge",
"license": "AGPL-3", "license": "AGPL-3",

View File

@ -110,13 +110,13 @@ class DocumentPageHistory(models.Model):
rec.page_id._compute_history_head() rec.page_id._compute_history_head()
# Notify state change # Notify state change
rec.message_post( rec.message_post(
subtype="mt_comment", subtype_xmlid="mail.mt_comment",
body=_("Change request has been approved by %s.") body=_("Change request has been approved by %s.")
% (self.env.user.name), % (self.env.user.name),
) )
# Notify followers a new version is available # Notify followers a new version is available
rec.page_id.message_post( rec.page_id.message_post(
subtype="mt_comment", subtype_xmlid="mail.mt_comment",
body=_("New version of the document %s approved.") % (rec.page_id.name), body=_("New version of the document %s approved.") % (rec.page_id.name),
) )
@ -125,7 +125,7 @@ class DocumentPageHistory(models.Model):
self.write({"state": "cancelled"}) self.write({"state": "cancelled"})
for rec in self: for rec in self:
rec.message_post( rec.message_post(
subtype="mt_comment", subtype_xmlid="mail.mt_comment",
body=_("Change request <b>%s</b> has been cancelled by %s.") body=_("Change request <b>%s</b> has been cancelled by %s.")
% (rec.display_name, self.env.user.name), % (rec.display_name, self.env.user.name),
) )