accountant_cn
This commit is contained in:
75
accountant_cn/static/src/js/dn_fr_line.xml
Normal file
75
accountant_cn/static/src/js/dn_fr_line.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
<t t-name="dn_financial_reports.DnFrLine">
|
||||
<!-- ==========================================================
|
||||
A journal-item detail row (ledger expansion).
|
||||
The date, entry number, label and partner share the first
|
||||
cell: they are one piece of information, and splitting them
|
||||
across columns would leave three near-empty columns on
|
||||
every other report.
|
||||
========================================================== -->
|
||||
<tr t-if="this.line.detail" data-id="line" t-att-class="this.classes()">
|
||||
<td data-id="line_name" class="line_name">
|
||||
<span class="text-muted me-2" t-out="this.line.detail.date"/>
|
||||
<span class="fw-semibold me-2" t-out="this.line.detail.move_name"/>
|
||||
<span t-out="this.line.detail.label"/>
|
||||
<span t-if="this.line.detail.partner" class="text-muted ms-2"
|
||||
t-out="'· ' + this.line.detail.partner"/>
|
||||
</td>
|
||||
<td data-id="line_cell" class="line_cell numeric text-end"
|
||||
t-out="this.detailValue('debit')"/>
|
||||
<td data-id="line_cell" class="line_cell numeric text-end line_cell_odd"
|
||||
t-out="this.detailValue('credit')"/>
|
||||
<td data-id="line_cell" class="line_cell numeric text-end"
|
||||
t-out="this.detailValue('cumulative')"/>
|
||||
</tr>
|
||||
|
||||
<!-- ==========================================================
|
||||
A summary / account row.
|
||||
========================================================== -->
|
||||
<tr t-else="" data-id="line" t-att-class="this.classes()">
|
||||
<!-- Name column. A foldable section keeps its arrow in a fixed
|
||||
20px box so that labels line up whether or not they can be
|
||||
unfolded; enterprise calls this `.btn_foldable` and the
|
||||
geometry below is identical. -->
|
||||
<td data-id="line_name"
|
||||
t-att-class="this.line.unfoldable ? 'line_name unfoldable' : 'line_name'"
|
||||
tabindex="-1"
|
||||
t-on-click="() => this.toggle()">
|
||||
|
||||
<i t-if="this.line.unfoldable"
|
||||
data-id="btn_foldable"
|
||||
class="btn btn_foldable oi"
|
||||
tabindex="-1"
|
||||
t-att-data-icon="this.props.unfolded ? 'arrow_drop_down' : 'arrow_right'"/>
|
||||
|
||||
<span t-if="this.line.showCode"
|
||||
class="text-muted me-2" t-out="this.line.code"/>
|
||||
|
||||
<a t-if="this.line.hasAction"
|
||||
class="clickable cursor-pointer"
|
||||
tabindex="-1"
|
||||
t-on-click="(ev) => this.runAction(ev)"
|
||||
t-out="this.line.label"/>
|
||||
<t t-else="" t-out="this.line.label"/>
|
||||
|
||||
<!-- Drill-down affordance, revealed on row hover exactly like
|
||||
the enterprise `.btn_action`. It is a hover-only button,
|
||||
not a permanent arrow, so an accountant reading a column
|
||||
of figures is not distracted by 300 icons. -->
|
||||
<button t-if="this.line.hasAction"
|
||||
data-id="btn_action"
|
||||
class="btn btn_action"
|
||||
tabindex="-1"
|
||||
t-att-title="this.props.labels.viewDetails"
|
||||
t-on-click="(ev) => this.runAction(ev)">
|
||||
<i class="fa fa-arrow-right"/>
|
||||
</button>
|
||||
</td>
|
||||
|
||||
<t t-foreach="this.line.cells" t-as="cell" t-key="cell.key">
|
||||
<DnFrLineCell cell="cell"/>
|
||||
</t>
|
||||
</tr>
|
||||
</t>
|
||||
</templates>
|
||||
Reference in New Issue
Block a user