Initial commit: OCA Financial packages (186 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:04 +02:00
commit 3e0e8473fb
8757 changed files with 947473 additions and 0 deletions

View file

@ -0,0 +1,193 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 ForgeFlow, S.L. (https://www.forgeflow.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="activity_balance">
<p>
<span
t-out="get_title(o, is_detailed=is_detailed, account_type=account_type, starting_date=d['start'], ending_date=d['end'], currency=display_currency.name)"
/>
</p>
<table class="table table-condensed table-statement">
<thead>
<tr>
<th>Reference number</th>
<th>Date</th>
<th>Description</th>
<th class="amount">Original Amount</th>
<th class="amount">Applied Amount</th>
<th class="amount">Open Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td />
<td>
<span t-out="d['prior_day']" />
</td>
<td t-if="is_detailed" colspan="3">Initial Balance</td>
<td t-else="" colspan="3">Balance Forward</td>
<td class="amount">
<span
t-out="currency['balance_forward']"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
</tr>
<tr
t-foreach="currency['lines']"
t-as="line"
t-att-class="('statement-blocked ' if line['blocked'] else '') + ('statement-reconciled ' if line['reconciled_line'] else '') + ('statement-outside-date-rank' if line['outside-date-rank'] else '')"
>
<td>
<span
t-if="line['reconciled_line']"
style="padding-left: 11px;"
/><span t-out="line['move_id']" />
</td>
<td>
<span t-out="line['date']" />
</td>
<td>
<t t-if="line['name'] != '/'">
<t t-if="not line['ref'] and line['name']">
<span t-out="line['name']" />
</t>
<t t-if="line['ref'] and not line['name']">
<span t-out="line['ref']" />
</t>
<t t-if="line['ref'] and line['name']">
<t
t-if="line['name'] not in line['ref'] or line['name'] == line['ref']"
>
<span t-out="line['name']" />
</t>
<t t-if="line['ref'] not in line['name']">
<span t-out="line['ref']" />
</t>
</t>
</t>
<t t-if="line['name'] == '/'">
<span t-out="line['ref']" />
</t>
</td>
<td class="amount">
<span
t-out="line['amount']"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
t-if="not line['reconciled_line']"
/>
</td>
<td class="amount">
<span
t-out="line['applied_amount']"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="line['open_amount']"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
t-if="not line['reconciled_line']"
/>
</td>
</tr>
<tr>
<td />
<td>
<span t-out="d['end']" />
</td>
<td colspan="3">Ending Balance</td>
<td class="amount">
<span
t-out="currency['amount_due']"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
</tr>
</tbody>
</table>
</template>
<template id="partner_statement.activity_statement_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang': lang})" />
<t t-set="address">
<address
t-out="get_inv_addr(o)"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
/>
<div t-if="o.vat" class="mt16"><t
t-out="company.country_id.vat_label or 'Tax ID'"
/>: <span t-field="o.vat" /></div>
</t>
<div class="page">
<h2>Statement of Account</h2>
<div id="informations" class="row mt32 mb32">
<div class="col-3 bm-2">
<strong>Date:</strong>
<p t-out="d['today']" class="m-0" />
</div>
<div class="col-3 bm-2">
<strong>Partner Name:</strong>
<p t-field="o.name" class="m-0" />
</div>
<div t-if="o.ref" class="col-3 bm-2">
<strong>Partner Code:</strong>
<p t-field="o.ref" class="m-0" />
</div>
</div>
<t t-if="d['currencies']">
<br />
<t t-foreach="d['currencies'].items()" t-as="currency">
<t t-set="display_currency" t-value="Currencies[currency[0]]" />
<t t-set="currency" t-value="currency[1]" />
<t
t-call="partner_statement.activity_balance"
name="activity"
/>
<t
t-call="partner_statement.aging_buckets"
t-if="currency['buckets']"
/>
</t>
</t>
<p t-if="d.get('no_entries')">
<strong>The partner doesn't have due entries.</strong>
</p>
</div>
</t>
</template>
<template id="activity_statement">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-set="d" t-value="data.get(o.id)" />
<t
t-call="partner_statement.activity_statement_document"
t-lang="o.lang"
/>
</t>
</t>
</template>
<record id="action_print_activity_statement" model="ir.actions.report">
<field name="name">Activity Statement</field>
<field name="model">res.partner</field>
<field name="report_name">partner_statement.activity_statement</field>
<field name="report_type">qweb-pdf</field>
<field name="report_file">partner_statement.activity_statement</field>
</record>
<record id="action_print_activity_statement_html" model="ir.actions.report">
<field name="name">Activity Statement</field>
<field name="model">res.partner</field>
<field name="report_name">partner_statement.activity_statement</field>
<field name="report_type">qweb-html</field>
<field name="report_file">partner_statement.activity_statement</field>
</record>
<record id="action_print_activity_statement_xlsx" model="ir.actions.report">
<field name="name">Activity Statement XLSX</field>
<field name="model">res.partner</field>
<field name="type">ir.actions.report</field>
<field name="report_name">p_s.report_activity_statement_xlsx</field>
<field name="report_type">xlsx</field>
<field name="report_file">report_activity_statement</field>
</record>
</odoo>

View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 ForgeFlow, S.L. (https://www.forgeflow.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="aging_buckets">
<p>
<span
t-out="get_aging_buckets_title(o, ending_date=d['end'], currency=display_currency.name)"
/>
</p>
<table class="table table-sm table-statement">
<thead>
<tr>
<t t-foreach="bucket_labels" t-as="bl">
<th class="amount">
<span t-out="bl" />
</th>
</t>
</tr>
</thead>
<t t-set="buckets" t-value="currency['buckets']" />
<tbody>
<tr>
<td class="amount">
<span
t-out="buckets.get('current', 0.0)"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="buckets.get('b_1_30', 0.0)"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="buckets.get('b_30_60', 0.0)"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="buckets.get('b_60_90', 0.0)"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="buckets.get('b_90_120', 0.0)"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="buckets.get('b_over_120', 0.0)"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="buckets.get('balance', 0.0)"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
</tr>
</tbody>
</table>
</template>
</odoo>

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2022 ForgeFlow, S.L. (https://www.forgeflow.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="detailed_activity_statement_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang': lang})" />
<t t-set="address">
<address
t-out="get_inv_addr(o)"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
/>
<div t-if="o.vat" class="mt16"><t
t-out="company.country_id.vat_label or 'Tax ID'"
/>: <span t-field="o.vat" /></div>
</t>
<div class="page">
<h2>Statement of Account</h2>
<div id="informations" class="row mt32 mb32">
<div class="col-3 bm-2">
<strong>Date:</strong>
<p t-out="d['today']" class="m-0" />
</div>
<div class="col-3 bm-2">
<strong>Partner Name:</strong>
<p t-field="o.name" class="m-0" />
</div>
<div t-if="o.ref" class="col-3 bm-2">
<strong>Partner Code:</strong>
<p t-field="o.ref" class="m-0" />
</div>
</div>
<t t-if="d['currencies']">
<br />
<t t-foreach="d['currencies'].items()" t-as="currency">
<t t-set="display_currency" t-value="Currencies[currency[0]]" />
<t t-set="currency" t-value="currency[1]" />
<t t-set="line_type" t-value="'prior_lines'" />
<t
t-set="ending_amount"
t-value="currency['balance_forward']"
/>
<t t-set="ending_date" t-value="d['prior_day']" />
<t
t-call="partner_statement.outstanding_balance"
name="prior_balance"
/>
<t
t-call="partner_statement.activity_balance"
name="detailed_activity"
/>
<t t-set="line_type" t-value="'ending_lines'" />
<t t-set="ending_amount" t-value="currency['amount_due']" />
<t t-set="ending_date" t-value="d['end']" />
<t
t-call="partner_statement.outstanding_balance"
name="ending_balance"
/>
<t
t-call="partner_statement.aging_buckets"
t-if="currency['buckets']"
/>
</t>
</t>
<p t-if="d.get('no_entries')">
<strong>The partner doesn't have due entries.</strong>
</p>
</div>
</t>
</template>
<template id="detailed_activity_statement">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-set="d" t-value="data.get(o.id)" />
<t
t-call="partner_statement.detailed_activity_statement_document"
t-lang="o.lang"
/>
</t>
</t>
</template>
<record id="action_print_detailed_activity_statement" model="ir.actions.report">
<field name="name">Detailed Activity Statement</field>
<field name="model">res.partner</field>
<field name="report_name">partner_statement.detailed_activity_statement</field>
<field name="report_type">qweb-pdf</field>
<field name="report_file">partner_statement.detailed_activity_statement</field>
</record>
<record
id="action_print_detailed_activity_statement_html"
model="ir.actions.report"
>
<field name="name">Detailed Activity Statement</field>
<field name="model">res.partner</field>
<field name="report_name">partner_statement.detailed_activity_statement</field>
<field name="report_type">qweb-html</field>
<field name="report_file">partner_statement.detailed_activity_statement</field>
</record>
<record
id="action_print_detailed_activity_statement_xlsx"
model="ir.actions.report"
>
<field name="name">Detailed Activity Statement XLSX</field>
<field name="model">res.partner</field>
<field name="type">ir.actions.report</field>
<field name="report_name">p_s.report_detailed_activity_statement_xlsx</field>
<field name="report_type">xlsx</field>
<field name="report_file">report_detailed_activity_statement</field>
</record>
</odoo>

View file

@ -0,0 +1,182 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 ForgeFlow, S.L. (https://www.forgeflow.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="outstanding_balance">
<p>
<span
t-out="get_title(o, account_type=account_type, line_type=line_type, ending_date=ending_date, currency=display_currency.name)"
/>
</p>
<table class="table table-sm table-statement">
<thead>
<tr>
<th>Reference number</th>
<th>Date</th>
<th>Due Date</th>
<th>Description</th>
<th class="amount">Original</th>
<th class="amount">Open Amount</th>
<th class="amount">Balance</th>
</tr>
</thead>
<tbody>
<tr
t-foreach="currency[line_type]"
t-as="line"
t-att-class="'statement-blocked' if line['blocked'] else ''"
>
<td>
<span t-out="line['move_id']" />
</td>
<td>
<span t-out="line['date']" />
</td>
<td>
<span t-out="line['date_maturity']" />
</td>
<td>
<t t-if="line['name'] != '/'">
<t t-if="not line['ref']">
<span t-out="line['name']" />
</t>
<t t-if="line['ref'] and not line['name']">
<span t-out="line['ref']" />
</t>
<t t-if="line['ref'] and line['name']">
<t
t-if="line['name'] not in line['ref'] or line['name'] == line['ref']"
>
<span t-out="line['name']" />
</t>
<t t-if="line['ref'] not in line['name']">
<span t-out="line['ref']" />
</t>
</t>
</t>
<t t-if="line['name'] == '/'">
<span t-out="line['ref']" />
</t>
</td>
<td class="amount">
<span
t-out="line['amount']"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="line['open_amount']"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
<td class="amount">
<span
t-out="line['balance']"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
</tr>
<tr>
<td />
<td>
<span t-out="ending_date" />
</td>
<td colspan="4">Ending Balance</td>
<td class="amount">
<span
t-out="ending_amount"
t-options="{'widget': 'monetary', 'display_currency': display_currency}"
/>
</td>
</tr>
</tbody>
</table>
</template>
<template id="partner_statement.outstanding_statement_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang': lang})" />
<t t-set="address">
<address
t-out="get_inv_addr(o)"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
/>
<div t-if="o.vat" class="mt16"><t
t-out="company.country_id.vat_label or 'Tax ID'"
/>: <span t-field="o.vat" /></div>
</t>
<div class="page">
<div class="oe_structure" />
<h2>Statement of Account</h2>
<div id="informations" class="row mt32 mb32">
<div class="col-3 bm-2">
<strong>Date:</strong>
<p t-out="d['today']" class="m-0" />
</div>
<div class="col-3 bm-2">
<strong>Partner Name:</strong>
<p t-field="o.name" class="m-0" />
</div>
<div t-if="o.ref" class="col-3 bm-2">
<strong>Partner Code:</strong>
<p t-field="o.ref" class="m-0" />
</div>
</div>
<t t-if="d['currencies']">
<br />
<t t-foreach="d['currencies'].items()" t-as="currency">
<t t-set="display_currency" t-value="Currencies[currency[0]]" />
<t t-set="currency" t-value="currency[1]" />
<t t-set="line_type" t-value="'lines'" />
<t t-set="ending_amount" t-value="currency['amount_due']" />
<t t-set="ending_date" t-value="d['end']" />
<t
t-call="partner_statement.outstanding_balance"
name="outstanding"
/>
<t
t-call="partner_statement.aging_buckets"
t-if="currency['buckets']"
/>
</t>
</t>
<p t-if="d.get('no_entries')">
<strong>The partner doesn't have due entries.</strong>
</p>
</div>
</t>
</template>
<template id="outstanding_statement">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-set="d" t-value="data.get(o.id)" />
<t
t-call="partner_statement.outstanding_statement_document"
t-lang="o.lang"
/>
</t>
</t>
</template>
<record id="action_print_outstanding_statement" model="ir.actions.report">
<field name="name">Outstanding Statement</field>
<field name="model">res.partner</field>
<field name="report_name">partner_statement.outstanding_statement</field>
<field name="report_type">qweb-pdf</field>
<field name="report_file">partner_statement.outstanding_statement</field>
</record>
<record id="action_print_outstanding_statement_html" model="ir.actions.report">
<field name="name">Outstanding Statement</field>
<field name="model">res.partner</field>
<field name="report_name">partner_statement.outstanding_statement</field>
<field name="report_type">qweb-html</field>
<field name="report_file">partner_statement.outstanding_statement</field>
</record>
<record id="action_print_outstanding_statement_xlsx" model="ir.actions.report">
<field name="name">Outstanding Statement XLSX</field>
<field name="model">res.partner</field>
<field name="type">ir.actions.report</field>
<field name="report_name">p_s.report_outstanding_statement_xlsx</field>
<field name="report_type">xlsx</field>
<field name="report_file">report_outstanding_statement</field>
</record>
</odoo>

View file

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form (in partner_statement)</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="40" />
<field name="inherit_id" ref="account.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath
expr="//div[@name='main_currency_setting_container']"
position="after"
>
<h2>Partner Statements</h2>
<div class="row mt16 o_settings_container" name="partner_statement">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_activity_statement" />
</div>
<div class="o_setting_right_pane">
<label for="group_activity_statement" />
<div class="text-muted">
Activity Statements show all transactions between two dates.
</div>
<div
class="content-group"
attrs="{'invisible': [('group_activity_statement', '=', False), ('group_outstanding_statement', '=', False)]}"
>
<div class="row mt16">
<label
for="default_aging_type"
class="col-lg-3 o_light_label"
/>
<field name="default_aging_type" />
</div>
<div>
<field
name="default_show_aging_buckets"
class="oe_inline"
/>
<label
for="default_show_aging_buckets"
class="o_light_label"
/>
</div>
<div>
<field
name="default_filter_partners_non_due"
class="oe_inline"
/>
<label
for="default_filter_partners_non_due"
class="o_light_label"
/>
</div>
<div>
<field
name="default_filter_negative_balances"
class="oe_inline"
/>
<label
for="default_filter_negative_balances"
class="o_light_label"
/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_outstanding_statement" />
</div>
<div class="o_setting_right_pane">
<label for="group_outstanding_statement" />
<div class="text-muted">
Outstanding Statements show all transactions up to a date.
</div>
<div
class="text-muted"
attrs="{'invisible': [('group_outstanding_statement', '=', False)]}"
>
Please set defaults under Activity Statements.
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>