[IMP] document_page_approval: pre-commit auto fixes

This commit is contained in:
Bhavesh Heliconia 2025-02-17 16:50:26 +05:30
parent 116562d394
commit a53bc19077
3 changed files with 15 additions and 8 deletions

View File

@ -15,13 +15,19 @@
<field name="body_html" type="html"> <field name="body_html" type="html">
<p>Hello,</p> <p>Hello,</p>
<p><t t-out="object.create_uid.name" /> submited a new Change Request for <b <p><t t-out="object.create_uid.name" /> submited a new Change Request for <b
t-out="object.page_id.name" t-out="object.page_id.name"
/> and it needs your approval.</p> /> and it needs your approval.</p>
<h1> <h1>
<a t-att-href="object.page_url" t-out="object.display_name" /> <a t-att-href="object.page_url" t-out="object.display_name" />
</h1> </h1>
<p><b>Modified by:</b> <t t-out="object.create_uid.name" /></p> <p>
<p><b>Date:</b> <t t-out="object.create_date" /></p> <b>Modified by:</b>
<t t-out="object.create_uid.name" />
</p>
<p>
<b>Date:</b>
<t t-out="object.create_date" />
</p>
<t t-if="object.summary"> <t t-if="object.summary">
<h3>Summary</h3> <h3>Summary</h3>
<p t-out="object.summary" /> <p t-out="object.summary" />

View File

@ -151,8 +151,9 @@ class DocumentPageHistory(models.Model):
) )
page.page_url = ( page.page_url = (
"{}/web#db={}&id={}&" "model=document.page.history" f"{base_url}/web#db={self.env.cr.dbname}&id={page.id}&"
).format(base_url, self.env.cr.dbname, page.id) "model=document.page.history"
)
def _compute_diff(self): def _compute_diff(self):
"""Shows a diff between this version and the previous version""" """Shows a diff between this version and the previous version"""

View File

@ -133,7 +133,7 @@
invisible="not has_changes_pending_approval" invisible="not has_changes_pending_approval"
> >
This document has <b This document has <b
>Changes Pending Approval</b>. You are viewing the last approved content. >Changes Pending Approval</b>. You are viewing the last approved content.
</div> </div>
<div <div
class="alert alert-warning oe_edit_only" class="alert alert-warning oe_edit_only"
@ -142,7 +142,7 @@
invisible="not is_approval_required" invisible="not is_approval_required"
> >
This document requires approval. If edited, you will create a new <b This document requires approval. If edited, you will create a new <b
>Change Request</b>. >Change Request</b>.
</div> </div>
<div <div
class="alert alert-warning oe_edit_only" class="alert alert-warning oe_edit_only"