Skip to content

Commit

Permalink
[IMP]commission: Report footer outside the table
Browse files Browse the repository at this point in the history
Place footer outside the table so that it
won't be repeated at each page

[LINT]use pre commit

Revert bad linting

[DEL]commission: useless clearfix

Useless clearfix in XML reporting
  • Loading branch information
flotho authored and sergio-teruel committed Sep 26, 2024
1 parent 3b66418 commit b0c511b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
6 changes: 0 additions & 6 deletions account_commission/views/report_settlement_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,5 @@
</td>
</t>
</xpath>
<xpath expr="//table/tfoot/tr/td" position="before">
<t t-if="o.settlement_type == 'sale_invoice'">
<td />
<td />
</t>
</xpath>
</template>
</odoo>
38 changes: 24 additions & 14 deletions commission/reports/report_settlement_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,31 @@
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td />
<td class="text-end">
<strong>Total</strong>
</td>
<td class="text-end">
<span
t-field="o.total"
t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"
/>
</td>
</tr>
</tfoot>
</table>
<div class="mb-4">
<div id="total" class="row">
<div
t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ms-auto"
>
<table
class="table table-sm table-borderless"
style="page-break-inside: avoid;"
>
<tr class="border-black o_total">
<td>
<strong>Total</strong>
</td>
<td class="text-end">
<span
t-field="o.total"
t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"
/>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</t>
Expand Down

0 comments on commit b0c511b

Please sign in to comment.