[FIX] sale,purchase,account: Duplicating document_tax_totals
If user would add addictional field in one of reports it could break other reports as other models do not share all the same fields. Now modules inherit template and create their version of field. task-2858097 closes odoo/odoo#106140 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -258,7 +258,7 @@
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="document_tax_totals">
|
||||
<template id="document_tax_totals_template">
|
||||
<!--
|
||||
Generic template to display tax totals in pdf reports.
|
||||
Used by invoices, SO and PO.
|
||||
@@ -299,6 +299,9 @@
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<!-- Allow edits (e.g. studio) without changing the often inherited base template -->
|
||||
<template id="document_tax_totals" inherit_id="account.document_tax_totals_template" primary="True"></template>
|
||||
|
||||
<template id="tax_groups_totals">
|
||||
<!--
|
||||
Generic template to display a list of tax groups with the related amounts.
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
<div class="col-4">
|
||||
<table class="table table-sm">
|
||||
<t t-set="tax_totals" t-value="o.tax_totals"/>
|
||||
<t t-call="account.document_tax_totals"/>
|
||||
<t t-call="purchase.document_tax_totals"/>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -135,4 +135,8 @@
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Allow edits (e.g. studio) without changing the often inherited base template -->
|
||||
<template id="document_tax_totals" inherit_id="account.document_tax_totals_template" primary="True"></template>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
<template id="purchase_order_portal_content_totals_table">
|
||||
<table class="table table-sm">
|
||||
<t t-set="tax_totals" t-value="order.tax_totals"/>
|
||||
<t t-call="account.document_tax_totals"/>
|
||||
<t t-call="purchase.document_tax_totals"/>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
<table class="table table-sm">
|
||||
<!-- Tax totals -->
|
||||
<t t-set="tax_totals" t-value="doc.tax_totals"/>
|
||||
<t t-call="account.document_tax_totals"/>
|
||||
<t t-call="sale.document_tax_totals"/>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,4 +200,7 @@
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Allow edits (e.g. studio) without changing the often inherited base template -->
|
||||
<template id="document_tax_totals" inherit_id="account.document_tax_totals_template" primary="True"></template>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -595,7 +595,7 @@
|
||||
<template id="sale_order_portal_content_totals_table">
|
||||
<table class="table table-sm">
|
||||
<t t-set="tax_totals" t-value="sale_order.tax_totals"/>
|
||||
<t t-call="account.document_tax_totals"/>
|
||||
<t t-call="sale.document_tax_totals"/>
|
||||
</table>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user