2
0

[IMP] account_move_print: Adjust report_journal_entries

This commit is contained in:
Héctor Villarreal Ortega 2022-03-18 10:57:17 +01:00 committed by David Ramia
parent 6575f3f19f
commit 30aebb773d

View File

@ -1,15 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="journal_entries_report_id">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<template id="report_journal_entry_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context(lang=lang)" />
<div class="page">
<div>
<h2>
<span t-field="o.name" />
</h2>
</div>
<h2><span t-field="o.name" /></h2>
<div id="information" class="row mt32 mb32">
<div class="col-auto mw-100 mb-2" name="date">
<strong>Accounting Date:</strong>
@ -43,21 +38,11 @@
<t t-set="total_debit" t-value="0.0" />
<t t-set="total_credit" t-value="0.0" />
<div class="row">
<table
name='lines_content'
width="100%"
class="table table-sm o_main_table"
>
<table name='lines_content' class="table table-sm o_main_table">
<thead>
<tr>
<th
name="th_account"
class="text-left"
>Account</th>
<th
name="th_partner"
class="text-left"
>Partner</th>
<th name="th_account" class="text-left">Account</th>
<th name="th_partner" class="text-left">Partner</th>
<th name="th_label" class="text-left">Label</th>
<th
name="th_analytic_account"
@ -70,18 +55,12 @@
groups="base.group_multi_currency"
>Amount in Currency</th>
<th name="th_debit" class="text-left">Debit</th>
<th
name="th_credit"
class="text-left"
>Credit</th>
<th name="th_credit" class="text-left">Credit</th>
<th
name="th_tax_id"
class="text-left"
>Originator Tax</th>
<th
name="th_tax_ids"
class="text-left"
>Taxes</th>
<th name="th_tax_ids" class="text-left">Taxes</th>
</tr>
</thead>
<tbody>
@ -96,9 +75,7 @@
/>
<tr>
<td name='tb_account'>
<span
t-field="line.account_id.display_name"
/>
<span t-field="line.account_id.display_name" />
</td>
<td name='tb_partner'>
<span t-field="line.partner_id.name" />
@ -110,9 +87,7 @@
name='tb_analytic'
groups="analytic.group_analytic_accounting"
>
<span
t-field="line.analytic_account_id.name"
/>
<span t-field="line.analytic_account_id.name" />
</td>
<td
name='tb_amount_currency'
@ -138,14 +113,18 @@
/>
</td>
<td name='tb_originator_tax'>
<span t-esc="line.tax_line_id.name" />
<span
class="text-nowrap"
t-esc="line.tax_line_id.name"
/>
</td>
<td name='tb_taxes'>
<tr t-foreach="line.tax_ids" t-as="tax">
<td>
<span t-field="tax.name" />,
</td>
</tr>
<td
t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
>
<span
t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))"
id="line_tax_ids"
/>
</td>
</tr>
</t>
@ -183,15 +162,26 @@
</div>
</div>
</t>
</template>
<template id="report_journal_entries">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t
t-call="account_move_print.report_journal_entry_document"
t-lang="o.user_id.lang"
/>
</t>
</t>
</template>
<report
id="journal_entries_move_print_id"
model="account.move"
string="Journal Entries"
report_type="qweb-pdf"
name="account_move_print.journal_entries_report_id"
file="account_move_print.journal_entries_report_id"
/>
<record id="action_report_journal_entries" model="ir.actions.report">
<field name="name">Journal Entries</field>
<field name="model">account.move</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">account_move_print.report_journal_entries</field>
<field name="report_file">account_move_print.report_journal_entries</field>
<field name="binding_model_id" ref="account.model_account_move" />
<field name="binding_view_types">list,form</field>
</record>
</odoo>