[FIX] contract: Fix modifications layout

On the migration to v16, the primary layout view was incorrectly
removed. It's needed because of 2 reasons:

- It's referenced in the following template doing a t-call. Well, this
  one can be avoided calling the new layout upstream template, but...
- This layout is done for placing some extra content (the modifications
  table), as part of the layout that is not shown in the chatter for
  avoiding noise.

We recreate this template inheriting the new layout template, and
adapting it properly.

TT45646
This commit is contained in:
Pedro M. Baeza
2024-03-14 13:08:42 +01:00
committed by Christopher Rogos
parent 479abfb077
commit 70dadf7342
4 changed files with 14 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ Recurring - Contracts Management
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d05526882f94431ba595fd6ff8e8ffda579ca10ba44dee90e198a0738214edb5
!! source digest: sha256:8744b6d73ab2ec9d7de19b4a9292ba9e39b6ad5907b1b2fab2be4463c4b58a2f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png

View File

@@ -11,7 +11,7 @@
{
"name": "Recurring - Contracts Management",
"version": "16.0.2.3.0",
"version": "16.0.2.4.0",
"category": "Contract Management",
"license": "AGPL-3",
"author": "Tecnativa, ACSONE SA/NV, Odoo Community Association (OCA)",

View File

@@ -1,5 +1,14 @@
<?xml version="1.0" ?>
<odoo>
<template
id="mail_notification_contract"
inherit_id="mail.mail_notification_layout"
primary="True"
>
<xpath expr="//div[@t-out='message.body']" position="after">
<t t-raw="0" />
</xpath>
</template>
<template id="template_contract_modification" name="Contract Modification">
<t t-call="contract.mail_notification_contract">
<table border="1" align="center">
@@ -12,10 +21,10 @@
<tbody>
<t t-foreach="record.modification_ids" t-as="modification">
<tr t-if="not modification.sent">
<td name="td_date">
<td name="td_date" style="padding: 10px">
<span t-field="modification.date" />
</td>
<td name="td_description">
<td name="td_description" style="padding: 10px">
<div t-field="modification.description" />
</td>
</tr>

View File

@@ -366,7 +366,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d05526882f94431ba595fd6ff8e8ffda579ca10ba44dee90e198a0738214edb5
!! source digest: sha256:8744b6d73ab2ec9d7de19b4a9292ba9e39b6ad5907b1b2fab2be4463c4b58a2f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/contract/tree/16.0/contract"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/contract&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module enables contracts management with recurring