feat(fusion_accounting_assets): depreciation_board component
Made-with: Cursor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': 'Fusion Accounting Assets',
|
||||
'version': '19.0.1.0.23',
|
||||
'version': '19.0.1.0.24',
|
||||
'category': 'Accounting/Accounting',
|
||||
'summary': 'AI-augmented asset management with depreciation schedules.',
|
||||
'description': """
|
||||
@@ -48,6 +48,8 @@ menu hides; the engine + AI tools remain available for the chat.
|
||||
'fusion_accounting_assets/static/src/components/asset_card/asset_card.xml',
|
||||
'fusion_accounting_assets/static/src/components/asset_detail_panel/asset_detail_panel.js',
|
||||
'fusion_accounting_assets/static/src/components/asset_detail_panel/asset_detail_panel.xml',
|
||||
'fusion_accounting_assets/static/src/components/depreciation_board/depreciation_board.js',
|
||||
'fusion_accounting_assets/static/src/components/depreciation_board/depreciation_board.xml',
|
||||
],
|
||||
},
|
||||
'installable': True,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class DepreciationBoard extends Component {
|
||||
static template = "fusion_accounting_assets.DepreciationBoard";
|
||||
static props = {
|
||||
lines: { type: Array },
|
||||
formatCurrency: { type: Function },
|
||||
};
|
||||
|
||||
rowClass(line) {
|
||||
if (line.is_posted) return "posted";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="fusion_accounting_assets.DepreciationBoard">
|
||||
<div class="o_fusion_assets_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Date</th>
|
||||
<th class="text-end">Amount</th>
|
||||
<th class="text-end">Accumulated</th>
|
||||
<th class="text-end">Book Value</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="props.lines" t-as="line" t-key="line.id"
|
||||
t-att-class="rowClass(line)">
|
||||
<td><t t-esc="line.period_index + 1"/></td>
|
||||
<td><t t-esc="line.scheduled_date"/></td>
|
||||
<td class="text-end">$<t t-esc="props.formatCurrency(line.amount)"/></td>
|
||||
<td class="text-end">$<t t-esc="props.formatCurrency(line.accumulated)"/></td>
|
||||
<td class="text-end">$<t t-esc="props.formatCurrency(line.book_value_at_end)"/></td>
|
||||
<td>
|
||||
<t t-if="line.is_posted">Posted</t>
|
||||
<t t-else="">Pending</t>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Reference in New Issue
Block a user