Initial commit
This commit is contained in:
103
Fusion Accounting/views/account_account_views.xml
Normal file
103
Fusion Accounting/views/account_account_views.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<odoo>
|
||||
<record id="account_tag_action" model="ir.actions.act_window">
|
||||
<field name="name">Account Tags</field>
|
||||
<field name="res_model">account.account.tag</field>
|
||||
<field name="search_view_id" ref="account.account_tag_view_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Add a new tag
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_group_tree" model="ir.actions.act_window">
|
||||
<field name="name">Account Groups</field>
|
||||
<field name="res_model">account.group</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="account.view_account_group_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new account group
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_form" model="ir.ui.view">
|
||||
<field name="name">account.account.form</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="inherit_id" ref="account.view_account_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="currency_id" position="after">
|
||||
<label for="reconcile"
|
||||
invisible="account_type in ('asset_cash', 'liability_credit_card', 'off_balance')"/>
|
||||
<div invisible="account_type in ('asset_cash', 'liability_credit_card', 'off_balance')">
|
||||
<field name="reconcile"/>
|
||||
<button name="action_open_reconcile" class="oe_link" type="object" string=" -> Reconcile"
|
||||
invisible="not reconcile"/>
|
||||
</div>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_account_form" model="ir.ui.view">
|
||||
<field name="name">account.account.reports.form</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="inherit_id" ref="account.view_account_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="currency_id" position="before">
|
||||
<field name="non_trade" invisible="account_type not in ('liability_payable', 'asset_receivable')"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<!-- ------------->
|
||||
<!-- <record id="view_move_line_tree" model="ir.ui.view">-->
|
||||
<!-- <field name="name">account.move.line.list</field>-->
|
||||
<!-- <field name="model">account.move.line</field>-->
|
||||
<!-- <field name="inherit_id" ref="fusion_accounting.view_move_line_tree"/>-->
|
||||
<!-- <field name="mode">extension</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//header" position="inside">-->
|
||||
<!-- <button name="turn_as_asset" type="object" string="Create Asset" groups="account.group_account_user"-->
|
||||
<!-- data-hotkey="c"/>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="view_account_form_asset_inherit" model="ir.ui.view">
|
||||
<field name="name">account.account.form</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="inherit_id" ref="account.view_account_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='accounting']" position="after">
|
||||
<page string="Automation" name="page_automation" invisible="not can_create_asset">
|
||||
<group>
|
||||
<group>
|
||||
<field name="can_create_asset" invisible="1"/>
|
||||
<field name="form_view_ref" invisible="1"/>
|
||||
<td class="o_td_label">
|
||||
<label for="create_asset" string="Automate Asset"/>
|
||||
</td>
|
||||
<field name="create_asset" invisible="not can_create_asset" nolabel="1" widget="radio"/>
|
||||
<field name="multiple_assets_per_line" string="Manage Items"
|
||||
invisible="not can_create_asset or create_asset == 'no'"/>
|
||||
<field name="asset_model_ids"
|
||||
widget="many2many_tags"
|
||||
domain="[('state', '=', 'model')]"
|
||||
invisible="context.get('hide_model_on_account') or (create_asset == 'no' or not can_create_asset)"
|
||||
required="create_asset == 'validate' and can_create_asset"
|
||||
context="{
|
||||
'default_state': 'model',
|
||||
'form_view_ref': form_view_ref,
|
||||
'default_account_depreciation_id': id,
|
||||
}"
|
||||
string="Asset Model"
|
||||
options="{'no_quick_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
42
Fusion Accounting/views/account_activity.xml
Normal file
42
Fusion Accounting/views/account_activity.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<record id="view_move_form_vat_return" model="ir.ui.view">
|
||||
<field name="name">account.move.form.vat.return</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="after">
|
||||
<field name="tax_closing_report_id" invisible="1"/>
|
||||
|
||||
<div class="alert alert-info text-center" invisible="not tax_closing_report_id or state != 'draft'" role="alert">
|
||||
Proposition of tax closing journal entry.
|
||||
<button class="btn btn-link p-0 align-baseline" string="-> Refresh" name="refresh_tax_entry" type="object" groups="account.group_account_invoice"/>
|
||||
</div>
|
||||
<field name="tax_closing_alert" invisible="1"/>
|
||||
<div class="alert alert-info text-center" invisible="not tax_closing_alert" role="alert">
|
||||
This tax closing entry is posted, but the tax lock date is earlier than the covered period's last day. You might need to reset it to draft and refresh its content, in case other entries using taxes have been posted in the meantime.
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('oe_button_box')]/button" position="before">
|
||||
<button
|
||||
name="action_open_tax_report"
|
||||
class="oe_stat_button"
|
||||
icon="fa-book"
|
||||
type="object"
|
||||
string="Tax Report"
|
||||
invisible="not tax_closing_report_id"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='line_ids']//list//field[@name='tax_ids']" position="attributes">
|
||||
<attribute name="column_invisible">parent.tax_closing_report_id</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='line_ids']//list//field[@name='tax_tag_ids']" position="attributes">
|
||||
<attribute name="column_invisible">parent.tax_closing_report_id</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='line_ids']//form//field[@name='tax_ids']" position="attributes">
|
||||
<attribute name="invisible">parent.tax_closing_report_id</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
47
Fusion Accounting/views/account_asset_group_views.xml
Normal file
47
Fusion Accounting/views/account_asset_group_views.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="asset_group_form_view" model="ir.ui.view">
|
||||
<field name="name">account.asset.group.form</field>
|
||||
<field name="model">account.asset.group</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Asset Group">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_open_linked_assets"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-bars"
|
||||
invisible="count_linked_assets == 0">
|
||||
<field string="Asset(s)" name="count_linked_assets" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="Asset Group"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="asset_group_list_view" model="ir.ui.view">
|
||||
<field name="name">account.asset.group.list</field>
|
||||
<field name="model">account.asset.group</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Asset Group">
|
||||
<field name="name"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
515
Fusion Accounting/views/account_asset_views.xml
Normal file
515
Fusion Accounting/views/account_asset_views.xml
Normal file
@@ -0,0 +1,515 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="view_account_asset_form">
|
||||
<field name="name">account.asset.form</field>
|
||||
<field name="model">account.asset</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Asset">
|
||||
<field name="company_id" invisible="1" readonly="state != 'draft'"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="account_type" invisible="1"/>
|
||||
<field name="account_asset_id" invisible="1" readonly="state == 'close'"/>
|
||||
<field name="display_account_asset_id" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="total_depreciation_entries_count" invisible="1"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<header>
|
||||
<button name="validate" invisible="state != 'draft'" string="Confirm" type="object" class="oe_highlight" data-hotkey="q"/>
|
||||
<button type="object" name="compute_depreciation_board" string="Compute Depreciation" invisible="state != 'draft'" data-hotkey="d"/>
|
||||
<button name="set_to_draft" string="Set to Draft" type="object" invisible="depreciation_move_ids or state not in ['open', 'cancelled']"/>
|
||||
<button name="set_to_running" string="Set to Running" type="object" invisible="state != 'close'"/>
|
||||
<button name="resume_after_pause" string="Resume Depreciation" type="object" class="oe_highlight" invisible="state != 'paused'"/>
|
||||
<button name="action_asset_modify" invisible="state != 'open'" string="Modify Depreciation" type="object" data-hotkey="e" class="oe_highlight"/>
|
||||
<button name="action_save_model" invisible="state not in ('open', 'paused', 'close')" string="Save as Model" type="object" data-hotkey="m"/>
|
||||
<button name="set_to_cancelled" string="Cancel Asset" type="object" invisible="state != 'open'" data-hotkey="x"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,open" invisible="state == 'model'"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box" invisible="state == 'model'">
|
||||
<button name="action_open_linked_assets"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-id-card-o"
|
||||
invisible="count_linked_asset == 0 or warning_count_assets">
|
||||
<field string="Asset(s)" name="count_linked_asset" widget="statinfo"/>
|
||||
</button>
|
||||
<button name="action_open_linked_assets"
|
||||
type="object"
|
||||
class="oe_stat_button text-danger"
|
||||
icon="fa-id-card-o"
|
||||
invisible="count_linked_asset == 0 or not warning_count_assets">
|
||||
<field string="Asset(s)" name="count_linked_asset" widget="statinfo"/>
|
||||
</button>
|
||||
<button class="oe_stat_button" name="open_entries" type="object" icon="fa-bars" data-hotkey="p">
|
||||
<field string="Posted Entries" name="depreciation_entries_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="open_increase" type="object" icon="fa-chevron-circle-up" invisible="gross_increase_count == 0">
|
||||
<field string="Gross Increase" name="gross_increase_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" string="Parent Asset" name="open_parent_id" type="object" icon="fa-bars" invisible ="not parent_id"/>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" name="name_label" invisible="state == 'model'"/>
|
||||
<label for="name" name="model_name_label" string="Asset Model name" invisible="state != 'model'"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. Laptop iBook" required="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group invisible="state != 'model'">
|
||||
<group string="Depreciation Method">
|
||||
<field name="method" required="1" readonly="state not in ['draft', 'model']" />
|
||||
<field name="method_progress_factor" widget="percentage" invisible="method == 'linear'" readonly="state not in ['draft', 'model']" required="method in ('degressive', 'degressive_then_linear')"/>
|
||||
<label for="method_number" string="Duration"/>
|
||||
<div class="o_row">
|
||||
<field name="method_number" required="1" readonly="state not in ['draft', 'model']"/>
|
||||
<field name="method_period" required="1" readonly="state not in ['draft', 'model']" nolabel="1"/>
|
||||
</div>
|
||||
<field name="prorata_computation_type" readonly="state not in ['draft', 'model']"/>
|
||||
<label for="salvage_value_pct"/>
|
||||
<div>
|
||||
<field name="salvage_value_pct" widget="percentage" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Accounting">
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company" readonly="state != 'draft'"/>
|
||||
<field
|
||||
name="account_asset_id"
|
||||
domain="[
|
||||
('company_ids', 'parent_of', company_id),
|
||||
('account_type', 'in', (
|
||||
'asset_fixed',
|
||||
'asset_non_current',
|
||||
'asset_current')
|
||||
),
|
||||
]"
|
||||
context="{
|
||||
'default_account_type': 'asset_fixed',
|
||||
'hide_model_on_account': state == 'model' and not id,
|
||||
'account_type_domain': [('account_type', 'in', (
|
||||
'asset_fixed',
|
||||
'asset_non_current'))]}"
|
||||
groups="base.group_no_one"
|
||||
invisible="not display_account_asset_id"
|
||||
readonly="state == 'close'"/>
|
||||
<field
|
||||
name="account_depreciation_id"
|
||||
domain="[
|
||||
('company_ids', 'parent_of', company_id),
|
||||
('account_type', 'in', (
|
||||
'asset_fixed',
|
||||
'asset_non_current',
|
||||
'asset_current')
|
||||
),
|
||||
]"
|
||||
context="{
|
||||
'default_account_type': 'asset_non_current',
|
||||
'hide_model_on_account': state == 'model' and not id,
|
||||
'account_type_domain': [('account_type', 'in', (
|
||||
'asset_fixed',
|
||||
'asset_non_current'))]}"
|
||||
required="1"
|
||||
readonly="state == 'close'"/>
|
||||
<field
|
||||
name="account_depreciation_expense_id"
|
||||
domain="[
|
||||
('company_ids', 'parent_of', company_id),
|
||||
('account_type', 'in', (
|
||||
'expense_depreciation',
|
||||
'expense')
|
||||
),
|
||||
]"
|
||||
context="{
|
||||
'default_account_type': 'expense_depreciation',
|
||||
'default_tax_ids': [],
|
||||
'hide_model_on_account': state == 'model' and not id,
|
||||
'account_type_domain': [('account_type', 'in', (
|
||||
'expense_depreciation',
|
||||
'expense'))]}"
|
||||
required="1"
|
||||
readonly="state == 'close'"/>
|
||||
<field name="journal_id" required="1" readonly="state not in ['draft', 'model']"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4" invisible="state == 'model'">
|
||||
<page string="Asset" name="main_page">
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="asset_properties" columns="2"/>
|
||||
<group string="Asset Values" invisible="state == 'model'" name="asset_values">
|
||||
<field name="original_value" widget="monetary" options="{'currency_field': 'currency_id'}" invisible="state == 'model'" readonly="state != 'draft'"/>
|
||||
<field name="gross_increase_value" widget="monetary" invisible="state == 'model' or gross_increase_value == 0" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="acquisition_date" invisible="state == 'model'" readonly="state != 'draft'"/>
|
||||
<field name="model_id"
|
||||
string="Asset Model"
|
||||
domain="[('state', '=', 'model')]"
|
||||
options="{'no_quick_create': True}"
|
||||
context="{
|
||||
'default_state': 'model',
|
||||
'default_account_asset_id': account_asset_id,
|
||||
'default_account_depreciation_id': account_depreciation_id,
|
||||
'default_account_depreciation_expense_id': account_depreciation_expense_id
|
||||
}" readonly="state != 'draft'"/>
|
||||
<field name="asset_group_id"/>
|
||||
</group>
|
||||
<group string="Current Values" invisible="state == 'model'" name="current_values">
|
||||
<field name="salvage_value" widget="monetary" options="{'currency_field': 'currency_id'}" readonly="state != 'draft'"/>
|
||||
<label for="book_value"/>
|
||||
<span>
|
||||
<field name="book_value" class="oe_inline" widget="monetary" required="1" invisible="state == 'model'" options="{'currency_field': 'currency_id'}"/>
|
||||
<span invisible="salvage_value == 0">
|
||||
(incl.
|
||||
<field name="value_residual" nolabel="1" force_save="1" widget="monetary" invisible="state == 'model'" options="{'currency_field': 'currency_id'}"/>
|
||||
depreciable)
|
||||
</span>
|
||||
</span>
|
||||
</group>
|
||||
<group string="Depreciation Method">
|
||||
<field name="method" required="1" readonly="state not in ['draft', 'model']" />
|
||||
<field name="method_progress_factor" widget="percentage" invisible="method == 'linear'" readonly="state not in ['draft', 'model']" required="method in ('degressive', 'degressive_then_linear')"/>
|
||||
<label for="method_number" string="Duration"/>
|
||||
<div class="o_row">
|
||||
<field name="method_number" required="1" readonly="state not in ['draft', 'model']" class="oe_inline"/>
|
||||
<field name="method_period" required="1" readonly="state not in ['draft', 'model']" nolabel="1"/>
|
||||
</div>
|
||||
<field name="prorata_computation_type" readonly="state not in ['draft', 'model']"/>
|
||||
<field name="prorata_date" invisible="prorata_computation_type == 'none'" readonly="state != 'draft'"/>
|
||||
</group>
|
||||
<group string="Accounting">
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company" readonly="state != 'draft'"/>
|
||||
<field
|
||||
name="account_asset_id"
|
||||
domain="[
|
||||
('company_ids', 'parent_of', company_id),
|
||||
('account_type', 'in', (
|
||||
'asset_fixed',
|
||||
'asset_non_current',
|
||||
'asset_current')
|
||||
),
|
||||
]"
|
||||
context="{
|
||||
'default_account_type': 'asset_fixed',
|
||||
'hide_model_on_account': state == 'model' and not id,
|
||||
'account_type_domain': [('account_type', 'in', (
|
||||
'asset_fixed',
|
||||
'asset_non_current'))]}"
|
||||
invisible="not display_account_asset_id"
|
||||
readonly="state == 'close'"/>
|
||||
<field
|
||||
name="account_depreciation_id"
|
||||
domain="[
|
||||
('company_ids', 'parent_of', company_id),
|
||||
('account_type', 'in', (
|
||||
'asset_fixed',
|
||||
'asset_non_current',
|
||||
'asset_current')
|
||||
),
|
||||
]"
|
||||
context="{
|
||||
'default_account_type': 'asset_non_current',
|
||||
'hide_model_on_account': state == 'model' and not id,
|
||||
'account_type_domain': [('account_type', 'in', (
|
||||
'asset_fixed',
|
||||
'asset_non_current'))]}"
|
||||
required="1"
|
||||
readonly="state == 'close'"/>
|
||||
<field
|
||||
name="account_depreciation_expense_id"
|
||||
domain="[
|
||||
('company_ids', 'parent_of', company_id),
|
||||
('account_type', 'in', (
|
||||
'expense_depreciation',
|
||||
'expense')
|
||||
),
|
||||
]"
|
||||
context="{
|
||||
'default_account_type': 'expense_depreciation',
|
||||
'hide_model_on_account': state == 'model' and not id,
|
||||
'account_type_domain': [('account_type', 'in', (
|
||||
'expense_depreciation',
|
||||
'expense'))]}"
|
||||
required="1"
|
||||
readonly="state == 'close'"/>
|
||||
<field name="journal_id" required="1" readonly="state not in ['draft', 'model']"/>
|
||||
<field name="analytic_distribution" groups="analytic.group_analytic_accounting" widget="analytic_distribution"
|
||||
options="{'account_field': 'account_depreciation_expense_id', 'business_domain': 'general'}"
|
||||
readonly="0"/>
|
||||
</group>
|
||||
<group string="Value at Import" invisible="state == 'model'">
|
||||
<field name="already_depreciated_amount_import" string="Depreciated Amount" readonly="state != 'draft'"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Depreciation Board" name="depreciation_board" invisible="total_depreciation_entries_count == 0">
|
||||
<field name="depreciation_move_ids" mode="list" options="{'reload_whole_on_button': true}" readonly="state not in ['draft', 'open', 'paused']">
|
||||
<list string="Depreciation Lines" decoration-info="state == 'draft'" decoration-muted="state == 'cancel'" create="0" default_order="date asc, id asc" editable="top">
|
||||
<field name="currency_id" column_invisible="True" readonly="state in ['cancel', 'posted']"/>
|
||||
<field name="date" string="Depreciation Date" readonly="state in ['cancel', 'posted']"/>
|
||||
<field name="ref" invisible="0"/>
|
||||
<field name="reversal_move_ids" widget="deprec_lines_reversed" nolabel="1"/>
|
||||
<field name="depreciation_value" widget="monetary" string="Depreciation" options="{'currency_field': 'currency_id'}" readonly="state == 'posted'"/>
|
||||
<field name="asset_depreciated_value" readonly="1" force_save="1" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="asset_remaining_value" readonly="1" widget="monetary" force_save="1" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="name" readonly="1" string="Journal Entry" widget="open_move_widget"/>
|
||||
<field name="state" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Bills" name="related_items">
|
||||
<field
|
||||
name="original_move_line_ids"
|
||||
readonly="state == 'posted'"
|
||||
domain="[
|
||||
('parent_state', '=', 'posted'),
|
||||
('company_id', '=', company_id),
|
||||
('account_id.account_type', 'in', ('asset_fixed', 'asset_non_current', 'asset_current')),
|
||||
('move_id.move_type', 'in', ('in_invoice', 'in_refund', 'in_receipt', 'entry')),
|
||||
('move_id.asset_id', '=', False),
|
||||
]"
|
||||
class="original_move_line_ids_field"
|
||||
context="{'disable_preview': 1, 'list_view_ref': 'fusion_accounting.view_move_line_tree_asset'}">
|
||||
<list create="0" no_open="1">
|
||||
<field name="date"/>
|
||||
<field name="move_name" string="Journal Entry" widget="open_move_widget"/>
|
||||
<field name="account_id"/>
|
||||
<field name="name"/>
|
||||
<field name="debit" widget="monetary"/>
|
||||
<field name="credit" widget="monetary"/>
|
||||
<field name="company_currency_id" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_asset_kanban" model="ir.ui.view">
|
||||
<field name="name">account.asset.kanban</field>
|
||||
<field name="model">account.asset</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" sample="1">
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<t t-name="card">
|
||||
<div class="row mb4">
|
||||
<field name="name" class="fw-bold fs-5 col-10"/>
|
||||
<div class="col-2">
|
||||
<field name="state" class="float-end" widget="label_selection" options="{'classes': {'draft': 'primary', 'open': 'success', 'close': 'default'}}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
Original Value
|
||||
</div>
|
||||
<div class="col-7 text-end">
|
||||
<field name="original_value" widget='monetary' readonly="state != 'draft'"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
Acquisition Date
|
||||
</div>
|
||||
<div class="col-7 text-end">
|
||||
<field name="acquisition_date" readonly="state != 'draft'"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
Duration
|
||||
</div>
|
||||
<div class="col-7 text-end">
|
||||
<field name="method_number" readonly="state not in ['draft', 'model']"/> <field name="method_period" readonly="state not in ['draft', 'model']"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" t-if="record.model_id.value">
|
||||
<div class="col-5">
|
||||
Model
|
||||
</div>
|
||||
<div class="col-7 text-end">
|
||||
<field name="model_id" readonly="state != 'draft'"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_account_asset_tree">
|
||||
<field name="name">account.asset.list</field>
|
||||
<field name="model">account.asset</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Assets" decoration-info="(state == 'draft')" decoration-muted="(state in ['close', 'cancelled'])" decoration-warning="(state == 'close' and value_residual != 0)" sample="1">
|
||||
<field name="name"/>
|
||||
<field name="parent_id" optional="hide"/>
|
||||
<field name="acquisition_date" readonly="state != 'draft'"/>
|
||||
<field name="original_value" readonly="state != 'draft'"/>
|
||||
<field name="method" readonly="state not in ['draft', 'model']"/>
|
||||
<field name="book_value"/>
|
||||
<field name="value_residual" widget="monetary"/>
|
||||
<field name="account_asset_id" optional="hide" readonly="state == 'close'"/>
|
||||
<field name="account_depreciation_id" optional="hide" readonly="state == 'close'"/>
|
||||
<field name="account_depreciation_expense_id" optional="hide" readonly="state == 'close'"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency" optional="hide"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="hide" readonly="state != 'draft'"/>
|
||||
<field name="company_id" groups="!base.group_multi_company" column_invisible="True" readonly="state != 'draft'"/>
|
||||
<field name="asset_properties"/>
|
||||
<field name="state"/>
|
||||
<field name="activity_exception_decoration" widget="activity_exception"/>
|
||||
<field name="activity_ids" widget="list_activity" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_account_asset_model_tree">
|
||||
<field name="name">account.asset.model.list</field>
|
||||
<field name="model">account.asset</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Asset Models">
|
||||
<field name="name"/>
|
||||
<field name="account_asset_id" readonly="state == 'close'"/>
|
||||
<field name="account_depreciation_id" readonly="state == 'close'"/>
|
||||
<field name="method" readonly="state not in ['draft', 'model']"/>
|
||||
<field name="method_number" string="Number of Depreciations" readonly="state not in ['draft', 'model']"/>
|
||||
<field name="method_period" string="Period length" readonly="state not in ['draft', 'model']"/>
|
||||
<field name="company_id" column_invisible="True" readonly="state != 'draft'"/>
|
||||
<field name="state" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_asset_search" model="ir.ui.view">
|
||||
<field name="name">account.asset.search</field>
|
||||
<field name="model">account.asset</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Asset Account">
|
||||
<field name="name" string="Asset"/>
|
||||
<field name="acquisition_date"/>
|
||||
<field name="model_id" string="Asset Model"/>
|
||||
<filter string="Current" name="current" domain="[('state','in', ('draft','open'))]" help="Assets in draft and open states"/>
|
||||
<filter string="Closed" name="closed" domain="[('state','=', 'close')]" help="Assets in closed state"/>
|
||||
<separator/>
|
||||
<filter invisible="1" string="Late Activities" name="activities_overdue"
|
||||
domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
help="Show all records which has next action date is before today"/>
|
||||
<filter invisible="1" string="Today Activities" name="activities_today"
|
||||
domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
<filter invisible="1" string="Future Activities" name="activities_upcoming_all"
|
||||
domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
<separator/>
|
||||
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
|
||||
<group>
|
||||
<filter string="Date" name="month" domain="[]" context="{'group_by':'acquisition_date'}"/>
|
||||
<filter string="Asset Model" name="model" domain="[]" context="{'group_by':'model_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_asset_model_search" model="ir.ui.view">
|
||||
<field name="name">account.asset.model.search</field>
|
||||
<field name="model">account.asset</field>
|
||||
<field name="priority">100</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Asset Model">
|
||||
<field name="name"/>
|
||||
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
|
||||
<group>
|
||||
<filter string="Fixed Asset Account" name="account_asset_id" domain="[]" context="{'group_by':'account_asset_id'}"/>
|
||||
<filter string="Depreciation Account" name="account_depreciation_id" domain="[]" context="{'group_by':'account_depreciation_id'}"/>
|
||||
<filter string="Expense Account" name="account_depreciation_expense_id" domain="[]" context="{'group_by':'account_depreciation_expense_id'}"/>
|
||||
<filter string="Journal" name="journal_id" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_account_asset_form">
|
||||
<field name="name">Assets</field>
|
||||
<field name="res_model">account.asset</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'list', 'view_id': ref('view_account_asset_tree')}),
|
||||
(0, 0, {'view_mode': 'kanban'}),
|
||||
(0, 0, {'view_mode': 'activity'}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('view_account_asset_form')})]"/>
|
||||
<field name="domain">[('state', '!=', 'model'), ('parent_id', '=', False)]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create new asset
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_account_asset_model_form">
|
||||
<field name="name">Asset Models</field>
|
||||
<field name="res_model">account.asset</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'list', 'view_id': ref('view_account_asset_model_tree')}),
|
||||
(0, 0, {'view_mode': 'kanban'}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('view_account_asset_form')})]"/>
|
||||
<field name="search_view_id" ref="view_account_asset_model_search"/>
|
||||
<field name="domain">[('state', '=', 'model')]</field>
|
||||
<field name="context">{'default_state': 'model'}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create new asset model
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem parent="account.menu_finance_entries" id="menu_action_account_asset_form" action="action_account_asset_form" sequence="60" groups="account.group_account_readonly"/>
|
||||
<menuitem parent="account.account_account_menu" sequence="1" id="menu_action_account_asset_model_form" action="action_account_asset_model_form" groups="account.group_account_readonly"/>
|
||||
|
||||
<record model="ir.actions.server" id="action_account_asset_run">
|
||||
<field name="name">Confirm</field>
|
||||
<field name="group_ids" eval="[(4, ref('account.group_account_user'))]"/>
|
||||
<field name="model_id" ref="fusion_accounting.model_account_asset"/>
|
||||
<field name="binding_model_id" ref="fusion_accounting.model_account_asset" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.filtered(lambda asset: asset.state == 'draft').validate()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.server" id="action_account_asset_compute_depreciations">
|
||||
<field name="name">Compute Depreciation</field>
|
||||
<field name="group_ids" eval="[(4, ref('account.group_account_user'))]"/>
|
||||
<field name="model_id" ref="fusion_accounting.model_account_asset"/>
|
||||
<field name="binding_model_id" ref="fusion_accounting.model_account_asset" />
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.filtered(lambda asset: asset.state == 'draft').compute_depreciation_board()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Configuration -->
|
||||
|
||||
<menuitem id="menu_finance_config_assets" name="Assets and Revenues" parent="account.menu_finance_configuration" sequence="25"/>
|
||||
|
||||
<!-- Override of move line list view. Avoid the assets taking a random list view, and make sure to only display relevant fields by default. -->
|
||||
|
||||
<record id="view_move_line_tree_asset" model="ir.ui.view">
|
||||
<field name="name">account.move.line.list.asset</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="amount_currency" position="attributes"><attribute name="optional">hide</attribute></field>
|
||||
<field name="debit" position="attributes"><attribute name="optional">hide</attribute></field>
|
||||
<field name="credit" position="attributes"><attribute name="optional">hide</attribute></field>
|
||||
<field name="matching_number" position="attributes"><attribute name="optional">hide</attribute></field>
|
||||
<field name="analytic_distribution" position="attributes"><attribute name="optional">hide</attribute></field>
|
||||
<field name="balance" position="attributes"><attribute name="optional">show</attribute></field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="journal_dashboard_view_inherit" model="ir.ui.view">
|
||||
<field name="name">account.journal.dashboard.kanban.inherit</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//div[@name="bank_customer_payment"]' position="before">
|
||||
<div t-if="journal_type == 'bank'">
|
||||
<widget name="account_file_uploader" title="Import File" btnClass="file_upload_kanban_action_a mb-0"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_tree" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.list</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<list position="attributes">
|
||||
<attribute name="js_class">account_tree</attribute>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
53
Fusion Accounting/views/account_fiscal_year_view.xml
Normal file
53
Fusion Accounting/views/account_fiscal_year_view.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="actions_account_fiscal_year" model="ir.actions.act_window">
|
||||
<field name="name">Fiscal Years</field>
|
||||
<field name="res_model">account.fiscal.year</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click here to create a new fiscal year.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_fiscal_year_form" model="ir.ui.view">
|
||||
<field name="name">account.fiscal.year.form</field>
|
||||
<field name="model">account.fiscal.year</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" placeholder="Fiscal Year 2018"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_fiscal_year_search" model="ir.ui.view">
|
||||
<field name="name">account.fiscal.year.search</field>
|
||||
<field name="model">account.fiscal.year</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_fiscal_year_tree" model="ir.ui.view">
|
||||
<field name="name">account.fiscal.year.list</field>
|
||||
<field name="model">account.fiscal.year</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
91
Fusion Accounting/views/account_journal_dashboard_views.xml
Normal file
91
Fusion Accounting/views/account_journal_dashboard_views.xml
Normal file
@@ -0,0 +1,91 @@
|
||||
<odoo>
|
||||
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
|
||||
<field name="name">account.journal.dashboard.kanban</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='sale_purchase_refund']" position="after">
|
||||
<div>
|
||||
<a type="object" name="action_open_reconcile" groups="account.group_account_user">Payments Matching</a>
|
||||
</div>
|
||||
</xpath>
|
||||
<!-- The following section handles the reconcile button -->
|
||||
<xpath expr="//div[@name='bank_cash_buttons']" position="inside">
|
||||
<button t-if="dashboard.number_to_reconcile > 0" type="object" name="action_open_reconcile" class="btn btn-secondary d-block text-nowrap" groups="account.group_account_basic"><t t-out="dashboard.number_to_reconcile"/> to reconcile</button>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@name='latest_statement']//span" position="replace">
|
||||
<a type="object"
|
||||
name="action_open_reconcile_statement"
|
||||
title="Latest Statement"
|
||||
t-att-context="{'statement_id': dashboard.last_statement_id}">
|
||||
Last Statement
|
||||
</a>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@id='dashboard_bank_cash_right']" position="inside">
|
||||
<t t-if="dashboard.number_to_check > 0">
|
||||
<div class="row" groups="account.group_account_readonly">
|
||||
<div class="col overflow-hidden text-start">
|
||||
<a type="object" name="action_open_to_check"><t t-out="dashboard.number_to_check"/> to check</a>
|
||||
</div>
|
||||
<div class="col-auto text-end">
|
||||
<span dir="ltr"><t t-out="dashboard.to_check_balance"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//h5[@id='card_action_view_menus']" position="after">
|
||||
<div>
|
||||
<a role="menuitem" type="object" name="action_open_bank_transactions">Transactions</a>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="account_reports_journal_dashboard_kanban_view">
|
||||
<field name="name">account.journal.dashboard.kanban.reports</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//div[@name='kanban_manage_reports']" position="inside">
|
||||
<div t-if="journal_type == 'sale'">
|
||||
<a type="action" name="%(action_account_report_ar)d">Aged Receivables</a>
|
||||
</div>
|
||||
<div t-if="journal_type == 'purchase'">
|
||||
<a type="action" name="%(action_account_report_ap)d">Aged Payables</a>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<!-- Replace the displayed amount by an action opening the General Ledger report -->
|
||||
<xpath expr="//div[@id='dashboard_bank_cash_balance']" position="replace">
|
||||
<div id="dashboard_bank_cash_balance" class="col overflow-hidden text-start">
|
||||
<a type="object" name="action_open_bank_balance_in_gl" title="Last Statement balance + Transactions since statement">Balance</a>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@id='bank_and_cash_container']" position="inside">
|
||||
<div class="col-4 o_kanban_card_manage_section o_kanban_manage_reconciliation">
|
||||
<h5 id="card_action_view_menus" class="o_kanban_card_manage_title">
|
||||
<span role="separator">Reconciliation</span>
|
||||
</h5>
|
||||
<div>
|
||||
<a type="action" name="%(action_account_report_bank_reconciliation)d">Reconciliation Report</a>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<!-- Add subtitle & onboarding to account_tax_periodicity_journals -->
|
||||
<xpath expr="//t[@name='empty_journal_helper']" position="inside">
|
||||
<span class="text-muted" t-if="journal_type == 'general' and dashboard['is_account_tax_periodicity_journal']">Never miss a tax deadline.</span>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@id='dashboard_general_right']" position="after">
|
||||
<widget t-if="!record.has_posted_entries.raw_value and dashboard['onboarding'] and dashboard['is_account_tax_periodicity_journal']"
|
||||
name="account_onboarding"
|
||||
groups="account.group_account_manager"/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
304
Fusion Accounting/views/account_move_views.xml
Normal file
304
Fusion Accounting/views/account_move_views.xml
Normal file
@@ -0,0 +1,304 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<odoo>
|
||||
<record id="view_move_line_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.list</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="mode">extension</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//list" position="attributes">
|
||||
<attribute name="js_class">account_move_line_list</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//list" position="inside">
|
||||
<header>
|
||||
<button name="action_reconcile" type="object" string="Reconcile" groups="account.group_account_user"
|
||||
data-hotkey="r"/>
|
||||
<button name="turn_as_asset" type="object" string="Create Asset" groups="account.group_account_user"
|
||||
data-hotkey="c"/>
|
||||
</header>
|
||||
<field name="is_account_reconcile" column_invisible="True"/>
|
||||
<field name="has_deferred_moves" column_invisible="True"/>
|
||||
</xpath>
|
||||
<xpath expr="//list/field[@name='name']" position="after">
|
||||
<field name="deferred_start_date" optional="hide" readonly="has_deferred_moves"/>
|
||||
<field name="deferred_end_date" optional="hide" readonly="has_deferred_moves"/>
|
||||
</xpath>
|
||||
<xpath expr="//list/field[@name='matching_number']" position="attributes">
|
||||
<attribute name="widget">matching_link_widget</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_payment_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.payment.list</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_payment_tree"/>
|
||||
<field name="mode">extension</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_payment_items_register_payment']" position="after">
|
||||
<button name="action_reconcile" type="object" string="Reconcile" groups="account.group_account_user"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account.move.form.inherit</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@id='other_tab']//field[@name='fiscal_position_id']" position="after">
|
||||
<field name="inalterable_hash" groups="base.group_no_one"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@id='other_tab_entry']//field[@name='company_id']" position="after">
|
||||
<field name="inalterable_hash" groups="base.group_no_one"/>
|
||||
</xpath>
|
||||
<xpath expr="//list/field[@name='analytic_distribution']" position="after">
|
||||
<field name="has_abnormal_deferred_dates" column_invisible="1"/>
|
||||
<field name="deferred_start_date" optional="hide" decoration-warning="has_abnormal_deferred_dates"/>
|
||||
<field name="deferred_end_date" optional="hide" decoration-warning="has_abnormal_deferred_dates"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_open_bank_reconciliation_widget_statement"
|
||||
class="oe_stat_button"
|
||||
icon="fa-bars"
|
||||
type="object"
|
||||
invisible="not statement_id or state == 'cancel'">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Bank Statement</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_open_bank_reconciliation_widget"
|
||||
class="oe_stat_button"
|
||||
icon="fa-bars"
|
||||
type="object"
|
||||
invisible="move_type != 'entry' or not id or not statement_line_id or state == 'cancel'">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">1 Bank Transaction</span>
|
||||
</div>
|
||||
</button>
|
||||
<field name="deferred_move_ids" invisible="1"/>
|
||||
<field name="deferred_original_move_ids" invisible="1"/>
|
||||
<field name="deferred_entry_type" invisible="1"/>
|
||||
<button name="open_deferred_entries"
|
||||
class="oe_stat_button"
|
||||
icon="fa-bars"
|
||||
type="object"
|
||||
invisible="not deferred_move_ids"
|
||||
string="Deferred Entries">
|
||||
</button>
|
||||
<button name="open_deferred_original_entry"
|
||||
class="oe_stat_button"
|
||||
icon="fa-bars"
|
||||
type="object"
|
||||
invisible="deferred_entry_type == 'revenue' or not deferred_original_move_ids"
|
||||
string="Related Purchase(s)">
|
||||
</button>
|
||||
<button name="open_deferred_original_entry"
|
||||
class="oe_stat_button"
|
||||
icon="fa-bars"
|
||||
type="object"
|
||||
invisible="deferred_entry_type == 'expense' or not deferred_original_move_ids"
|
||||
string="Related Sale(s)">
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_deferred_entries_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.deferral.entries.list</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//list" position="attributes">
|
||||
<attribute name="default_order">date</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='tax_ids']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='amount_currency']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='analytic_distribution']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='discount_date']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='discount_amount_currency']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='date_maturity']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_archived_tag_move_tree" model="ir.ui.view">
|
||||
<field name="name">account.archived.tax.tag.list</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='tax_ids']" position="attributes">
|
||||
<attribute name="optional">show</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='tax_tag_ids']" position="attributes">
|
||||
<attribute name="optional">show</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='matching_number']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_journal_report_audit_move_line_tree" model="ir.ui.view">
|
||||
<field name="name">account.journal.report.audit.move.line.list</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<list name="move_line_tree" position="attributes">
|
||||
<attribute name="js_class">account_move_line_journal_report_list</attribute>
|
||||
</list>
|
||||
<button name="edit" position="replace">
|
||||
<button name="open_partner" type="object" string="View" title="View Partner"/>
|
||||
</button>
|
||||
<groupby name="partner_id" position="after">
|
||||
<groupby name="move_id">
|
||||
<button name="button_set_checked" type="object" string="Set as Checked"
|
||||
invisible="checked or state == 'draft'"/>
|
||||
</groupby>
|
||||
</groupby>
|
||||
<field name="invoice_date" position="attributes">
|
||||
<attribute name="optional">show</attribute>
|
||||
</field>
|
||||
<field name="account_id" position="attributes">
|
||||
<attribute name="optional">show</attribute>
|
||||
</field>
|
||||
<field name="tax_ids" position="attributes">
|
||||
<attribute name="optional">show</attribute>
|
||||
</field>
|
||||
<field name="date" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</field>
|
||||
<field name="matching_number" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</field>
|
||||
<field name="partner_id" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</field>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_journal_report_audit_bank_move_line_tree" model="ir.ui.view">
|
||||
<field name="name">account.journal.report.audit.bank.move.line.tree</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="fusion_accounting.view_journal_report_audit_move_line_tree"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="invoice_date" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</field>
|
||||
<field name="date" position="attributes">
|
||||
<attribute name="optional">show</attribute>
|
||||
</field>
|
||||
<field name="matching_number" position="attributes">
|
||||
<attribute name="optional">show</attribute>
|
||||
</field>
|
||||
<field name="partner_id" position="attributes">
|
||||
<attribute name="optional">show</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_journal_report_audit_move_line_search" model="ir.ui.view">
|
||||
<field name="name">account.journal.report.audit.move.line.search</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="journal_id" position="after">
|
||||
<field name="exclude_bank_lines"/>
|
||||
</field>
|
||||
<filter name="group_by_move" position="attributes">
|
||||
<attribute name="context">{'group_by': 'move_id'}</attribute>
|
||||
</filter>
|
||||
<filter name="sales" position="before">
|
||||
<filter string="Invoice lines" name="invoices_lines" domain="[('display_type','=','product')]"
|
||||
invisible="1"/>
|
||||
<filter string="Exclude Bank lines" name="search_default_exclude_bank_lines"
|
||||
domain="[('exclude_bank_lines','=', True)]" invisible="1"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_move_form_asset_inherit" model="ir.ui.view">
|
||||
<field name="name">account.move.form</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
|
||||
<field name="asset_id" invisible="1"/>
|
||||
<field name="asset_ids" invisible="1"/>
|
||||
<field name="count_asset" invisible="1"/>
|
||||
<field name="draft_asset_exists" invisible="1"/>
|
||||
<button name="open_asset_view"
|
||||
invisible="not asset_id"
|
||||
class="oe_stat_button"
|
||||
icon="fa-cube"
|
||||
type="object">
|
||||
<field name="asset_id_display_name" nolabel="1"/>
|
||||
</button>
|
||||
<button name="action_open_asset_ids"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-id-card-o"
|
||||
invisible="count_asset == 0 or draft_asset_exists">
|
||||
<field string="Asset(s)" name="count_asset" widget="statinfo"/>
|
||||
</button>
|
||||
<button name="action_open_asset_ids"
|
||||
type="object"
|
||||
class="oe_stat_button text-danger"
|
||||
icon="fa-id-card-o"
|
||||
invisible="count_asset == 0 or not draft_asset_exists">
|
||||
<field string="Asset(s)" name="count_asset" widget="statinfo"/>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//page[@id='other_tab']//group[@name='accounting_info_group']" position="inside">
|
||||
<field name="asset_move_type" invisible="not asset_id and not asset_ids" readonly="0"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@id='other_tab_entry']//group[@id='other_tab_entry_group']//group[@name='misc_group']"
|
||||
position="inside">
|
||||
<field name="asset_move_type" invisible="not asset_id and not asset_ids" readonly="0"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_form_asset_inherit" model="ir.ui.view">
|
||||
<field name="name">account.move.line.form</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="move_id" position="after">
|
||||
<group string="Related Assets" invisible="not asset_ids">
|
||||
<field name="asset_ids" nolabel="1"/>
|
||||
</group>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.server" id="action_account_aml_to_asset">
|
||||
<field name="name">Create Asset</field>
|
||||
<field name="group_ids" eval="[(4, ref('account.group_account_user'))]"/>
|
||||
<field name="model_id" ref="account.model_account_move_line"/>
|
||||
<field name="binding_model_id" ref="account.model_account_move_line"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.turn_as_asset()
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
21
Fusion Accounting/views/account_payment_views.xml
Normal file
21
Fusion Accounting/views/account_payment_views.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_account_payment_form_inherit_fusion_accounting" model="ir.ui.view">
|
||||
<field name="name">account.payment.form.inherit.fusion_accounting</field>
|
||||
<field name="model">account.payment</field>
|
||||
<field name="inherit_id" ref="account.view_account_payment_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='button_open_journal_entry']" position="attributes">
|
||||
<attribute name="groups">account.group_account_user</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- Stat button to open the manual reconciliation widget -->
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_open_manual_reconciliation_widget" type="object"
|
||||
string="Payment Matching" class="oe_stat_button" icon="fa-dollar"
|
||||
groups="account.group_account_user"
|
||||
invisible="is_reconciled or not move_id or state not in ('in_process', 'paid')"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
22
Fusion Accounting/views/account_reconcile_model_views.xml
Normal file
22
Fusion Accounting/views/account_reconcile_model_views.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="account_reconcile_model_form_inherit_fusion_accounting" model="ir.ui.view">
|
||||
<field name="name">account.reconcile.model.form.inherit.fusion_accounting</field>
|
||||
<field name="model">account.reconcile.model</field>
|
||||
<field name="inherit_id" ref="account.view_account_reconcile_model_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='auto_reconcile']" position="replace">
|
||||
<label for="auto_reconcile" invisible="rule_type == 'writeoff_button'"/>
|
||||
<div class="o_row" invisible="rule_type == 'writeoff_button'">
|
||||
<field name="auto_reconcile"/>
|
||||
<button name="run_auto_reconciliation" invisible="not auto_reconcile" type="object" class="btn-link">
|
||||
<i title="Run manually" role="img" aria-label="Run manually" class="fa fa-refresh"/>
|
||||
Run manually
|
||||
</button>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
122
Fusion Accounting/views/account_reconcile_views.xml
Normal file
122
Fusion Accounting/views/account_reconcile_views.xml
Normal file
@@ -0,0 +1,122 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<odoo>
|
||||
<record id="view_account_move_line_reconcile_search" model="ir.ui.view">
|
||||
<field name="name">account.move.line.reconcile.search</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="priority" eval="300"/>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Journal Items to Reconcile">
|
||||
<field name="name"
|
||||
string="Journal Item"
|
||||
filter_domain="['|', '|', '|', ('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="invoice_date"/>
|
||||
<field name="date"/>
|
||||
<field name="balance" string="Amount" filter_domain="['|', ('credit', '=', self), ('debit', '=', self)]"/>
|
||||
<field name="account_id"/>
|
||||
<field name="account_type"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="move_id"
|
||||
string="Journal Entry"
|
||||
filter_domain="['|', '|', ('move_id.name', 'ilike', self), ('move_id.ref', 'ilike', self), ('move_id.partner_id', 'ilike', self)]"/>
|
||||
<field name="tax_ids" />
|
||||
<field name="tax_line_id" string="Originator Tax"/>
|
||||
<field name="reconcile_model_id"/>
|
||||
<separator/>
|
||||
<filter string="Unreconciled"
|
||||
domain="[('account_id.reconcile', '=', True), '|', ('matching_number', '=', False), ('matching_number', '=like', 'P%')]"
|
||||
name="reconcilable_account"
|
||||
help="Journal items where the account allows reconciliation no matter the residual amount"
|
||||
/>
|
||||
<filter string="With residual" domain="[('amount_residual', '!=', 0), ('account_id.reconcile', '=', True)]" help="Journal items where matching number isn't set" name="unreconciled"/>
|
||||
<separator/>
|
||||
<filter string="Payable" domain="[('account_id.account_type', '=', 'liability_payable'), ('account_id.non_trade', '=', False)]" help="From Trade Payable accounts" name="trade_payable"/>
|
||||
<filter string="Receivable" domain="[('account_id.account_type', '=', 'asset_receivable'), ('account_id.non_trade', '=', False)]" help="From Trade Receivable accounts" name="trade_receivable"/>
|
||||
<separator/>
|
||||
<filter string="Date" name="date" date="date"/>
|
||||
<filter string="Invoice Date" name="invoice_date" date="invoice_date"/>
|
||||
<separator/>
|
||||
<group>
|
||||
<filter string="Journal Entry" name="group_by_move" domain="[]" context="{'group_by': 'move_name'}"/>
|
||||
<filter string="Account" name="group_by_account" domain="[]" context="{'group_by': 'account_id'}"/>
|
||||
<filter string="Partner" name="group_by_partner" domain="[]" context="{'group_by': 'partner_id'}"/>
|
||||
<filter string="Journal" name="journal" domain="[]" context="{'group_by': 'journal_id'}"/>
|
||||
<filter string="Date" name="groupby_date" domain="[]" context="{'group_by': 'date'}"/>
|
||||
<filter string="Invoice Date" name="groupby_invoice_date" domain="[]" context="{'group_by': 'invoice_date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_reconcile_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.list.reconcile</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Journal Items" js_class="account_move_line_reconcile_list" create="false" edit="true" expand="context.get('expand', False)" multi_edit="1" sample="1">
|
||||
<header>
|
||||
<button name="action_reconcile" type="object" string="Reconcile" groups="account.group_account_user"/>
|
||||
</header>
|
||||
<field name="move_id" column_invisible="True"/>
|
||||
<field name="invoice_date" string="Invoice Date" optional="hide"/>
|
||||
<field name="date" readonly="1"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="1" optional="hide"/>
|
||||
<field name="journal_id" readonly="1" options='{"no_open":True}' optional="hide"/>
|
||||
<field name="move_name" string="Journal Entry" widget="open_move_widget"/>
|
||||
<field name="account_id" options="{'no_open': True, 'no_create': True}" domain="[('company_ids', 'parent_of', company_id)]" groups="account.group_account_readonly" optional="hide"/>
|
||||
<field name="partner_id" optional="hide" readonly="move_type != 'entry'"/>
|
||||
<field name="ref" optional="hide" readonly="False"/>
|
||||
<field name="product_id" readonly="1" optional="hide"/>
|
||||
<field name="name" optional="show"/>
|
||||
<field name="analytic_distribution" widget="analytic_distribution"
|
||||
groups="analytic.group_analytic_accounting"
|
||||
optional="show"
|
||||
options="{'product_field': 'product_id', 'account_field': 'account_id', 'force_applicability': 'optional'}"/>
|
||||
<field name="tax_ids" widget="many2many_tags" optional="hide" readonly="1"/>
|
||||
<field name="amount_currency" string="In Currency" groups="base.group_multi_currency" optional="show" readonly="1" invisible="is_same_currency"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency" optional="hide" string="Currency" readonly="1" invisible="is_same_currency"/>
|
||||
<field name="debit" sum="Total Debit" readonly="1"/>
|
||||
<field name="credit" sum="Total Credit" readonly="1"/>
|
||||
<field name="tax_tag_ids" string="Tax Grids" options="{'no_create': True, 'no_create_edit': True}" widget="many2many_tags" optional="hide"/>
|
||||
<field name="discount_date" string="Discount Date" optional="hide" />
|
||||
<field name="discount_amount_currency" string="Discount Amount" optional="hide" />
|
||||
<field name="tax_line_id" string="Originator Tax" optional="hide" readonly="1"/>
|
||||
<field name="date_maturity" readonly="1" optional="hide"/>
|
||||
<field name="balance" sum="Total Balance" optional="hide" readonly="1"/>
|
||||
<field name="matching_number" string="Matching" readonly="1" optional="show" widget="matching_link_widget"/>
|
||||
<field name="amount_residual" sum="Total Residual" string="Residual" optional="show" readonly="1" invisible="not is_account_reconcile"/>
|
||||
<field name="amount_residual_currency" sum="Total Residual in Currency" string="Residual in Currency" optional="hide" readonly="1" invisible="is_same_currency or not is_account_reconcile" groups="base.group_multi_currency"/>
|
||||
<field name="move_type" column_invisible="True"/>
|
||||
<field name="parent_state" column_invisible="True"/>
|
||||
<field name="account_type" column_invisible="True"/>
|
||||
<field name="statement_line_id" column_invisible="True"/>
|
||||
<field name="company_currency_id" column_invisible="True"/>
|
||||
<field name="is_same_currency" column_invisible="True"/>
|
||||
<field name="is_account_reconcile" column_invisible="True"/>
|
||||
<field name="sequence" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Open the auto-reconcile wizard in modal -->
|
||||
<record id="action_open_auto_reconcile_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Reconcile automatically</field>
|
||||
<field name="res_model">account.auto.reconcile.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!-- Open amls to reconcile in a view dedicated for reconciliation -->
|
||||
<record id="action_move_line_posted_unreconciled" model="ir.actions.act_window">
|
||||
<field name="name">Journal Items to reconcile</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="path">reconcile</field>
|
||||
<field name="view_mode">list</field>
|
||||
<field name="search_view_id" ref="view_account_move_line_reconcile_search"/>
|
||||
<field name="view_id" ref="view_move_line_reconcile_tree"/>
|
||||
<field name="domain">[('display_type', 'not in', ('line_section', 'line_note')), ('account_id.reconcile', '=', True), ('parent_state', '=', 'posted'), ('full_reconcile_id', '=', False)]</field>
|
||||
<field name="context">{'journal_type': 'general', 'search_default_unreconciled': True, 'search_default_group_by_account': True, 'search_default_group_by_partner': True}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
390
Fusion Accounting/views/account_report_view.xml
Normal file
390
Fusion Accounting/views/account_report_view.xml
Normal file
@@ -0,0 +1,390 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="account_report_tree" model="ir.ui.view">
|
||||
<field name="name">account.report.list</field>
|
||||
<field name="model">account.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="country_id"/>
|
||||
<field name="root_report_id"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_tree_configure_start_dates" model="ir.ui.view">
|
||||
<field name="name">account.report.tree.configure.start.dates</field>
|
||||
<field name="model">account.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<list edit="True" create="False" editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="display_name" readonly="1"/>
|
||||
<field name="tax_closing_start_date" width="180px"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_add_sections_tree" model="ir.ui.view">
|
||||
<field name="name">account.report.add.sections.list</field>
|
||||
<field name="model">account.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="bottom" create="1" delete="1" decoration-muted="not active" open_form_view="True">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="country_id" readonly="1"/>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_report_search" model="ir.ui.view">
|
||||
<field name="name">account.report.search</field>
|
||||
<field name="model">account.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="country_id"/>
|
||||
<field name="root_report_id"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_coa" model="ir.ui.view">
|
||||
<field name="name">account.view.coa</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="top" create="1" delete="1" open_form_view="True">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="company_ids" column_invisible="True"/>
|
||||
<field name="account_type"/>
|
||||
<field name="current_balance"/>
|
||||
<field name="tax_ids" optional="hide" widget="many2many_tags"/>
|
||||
<field name="tag_ids" optional="hide" widget="many2many_tags"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_form" model="ir.ui.view">
|
||||
<field name="name">account.report.form</field>
|
||||
<field name="model">account.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<field name="is_account_coverage_report_available" invisible="1"/>
|
||||
<button class="btn btn-secondary float-end" invisible="not is_account_coverage_report_available"
|
||||
name="action_download_xlsx_accounts_coverage_report" type="object" string="Accounts Coverage Report"/>
|
||||
</header>
|
||||
|
||||
<field name="custom_handler_model_id" invisible="1"/>
|
||||
<div class="alert alert-info text-center" invisible="not custom_handler_model_id" role="alert">
|
||||
This report uses report-specific code.
|
||||
You can customize it manually, but any change in the parameters used for its computation could lead to errors.
|
||||
</div>
|
||||
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="Report Name"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="root_report_id" domain="[('root_report_id', '=', None)]"/>
|
||||
<field name="availability_condition" required="1" invisible="not root_report_id"/>
|
||||
<field name="use_sections" invisible="line_ids"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
<field name="country_id" invisible="availability_condition != 'country'" required="availability_condition == 'country'"/>
|
||||
<field name="chart_template" invisible="availability_condition != 'coa'" required="availability_condition == 'coa'"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook>
|
||||
<page string="Lines" name="page_lines" invisible="use_sections">
|
||||
<field class="w-100" name="line_ids" no_label="1" widget="account_report_lines_list_x2many">
|
||||
<list limit="2000">
|
||||
<field name="id" column_invisible="1"/>
|
||||
<field name="sequence" column_invisible="1"/>
|
||||
<field name="parent_id" column_invisible="1"/>
|
||||
<field name="hierarchy_level" column_invisible="1"/>
|
||||
|
||||
<field name="name"/>
|
||||
<field name="code" optional="hide"/>
|
||||
<field name="print_on_new_page" optional="hide"/>
|
||||
<field name="hide_if_zero" optional="hide"/>
|
||||
<field name="user_groupby" optional="hide"/>
|
||||
<field name="foldable" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
<page string="Sections" name="page_sections" invisible="not use_sections">
|
||||
<field
|
||||
name="section_report_ids"
|
||||
no_label="1"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
domain="[('section_report_ids', '=', False)]"
|
||||
context="{'list_view_ref': 'fusion_accounting.account_report_add_sections_tree', 'active_test': False}"
|
||||
/>
|
||||
</page>
|
||||
|
||||
<page string="Columns" name="page_columns" invisible="use_sections">
|
||||
<field name="column_ids">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="expression_label"/>
|
||||
<field name="figure_type"/>
|
||||
<field name="sortable"/>
|
||||
<field name="blank_if_zero"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
<page string="Options" name="page_options" invisible="use_sections">
|
||||
<group>
|
||||
<group >
|
||||
<field name="load_more_limit"/>
|
||||
<field name="prefix_groups_threshold"/>
|
||||
<field name="filter_hierarchy" required="1"/>
|
||||
<field name="filter_multi_company" groups="base.group_multi_company" required="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="default_opening_date_filter" required="True"/>
|
||||
<field name="horizontal_group_ids" widget="many2many_tags" options="{'no_quick_create': True}"/>
|
||||
<field name="filter_analytic" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="filter_analytic_groupby" groups="analytic.group_analytic_accounting"/>
|
||||
</group>
|
||||
<group string="Advanced" class="oe_edit_only">
|
||||
<field name="filter_date_range"/>
|
||||
<field name="filter_unfold_all"/>
|
||||
<field name="filter_growth_comparison"/>
|
||||
<field name="filter_period_comparison"/>
|
||||
<field name="currency_translation" required="1" groups="base.group_multi_currency"/>
|
||||
</group>
|
||||
<group string="Filters" class="oe_edit_only">
|
||||
<field name="filter_account_type"/>
|
||||
<field name="filter_journals"/>
|
||||
<field name="filter_partner"/>
|
||||
<field name="filter_show_draft"/>
|
||||
<field name="filter_unreconciled"/>
|
||||
<field name="filter_aml_ir_filters"/>
|
||||
<field name="filter_hide_0_lines" help="This option hides lines with a value of 0"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_line_form" model="ir.ui.view">
|
||||
<field name="name">account.report.line.form</field>
|
||||
<field name="model">account.report.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="Report Line"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="groupby" invisible="1"/>
|
||||
<field name="display_custom_groupby_warning" invisible="1"/>
|
||||
<field name="action_id"/>
|
||||
<field name="hierarchy_level"/>
|
||||
<field string="Group By" name="user_groupby"/>
|
||||
<div colspan="2" class="alert alert-warning" role="alert" invisible="not display_custom_groupby_warning">
|
||||
This line uses a custom user-defined 'Group By' value.
|
||||
<button class="oe_link" type="object" name="action_reset_custom_groupby">Reset to Standard</button>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="foldable"/>
|
||||
<field name="print_on_new_page"/>
|
||||
<field name="hide_if_zero"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<field name="expression_ids">
|
||||
<list>
|
||||
<field name="label"/>
|
||||
<field name="engine"/>
|
||||
<field name="formula"/>
|
||||
<field name="subformula"/>
|
||||
<field name="date_scope" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_expression_form" model="ir.ui.view">
|
||||
<field name="name">account.report.expression.form</field>
|
||||
<field name="model">account.report.expression</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="label" placeholder="Expression"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<notebook>
|
||||
<page string="Definition" name="page_definition">
|
||||
<group>
|
||||
<field name="engine"/>
|
||||
<field name="formula"/>
|
||||
<field name="subformula" required="engine == 'domain'"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Options" name="page_options">
|
||||
<group>
|
||||
<group>
|
||||
<field name="date_scope"/>
|
||||
<field name="figure_type"/>
|
||||
<field name="carryover_target"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="blank_if_zero"/>
|
||||
<field name="green_on_positive"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_horizontal_group_form" model="ir.ui.view">
|
||||
<field name="name">account.report.horizontal.group.form</field>
|
||||
<field name="model">account.report.horizontal.group</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="Group Name"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="report_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="rule_ids">
|
||||
<form>
|
||||
<group>
|
||||
<field name="field_name"/>
|
||||
<field name="res_model_name" invisible="1"/>
|
||||
<field name="domain" widget="domain" options="{'model': 'res_model_name'}"/>
|
||||
</group>
|
||||
</form>
|
||||
<list>
|
||||
<field name="field_name"/>
|
||||
<field name="domain"/>
|
||||
</list>
|
||||
</field>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_horizontal_group_tree" model="ir.ui.view">
|
||||
<field name="name">account.report.horizontal.group.list</field>
|
||||
<field name="model">account.report.horizontal.group</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="report_ids" widget="many2many_tags"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_external_value_tree" model="ir.ui.view">
|
||||
<field name="name">account.report.external.value.list</field>
|
||||
<field name="model">account.report.external.value</field>
|
||||
<field name="arch" type="xml">
|
||||
<list create="0">
|
||||
<field name="report_country_id" column_invisible="True"/>
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="value"/>
|
||||
<field name="text_value"/>
|
||||
<field name="target_report_expression_id" optional="hide"/>
|
||||
<field name="target_report_line_id" optional="hide"/>
|
||||
<field name="target_report_expression_label" optional="hide"/>
|
||||
<field name="company_id" optional="hide" groups="base.group_multi_company"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_budget_tree" model="ir.ui.view">
|
||||
<field name="name">account.report.budget.list</field>
|
||||
<field name="model">account.report.budget</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_report_budget_form" model="ir.ui.view">
|
||||
<field name="name">account.report.budget.form</field>
|
||||
<field name="model">account.report.budget</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="Budget Name"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<notebook>
|
||||
<page string="Budget Items" name="budget_items">
|
||||
<field name="item_ids" nolabel="1">
|
||||
<list editable="bottom">
|
||||
<field name="account_id" width="40%"/>
|
||||
<field name="date" string="Months" options="{'min_precision': 'months'}" width="30%"/>
|
||||
<field name="amount" width="30%"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_create_composite_report_list" model="ir.actions.server">
|
||||
<field name="name">Create Composite Report</field>
|
||||
<field name="model_id" ref="model_account_report"/>
|
||||
<field name="binding_model_id" ref="model_account_report"/>
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.action_create_composite_report()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
64
Fusion Accounting/views/account_tax_views.xml
Normal file
64
Fusion Accounting/views/account_tax_views.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_tax_unit_form" model="ir.ui.view">
|
||||
<field name="name">account.tax.unit.form</field>
|
||||
<field name="model">account.tax.unit</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Tax Unit">
|
||||
<div class="alert alert-info" role="alert"
|
||||
invisible="fpos_synced">
|
||||
Fiscal Positions should apply to all companies of the tax unit. You may want to <button class="oe_link p-0 align-baseline" type="object" name="action_sync_unit_fiscal_positions">synchronize fiscal positions</button>.
|
||||
</div>
|
||||
<sheet>
|
||||
<field name="fpos_synced" invisible="1"/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="Name"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="country_id" options="{'no_create': True, 'no_open': True}"/>
|
||||
<field name="company_ids" widget="many2many_tags" domain="[('chart_template', '!=', False), ('account_tax_unit_ids', '=', False)]" options="{'no_create': True}"/>
|
||||
<field name="main_company_id" domain="[('id', 'in', company_ids)]" options="{'no_create': True, 'no_open': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="vat"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_tax_unit_tree" model="ir.ui.view">
|
||||
<field name="name">account.tax.unit.list</field>
|
||||
<field name="model">account.tax.unit</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="country_id"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_tax_units" model="ir.actions.act_window">
|
||||
<field name="name">Tax Units</field>
|
||||
<field name="res_model">account.tax.unit</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_id" ref="view_tax_unit_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_view_tax_units"
|
||||
action="action_view_tax_units"
|
||||
parent="account.account_account_menu"
|
||||
sequence="8"
|
||||
groups="base.group_no_one"/>
|
||||
|
||||
</odoo>
|
||||
177
Fusion Accounting/views/additional_features_views.xml
Normal file
177
Fusion Accounting/views/additional_features_views.xml
Normal file
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================= -->
|
||||
<!-- Inter-Company Configuration in Settings -->
|
||||
<!-- ================================================================= -->
|
||||
|
||||
<record id="res_config_settings_intercompany_view" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.fusion.intercompany</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
|
||||
<field name="priority" eval="55"/>
|
||||
<field name="arch" type="xml">
|
||||
<block id="invoicing_settings" position="inside">
|
||||
<setting string="Inter-Company Invoice Sync" company_dependent="1"
|
||||
help="Automatically create matching bills/invoices between companies">
|
||||
<field name="fusion_intercompany_invoice_enabled"/>
|
||||
<div class="content-group" invisible="not fusion_intercompany_invoice_enabled">
|
||||
<div class="row mt8">
|
||||
<label for="fusion_intercompany_invoice_journal_id"
|
||||
class="col-lg-5 o_light_label"
|
||||
string="Default Journal"/>
|
||||
<field name="fusion_intercompany_invoice_journal_id"
|
||||
domain="[('type', 'in', ('sale', 'purchase'))]"/>
|
||||
</div>
|
||||
<div class="text-muted mt8">
|
||||
When posting an invoice to a partner that represents another
|
||||
company, a corresponding bill (or invoice) will be created
|
||||
automatically in the target company.
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
</block>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================= -->
|
||||
<!-- 3-Way Match Status on Invoice Form -->
|
||||
<!-- ================================================================= -->
|
||||
|
||||
<record id="view_move_form_3way_match" model="ir.ui.view">
|
||||
<field name="name">account.move.form.fusion.3way.match</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="priority" eval="60"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Add 3-Way Match fields to the Other Info tab -->
|
||||
<xpath expr="//page[@id='other_tab']//group[@name='accounting_info_group']" position="inside">
|
||||
<field name="fusion_3way_match_status"
|
||||
invisible="move_type not in ('in_invoice', 'in_refund')"
|
||||
widget="badge"
|
||||
decoration-success="fusion_3way_match_status == 'matched'"
|
||||
decoration-warning="fusion_3way_match_status == 'partial'"
|
||||
decoration-danger="fusion_3way_match_status == 'unmatched'"
|
||||
decoration-muted="fusion_3way_match_status == 'not_applicable'"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Add 3-Way Match amounts group -->
|
||||
<xpath expr="//page[@id='other_tab']//group[@name='accounting_info_group']" position="after">
|
||||
<group string="3-Way Matching Details"
|
||||
invisible="fusion_3way_match_status == 'not_applicable' or move_type not in ('in_invoice', 'in_refund')">
|
||||
<group>
|
||||
<field name="fusion_3way_po_amount"/>
|
||||
<field name="fusion_3way_received_qty_value"/>
|
||||
<field name="fusion_3way_bill_amount"/>
|
||||
</group>
|
||||
<group>
|
||||
<button name="action_refresh_3way_match"
|
||||
type="object"
|
||||
string="Refresh Match"
|
||||
class="btn-secondary"
|
||||
icon="fa-refresh"
|
||||
invisible="fusion_3way_match_status == 'not_applicable'"/>
|
||||
<!-- Purchase order view button removed: requires purchase module -->
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
<!-- Add 3-Way Match badge to the header area -->
|
||||
<xpath expr="//div[hasclass('oe_title')]" position="after">
|
||||
<div class="d-flex align-items-center gap-2 mb-2"
|
||||
invisible="fusion_3way_match_status in ('not_applicable', False) or move_type not in ('in_invoice', 'in_refund')">
|
||||
<field name="fusion_3way_match_status"
|
||||
widget="badge"
|
||||
decoration-success="fusion_3way_match_status == 'matched'"
|
||||
decoration-warning="fusion_3way_match_status == 'partial'"
|
||||
decoration-danger="fusion_3way_match_status == 'unmatched'"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================= -->
|
||||
<!-- Debit Note Button on Invoice Form -->
|
||||
<!-- ================================================================= -->
|
||||
|
||||
<record id="view_move_form_debit_note" model="ir.ui.view">
|
||||
<field name="name">account.move.form.fusion.debit.note</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="priority" eval="61"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Add Debit Note button in the button box -->
|
||||
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
|
||||
<field name="fusion_debit_note_count" invisible="1"/>
|
||||
<button name="action_view_debit_notes"
|
||||
class="oe_stat_button"
|
||||
icon="fa-file-text-o"
|
||||
type="object"
|
||||
invisible="fusion_debit_note_count == 0">
|
||||
<field name="fusion_debit_note_count" string="Debit Notes" widget="statinfo"/>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<!-- Add Create Debit Note action button -->
|
||||
<xpath expr="//button[@name='action_register_payment']" position="after">
|
||||
<button name="action_create_debit_note"
|
||||
type="object"
|
||||
string="Create Debit Note"
|
||||
class="btn-secondary"
|
||||
groups="account.group_account_user"
|
||||
invisible="state != 'posted' or move_type not in ('out_invoice', 'in_invoice')"
|
||||
data-hotkey="shift+d"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Show origin debit note link in Other Info -->
|
||||
<xpath expr="//page[@id='other_tab']//group[@name='accounting_info_group']" position="inside">
|
||||
<field name="fusion_debit_note_origin_id"
|
||||
invisible="not fusion_debit_note_origin_id"
|
||||
readonly="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================= -->
|
||||
<!-- Inter-Company Counter-Document Links on Invoice Form -->
|
||||
<!-- ================================================================= -->
|
||||
|
||||
<record id="view_move_form_intercompany_links" model="ir.ui.view">
|
||||
<field name="name">account.move.form.fusion.intercompany</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="priority" eval="62"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@id='other_tab']//group[@name='accounting_info_group']" position="inside">
|
||||
<field name="fusion_intercompany_move_id"
|
||||
invisible="not fusion_intercompany_move_id"
|
||||
readonly="1"
|
||||
string="IC Counter-Document"/>
|
||||
<field name="fusion_intercompany_source_id"
|
||||
invisible="not fusion_intercompany_source_id"
|
||||
readonly="1"
|
||||
string="IC Source Document"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================= -->
|
||||
<!-- Account Transfer Action (menu entry) -->
|
||||
<!-- ================================================================= -->
|
||||
|
||||
<record id="action_fusion_account_transfer" model="ir.actions.act_window">
|
||||
<field name="name">Account Transfer</field>
|
||||
<field name="res_model">fusion.account.transfer</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
<field name="context">{}</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fusion_account_transfer"
|
||||
name="Account Transfer"
|
||||
parent="account.menu_finance_entries"
|
||||
action="action_fusion_account_transfer"
|
||||
sequence="50"
|
||||
groups="account.group_account_user"/>
|
||||
|
||||
</odoo>
|
||||
469
Fusion Accounting/views/bank_rec_widget_views.xml
Normal file
469
Fusion Accounting/views/bank_rec_widget_views.xml
Normal file
@@ -0,0 +1,469 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="view_bank_statement_form_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.form.bank_rec_widget</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bank Statement">
|
||||
<div class="alert alert-warning text-center" role="alert" invisible="is_valid and is_complete">
|
||||
<field name="problem_description"/>
|
||||
</div>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_open_bank_reconcile_widget" type="object"
|
||||
class="oe_stat_button" invisible="not line_ids">
|
||||
<field name="line_ids" widget="statinfo" />
|
||||
</button>
|
||||
</div>
|
||||
<group>
|
||||
<field name="create_date" invisible="1"/>
|
||||
<field name="is_valid" invisible="1"/>
|
||||
<field name="is_complete" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="journal_id" invisible="1"/>
|
||||
<field name="name" required="1" />
|
||||
<field name="balance_start"/>
|
||||
<field name="balance_end_real"/>
|
||||
<field name="attachment_ids" widget="many2many_binary"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="o_attachment_preview"/>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_bank_statement_form_bank_rec_widget" model="ir.actions.act_window">
|
||||
<!-- Binding removed since the same can be achieved with multi-edit -->
|
||||
<field name="name">Create Statement</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_bank_statement_form_bank_rec_widget"/>
|
||||
<field name="target">new</field>
|
||||
<field name="context">{'dialog_size': 'medium', 'show_running_balance_latest': True}</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view on aml to be injected inside the form (view_bank_rec_widget_form) -->
|
||||
<record id="view_bank_statement_line_search_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.search.bank_rec_widget</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="priority">999</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"
|
||||
string="Transaction"
|
||||
filter_domain="['|', '|', '|', '|', '|', '|', ('payment_ref', 'ilike', self), ('narration', 'ilike', self), ('partner_id', 'ilike', self), ('partner_name', 'ilike', self), ('partner_bank_id', 'ilike', self), ('account_number', 'ilike', self), ('amount', 'ilike', self)]"/>
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="payment_ref"/>
|
||||
<field name="date"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="journal_id"
|
||||
domain="[('type', 'in', ('bank', 'cash'))]"
|
||||
invisible="context.get('default_journal_id')"/>
|
||||
<field name="narration" string="Notes"/>
|
||||
<field name="transaction_type"/>
|
||||
<field name="amount"/>
|
||||
<field name="is_reconciled"/>
|
||||
<field name="move_id"
|
||||
string="Journal Entry"
|
||||
filter_domain="['|', ('move_id.name', 'ilike', self), ('move_id.ref', 'ilike', self)]"/>
|
||||
<field name="statement_line_id" string="Statement Line"/>
|
||||
<separator/>
|
||||
<filter name="deposits" string="Deposits" domain="[('amount', '>', 0.0)]"/>
|
||||
<filter name="payments" string="Payments" domain="[('amount', '<', 0.0)]"/>
|
||||
<separator/>
|
||||
<filter name="no_statement" string="No statement" domain="[('statement_id', '=', False)]"/>
|
||||
<filter name="invalid_statement" string="Invalid statements"
|
||||
domain="['|',('statement_complete', '=', False), ('statement_valid', '=', False)]"/>
|
||||
<separator/>
|
||||
<filter name="matched" string="Matched" domain="[('is_reconciled', '=', True)]"/>
|
||||
<filter name="not_matched" string="Not Matched"
|
||||
domain="[('is_reconciled', '=', False), ('checked', '=', True)]"/>
|
||||
<filter name="to_check" string="To Check" domain="[('checked', '=', False)]"/>
|
||||
<separator/>
|
||||
<filter name="date" string="Date" date="date"/>
|
||||
<separator/>
|
||||
<filter name="statement_group" string="Statement" context="{'group_by': 'statement_id'}"/>
|
||||
<filter name="journal_group" string="Journal" context="{'group_by': 'journal_id'}"/>
|
||||
<filter name="date_group" string="Date" context="{'group_by': 'date'}"/>
|
||||
<filter name="invoice_date_group" string="Invoice Date" domain="[]" context="{'group_by': 'invoice_date'}"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Kanban view on statement line injected inside the form (view_bank_rec_widget) -->
|
||||
<record id="view_bank_statement_line_kanban_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.kanban.bank_rec_widget</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban js_class="bank_rec_widget_kanban"
|
||||
on_create="quick_create"
|
||||
quick_create_view="fusion_accounting.view_bank_statement_line_quick_create_form_bank_rec_widget">
|
||||
<field name="id"/>
|
||||
<field name="state"/>
|
||||
<field name="statement_complete"/>
|
||||
<field name="statement_valid"/>
|
||||
<field name="statement_balance_end_real"/>
|
||||
<field name="statement_name"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="is_reconciled"/>
|
||||
<field name="checked"/>
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<t t-name="card">
|
||||
<div t-if="!record.statement_id.raw_value"
|
||||
class="statement_separator text-center">
|
||||
<a role="button" class="btn btn-secondary btn-sm"
|
||||
context="{'split_line_id': id, 'default_journal_id': journal_id}"
|
||||
tabindex="-1"
|
||||
type="action" name="%(fusion_accounting.action_bank_statement_form_bank_rec_widget)d">
|
||||
Statement
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div t-att-st-line-id="record.id.raw_value"
|
||||
t-att-st-line-todo="!record.is_reconciled.raw_value || !record.checked.raw_value"
|
||||
style="width:100%">
|
||||
|
||||
<t t-set="text_amount_class"
|
||||
t-value="record.amount.raw_value < 0.0 and 'text-danger'"/>
|
||||
|
||||
<div class="d-flex">
|
||||
<!-- Row 1 -->
|
||||
<field name="date" class="fw-bolder" readonly="state in ['cancel', 'posted']"/>
|
||||
<field name="partner_id" class="flex-fill text-truncate ms-1 fst-italic ps-2"/>
|
||||
<div t-att-class="text_amount_class">
|
||||
<field name="amount" class="fw-bolder"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Row 2 -->
|
||||
<div class="d-flex">
|
||||
<field name="payment_ref" class="text-truncate flex-fill"/>
|
||||
<div class="m-1 d-flex flex-row flex-nowrap">
|
||||
<span t-if="!record.checked.raw_value" class="badge text-bg-warning fw-normal">To check</span>
|
||||
<div t-if="record.is_reconciled.raw_value" class="badge text-bg-success fw-normal" title="Matched">
|
||||
<i class="fa fa-check"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_line_tree_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.list.bank_rec_widget</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="top"
|
||||
multi_edit="1"
|
||||
js_class="bank_rec_list"
|
||||
decoration-muted="state == 'draft'"
|
||||
default_order="internal_index desc">
|
||||
<!--Invisible fields-->
|
||||
<field name="statement_complete" column_invisible="True"/>
|
||||
<field name="statement_valid" column_invisible="True"/>
|
||||
<field name="state" column_invisible="True"/>
|
||||
<field name="is_reconciled" column_invisible="True"/>
|
||||
<field name="checked" column_invisible="True"/>
|
||||
<field name="country_code" column_invisible="True"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
|
||||
<!--Visible fields-->
|
||||
<field name="sequence" widget="handle" column_invisible="True"/> <!--Until we add the JS class-->
|
||||
<field name="date" readonly="is_reconciled and amount != 0"
|
||||
options="{'warn_future': true}"/>
|
||||
<field name="move_id" optional="hidden" required="0"/>
|
||||
<field name="payment_ref" required="1" readonly="is_reconciled and amount != 0"/>
|
||||
<field name="partner_id" readonly="is_reconciled and amount != 0"/>
|
||||
<field name="account_number" optional="hidden"/>
|
||||
<field name="narration"
|
||||
string="Notes"
|
||||
readonly="is_reconciled and amount != 0"
|
||||
optional="hidden"/>
|
||||
<field name="ref" readonly="is_reconciled and amount != 0" optional="hidden"/>
|
||||
<field name="transaction_type" optional="hidden"/>
|
||||
<field name="foreign_currency_id"
|
||||
optional="hidden"
|
||||
groups="base.group_multi_currency"
|
||||
domain="[('id', '!=', currency_id)]"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
readonly="is_reconciled and amount != 0"/>
|
||||
<field name="amount_currency"
|
||||
optional="hidden"
|
||||
groups="base.group_multi_currency"
|
||||
invisible="not foreign_currency_id"
|
||||
readonly="is_reconciled and amount != 0"/>
|
||||
<field name="amount" readonly="is_reconciled and amount != 0" />
|
||||
<field name="journal_id"
|
||||
domain="[('type', 'in', ['bank','cash'])]"
|
||||
column_invisible="bool(context.get('default_journal_id'))"
|
||||
readonly="(statement_id or is_reconciled) and amount != 0"/>
|
||||
<field name="running_balance" class="oe_read_only"/>
|
||||
<field name="statement_id"
|
||||
optional="show"
|
||||
options="{'no_quick_create': True}"
|
||||
domain="['|',('journal_id', '=', journal_id),('journal_id', '=', False)]"
|
||||
context="{
|
||||
'default_journal_id':journal_id,
|
||||
'form_view_ref': 'fusion_accounting.view_bank_statement_form_bank_rec_widget',
|
||||
'st_line_id':id,
|
||||
}"
|
||||
decoration-danger="statement_complete == False or statement_valid == False"
|
||||
widget="bank_rec_list_many2one_multi_id"
|
||||
readonly="not id"/>
|
||||
<field name="id"
|
||||
widget="bank_rec_list_view_switcher"
|
||||
invisible="not id"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Form view for adding statement lines on the fly in a popup-->
|
||||
<record id="view_bank_statement_line_form_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.form.bank_rec_widget</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="New Transaction">
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="statement_complete" invisible="1"/>
|
||||
<field name="statement_valid" invisible="1"/>
|
||||
<field name="is_reconciled" invisible="1"/>
|
||||
<field name="suitable_journal_ids" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="date" readonly="is_reconciled and amount != 0"/>
|
||||
<field name="payment_ref"
|
||||
required="1"
|
||||
readonly="is_reconciled and amount != 0"/>
|
||||
<field name="partner_id"
|
||||
readonly="is_reconciled and amount != 0"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="amount" readonly="is_reconciled and amount != 0"/>
|
||||
<field name="foreign_currency_id"
|
||||
groups="base.group_multi_currency"
|
||||
domain="[('id', '!=', currency_id)]"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
readonly="is_reconciled and amount != 0"/>
|
||||
<field name="amount_currency"
|
||||
groups="base.group_multi_currency"
|
||||
invisible="not foreign_currency_id"
|
||||
readonly="is_reconciled and amount != 0"/>
|
||||
<field name="journal_id"
|
||||
domain="[('type', 'in', ['bank', 'cash'])]"
|
||||
readonly="context.get('default_journal_id') or (is_reconciled and amount != 0)"/>
|
||||
</group>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Save & Close" type="object"
|
||||
name="action_save_close" class="btn btn-primary"
|
||||
data-hotkey="q"/>
|
||||
<button string="Save & New" type="object"
|
||||
name="action_save_new" class="btn btn-primary"
|
||||
data-hotkey="n"/>
|
||||
<button string="Cancel" class="btn-secondary"
|
||||
special="cancel" data-hotkey="x"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Form view for quick creating statement lines -->
|
||||
<record id="view_bank_statement_line_quick_create_form_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.form.bank_rec_widget</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="New Transaction">
|
||||
<field name="journal_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<group>
|
||||
<field name="date" readonly="is_reconciled and amount != 0" nolabel="1"/>
|
||||
<field name="partner_id"
|
||||
readonly="is_reconciled and amount != 0"
|
||||
nolabel="1"
|
||||
placeholder="Partner"/>
|
||||
<field name="amount" readonly="is_reconciled and amount != 0" nolabel="1"/>
|
||||
</group>
|
||||
<field name="payment_ref"
|
||||
required="1"
|
||||
readonly="is_reconciled and amount != 0"
|
||||
nolabel="1"
|
||||
placeholder="Memo"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_bank_statement_line_form_bank_rec_widget" model="ir.actions.act_window">
|
||||
<field name="name">New Transaction</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_bank_statement_line_form_bank_rec_widget"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
The action record of Bank Reconciliation has a duplicate one below it with different view_mode (and path).
|
||||
This was needed because the function "_action_open_bank_reconciliation_widget" was expected to return 2
|
||||
different view_modes namely list,kanban and kanban,list depending on the boolean "kanban_first".
|
||||
The solution of changing the action dict was not useful because the dict view_mode would be erased on page refresh.
|
||||
-->
|
||||
<record id="action_bank_statement_line_transactions" model="ir.actions.act_window">
|
||||
<field name="name">Bank Reconciliation</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="view_mode">list,kanban</field>
|
||||
<field name="search_view_id" ref="view_bank_statement_line_search_bank_rec_widget"/>
|
||||
<field name="view_id" ref="view_bank_statement_line_tree_bank_rec_widget"/>
|
||||
<field name="path">reconciliation_list</field>
|
||||
<field name="domain">[('state', '!=', 'cancel')]</field>
|
||||
<field name="context">{'default_journal_id': active_id, 'search_default_journal_id': active_id}</field>
|
||||
<field name="help" type="html">
|
||||
<p class='o_view_nocontent_smiling_face'>Nothing to do here!</p>
|
||||
<p>No transactions matching your filters were found.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_bank_statement_line_transactions_kanban" model="ir.actions.act_window">
|
||||
<field name="name">Bank Reconciliation</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="view_mode">kanban,list</field>
|
||||
<field name="search_view_id" ref="view_bank_statement_line_search_bank_rec_widget"/>
|
||||
<field name="view_id" ref="view_bank_statement_line_kanban_bank_rec_widget"/>
|
||||
<field name="path">reconciliation</field>
|
||||
<field name="domain">[('state', '!=', 'cancel')]</field>
|
||||
<field name="context">{'default_journal_id': active_id, 'search_default_journal_id': active_id}</field>
|
||||
<field name="help" type="html">
|
||||
<p class='o_view_nocontent_smiling_face'>Nothing to do here!</p>
|
||||
<p>No transactions matching your filters were found.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_form_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.move.form.bank_rec_widget</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="priority">999</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view on aml to be injected inside the form (view_bank_rec_widget_form) -->
|
||||
<record id="view_account_move_line_search_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.move.line.search.bank_rec_widget</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="priority">999</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"
|
||||
string="Journal Item"
|
||||
filter_domain="['|', '|', '|', '|', '|', ('name', 'ilike', self), ('ref', 'ilike', self), ('partner_id', 'ilike', self), ('amount_residual', 'ilike', self), ('amount_residual_currency', 'ilike', self), ('discount_amount_currency', 'ilike', self)]"/>
|
||||
<field name="invoice_date"/>
|
||||
<field name="date"/>
|
||||
<field name="account_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<field name="move_id"
|
||||
string="Journal Entry"
|
||||
filter_domain="['|', ('move_id.name', 'ilike', self), ('move_id.ref', 'ilike', self)]"/>
|
||||
<separator/>
|
||||
<filter name="amount_received" string="Incoming" domain="[('balance', '>', 0.0)]"/>
|
||||
<filter name="amount_paid" string="Outgoing" domain="[('balance', '<', 0.0)]"/>
|
||||
<separator name="inject_after"/>
|
||||
<filter name="date" string="Date" date="date"/>
|
||||
<filter name="invoice_date" string="Invoice Date" date="invoice_date"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- List view on aml to be injected inside the form (view_bank_rec_widget_form) -->
|
||||
<record id="view_account_move_line_list_bank_rec_widget" model="ir.ui.view">
|
||||
<field name="name">account.move.line.list.bank_rec_widget</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="priority">999</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Suggestions"
|
||||
create="false"
|
||||
edit="false"
|
||||
limit="40"
|
||||
count_limit="40"
|
||||
js_class="bank_rec_amls_list_view">
|
||||
<!-- Invisible fields -->
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="payment_id" column_invisible="True"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="company_currency_id" column_invisible="True"/>
|
||||
|
||||
<field name="account_id"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
groups="account.group_account_readonly"
|
||||
optional="show"/>
|
||||
<field name="journal_id"
|
||||
optional="hidden"/>
|
||||
<field name="partner_id"
|
||||
optional="show"/>
|
||||
<field name="invoice_date" string="Invoice Date" optional="hide"/>
|
||||
<field name="date"/>
|
||||
<field name="move_id" string="Document" groups="!account.group_account_readonly"/>
|
||||
<field name="move_id" groups="account.group_account_readonly"/>
|
||||
<field name="name"/>
|
||||
<field name="date_maturity" optional="hidden"/>
|
||||
<field name="ref"
|
||||
optional="hidden"/>
|
||||
<field name="analytic_distribution" widget="analytic_distribution"
|
||||
groups="analytic.group_analytic_accounting"
|
||||
optional="hidden"
|
||||
options="{'account_field': 'account_id', 'business_domain': 'general'}"/>
|
||||
<field name="amount_residual_currency"
|
||||
decoration-danger="amount_residual_currency < 0"
|
||||
groups="base.group_multi_currency"
|
||||
string="Amount Due (in currency)"/>
|
||||
<field name="amount_residual"
|
||||
decoration-danger="amount_residual < 0"
|
||||
string="Amount Due"/>
|
||||
|
||||
<button name="action_open_business_doc"
|
||||
type="object"
|
||||
string="View"
|
||||
class="btn btn-sm btn-secondary"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Add bank recon widget to the statements list view -->
|
||||
<record id="view_bank_statement_tree" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.list</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<list position="inside">
|
||||
<button name="action_open_bank_reconcile_widget" string="Transactions" type="object"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.server" id="action_bank_statement_attachment">
|
||||
<field name="name">Statement</field>
|
||||
<field name="model_id" ref="model_account_bank_statement"/>
|
||||
<field name="binding_model_id" ref="model_account_bank_statement" />
|
||||
<field name="binding_type">report</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.action_generate_attachment()
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
208
Fusion Accounting/views/batch_payment_views.xml
Normal file
208
Fusion Accounting/views/batch_payment_views.xml
Normal file
@@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Fusion Batch Payment - List View -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="fusion_batch_payment_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.batch.payment.list</field>
|
||||
<field name="model">fusion.batch.payment</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Batch Payments"
|
||||
decoration-info="state == 'draft'"
|
||||
decoration-success="state == 'reconciled'"
|
||||
decoration-warning="state == 'sent'">
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="payment_method_id"/>
|
||||
<field name="payment_count" string="# Payments"/>
|
||||
<field name="amount_total" sum="Total"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-info="state == 'draft'"
|
||||
decoration-success="state == 'reconciled'"
|
||||
decoration-warning="state == 'sent'"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Fusion Batch Payment - Form View -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="fusion_batch_payment_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.batch.payment.form</field>
|
||||
<field name="model">fusion.batch.payment</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Batch Payment">
|
||||
<header>
|
||||
<button name="validate_batch"
|
||||
string="Validate"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state != 'draft'"/>
|
||||
<button name="action_draft"
|
||||
string="Reset to Draft"
|
||||
type="object"
|
||||
invisible="state != 'sent'"/>
|
||||
<button name="action_reconcile"
|
||||
string="Mark Reconciled"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state != 'sent'"/>
|
||||
<button name="print_batch"
|
||||
string="Print"
|
||||
type="object"
|
||||
invisible="state == 'draft'"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,sent,reconciled"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" readonly="True"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="journal_id"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="payment_method_id"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="date"
|
||||
readonly="state != 'draft'"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="amount_total"/>
|
||||
<field name="payment_count"/>
|
||||
<field name="currency_id" invisible="True"/>
|
||||
<field name="company_id" invisible="True"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Payments" name="payments">
|
||||
<field name="payment_ids"
|
||||
readonly="state != 'draft'"
|
||||
widget="many2many"
|
||||
domain="[('journal_id', '=', journal_id), ('state', '=', 'posted')]">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="date"/>
|
||||
<field name="amount"/>
|
||||
<field name="currency_id"
|
||||
column_invisible="True"/>
|
||||
<field name="state" widget="badge"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Fusion Batch Payment - Kanban View -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="fusion_batch_payment_view_kanban" model="ir.ui.view">
|
||||
<field name="name">fusion.batch.payment.kanban</field>
|
||||
<field name="model">fusion.batch.payment</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" sample="1">
|
||||
<templates>
|
||||
<t t-name="card">
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<strong>
|
||||
<field name="name"/>
|
||||
</strong>
|
||||
<field name="state" widget="label_selection"
|
||||
options="{'classes': {
|
||||
'draft': 'info',
|
||||
'sent': 'warning',
|
||||
'reconciled': 'success'
|
||||
}}"/>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between text-muted">
|
||||
<span><field name="date"/></span>
|
||||
<span>
|
||||
<field name="payment_count"/> payments
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between mt-2">
|
||||
<field name="journal_id"/>
|
||||
<strong>
|
||||
<field name="amount_total"
|
||||
widget="monetary"/>
|
||||
</strong>
|
||||
</div>
|
||||
<field name="currency_id" invisible="True"/>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Fusion Batch Payment - Search View -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="fusion_batch_payment_view_search" model="ir.ui.view">
|
||||
<field name="name">fusion.batch.payment.search</field>
|
||||
<field name="model">fusion.batch.payment</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Batch Payments">
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="payment_method_id"/>
|
||||
<separator/>
|
||||
<filter string="Draft" name="draft"
|
||||
domain="[('state', '=', 'draft')]"/>
|
||||
<filter string="Sent" name="sent"
|
||||
domain="[('state', '=', 'sent')]"/>
|
||||
<filter string="Reconciled" name="reconciled"
|
||||
domain="[('state', '=', 'reconciled')]"/>
|
||||
<separator/>
|
||||
<group>
|
||||
<filter string="Journal" name="group_journal"
|
||||
context="{'group_by': 'journal_id'}"/>
|
||||
<filter string="Status" name="group_state"
|
||||
context="{'group_by': 'state'}"/>
|
||||
<filter string="Date" name="group_date"
|
||||
context="{'group_by': 'date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Action -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="fusion_batch_payment_action" model="ir.actions.act_window">
|
||||
<field name="name">Batch Payments</field>
|
||||
<field name="res_model">fusion.batch.payment</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="search_view_id" ref="fusion_batch_payment_view_search"/>
|
||||
<field name="context">{'search_default_draft': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first batch payment
|
||||
</p>
|
||||
<p>
|
||||
Group multiple payments together for bulk processing
|
||||
and streamlined bank submission.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Menu Item: Accounting > Vendors > Batch Payments -->
|
||||
<!-- ============================================================ -->
|
||||
<menuitem id="menu_fusion_batch_payment"
|
||||
name="Batch Payments"
|
||||
parent="account.menu_finance_payables"
|
||||
action="fusion_batch_payment_action"
|
||||
sequence="30"
|
||||
groups="account.group_account_user"/>
|
||||
|
||||
</odoo>
|
||||
14
Fusion Accounting/views/digest_views.xml
Normal file
14
Fusion Accounting/views/digest_views.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<odoo>
|
||||
<record id="digest_digest_view_form" model="ir.ui.view">
|
||||
<field name="name">digest.digest.view.form.inherit.account.accountant</field>
|
||||
<field name="model">digest.digest</field>
|
||||
<field name="priority">35</field>
|
||||
<field name="inherit_id" ref="digest.digest_digest_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='kpi_account_total_revenue']" position="after">
|
||||
<field name="kpi_account_bank_cash"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
184
Fusion Accounting/views/document_extraction_views.xml
Normal file
184
Fusion Accounting/views/document_extraction_views.xml
Normal file
@@ -0,0 +1,184 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- =============================================================
|
||||
Fusion Document Extractor – List View
|
||||
============================================================= -->
|
||||
<record id="fusion_document_extractor_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.document.extractor.list</field>
|
||||
<field name="model">fusion.document.extractor</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Document Extraction Providers"
|
||||
editable="bottom"
|
||||
decoration-muted="not is_active">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="provider"/>
|
||||
<field name="tesseract_lang"
|
||||
optional="hide"
|
||||
column_invisible="True"/>
|
||||
<field name="api_endpoint" optional="hide"/>
|
||||
<field name="is_active" widget="boolean_toggle"/>
|
||||
<field name="company_id"
|
||||
optional="show"
|
||||
groups="base.group_multi_company"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fusion Document Extractor – Form View
|
||||
============================================================= -->
|
||||
<record id="fusion_document_extractor_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.document.extractor.form</field>
|
||||
<field name="model">fusion.document.extractor</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Document Extraction Provider">
|
||||
<header>
|
||||
<button name="action_test_connection"
|
||||
string="Test Connection"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
icon="fa-plug"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<field name="is_active" widget="boolean_button"
|
||||
options="{'terminology': 'active'}"/>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. Production OCR"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Provider Settings">
|
||||
<field name="provider" widget="radio"/>
|
||||
<field name="sequence"/>
|
||||
<field name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group string="Credentials">
|
||||
<field name="api_key"
|
||||
password="True"
|
||||
invisible="provider == 'tesseract'"
|
||||
required="provider in ('google_vision', 'azure_ai')"/>
|
||||
<field name="api_endpoint"
|
||||
invisible="provider != 'azure_ai'"
|
||||
required="provider == 'azure_ai'"
|
||||
placeholder="https://your-resource.cognitiveservices.azure.com"/>
|
||||
<field name="tesseract_lang"
|
||||
invisible="provider != 'tesseract'"/>
|
||||
</group>
|
||||
</group>
|
||||
<div class="alert alert-info" role="alert"
|
||||
invisible="provider != 'tesseract'">
|
||||
<p class="mb-0">
|
||||
<i class="fa fa-info-circle"/> Tesseract runs locally on
|
||||
the server. Make sure the <code>tesseract</code> binary
|
||||
and the <code>pytesseract</code> Python package are
|
||||
installed. No internet connection is required.
|
||||
</p>
|
||||
</div>
|
||||
<div class="alert alert-info" role="alert"
|
||||
invisible="provider != 'google_vision'">
|
||||
<p class="mb-0">
|
||||
<i class="fa fa-info-circle"/> Paste your Google Cloud
|
||||
API key above. Ensure the <em>Cloud Vision API</em> is
|
||||
enabled in your GCP project.
|
||||
</p>
|
||||
</div>
|
||||
<div class="alert alert-info" role="alert"
|
||||
invisible="provider != 'azure_ai'">
|
||||
<p class="mb-0">
|
||||
<i class="fa fa-info-circle"/> Enter your Azure AI
|
||||
Document Intelligence endpoint URL and subscription key.
|
||||
The <em>prebuilt-invoice</em> model is used automatically.
|
||||
</p>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fusion Document Extractor – Action
|
||||
============================================================= -->
|
||||
<record id="fusion_document_extractor_action" model="ir.actions.act_window">
|
||||
<field name="name">Document Extraction</field>
|
||||
<field name="res_model">fusion.document.extractor</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Configure a Document AI extraction provider
|
||||
</p>
|
||||
<p>
|
||||
Set up Tesseract (local), Google Cloud Vision, or Azure AI
|
||||
Document Intelligence to automatically extract invoice data
|
||||
from scanned documents.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Menu Item: Accounting > Configuration > Document Extraction
|
||||
============================================================= -->
|
||||
<menuitem id="fusion_menu_document_extraction"
|
||||
name="Document Extraction"
|
||||
parent="account.menu_finance_configuration"
|
||||
action="fusion_document_extractor_action"
|
||||
sequence="100"
|
||||
groups="account.group_account_manager"/>
|
||||
|
||||
<!-- =============================================================
|
||||
Extend Invoice / Bill Form – Add Extract Button & OCR Fields
|
||||
============================================================= -->
|
||||
<record id="fusion_account_move_extraction_form" model="ir.ui.view">
|
||||
<field name="name">account.move.form.fusion.extraction</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Add Extract button in the header -->
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="action_extract_from_attachment"
|
||||
string="Extract from Scan"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
icon="fa-magic"
|
||||
invisible="state != 'draft'"
|
||||
groups="account.group_account_invoice"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Add OCR status and confidence fields after the main header group -->
|
||||
<xpath expr="//page[@name='other_info']" position="inside">
|
||||
<group string="Document Extraction (OCR)" name="fusion_ocr_group">
|
||||
<group>
|
||||
<field name="fusion_extraction_status"
|
||||
widget="badge"
|
||||
decoration-info="fusion_extraction_status == 'to_extract'"
|
||||
decoration-warning="fusion_extraction_status == 'extracting'"
|
||||
decoration-success="fusion_extraction_status == 'done'"
|
||||
decoration-danger="fusion_extraction_status == 'failed'"
|
||||
readonly="1"/>
|
||||
<field name="fusion_extraction_confidence"
|
||||
widget="progressbar"
|
||||
readonly="1"
|
||||
invisible="not fusion_extraction_status"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="fusion_extractor_id"
|
||||
readonly="1"
|
||||
invisible="not fusion_extractor_id"/>
|
||||
</group>
|
||||
<field name="fusion_ocr_raw_text"
|
||||
readonly="1"
|
||||
invisible="not fusion_ocr_raw_text"
|
||||
nolabel="1"
|
||||
colspan="2"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
362
Fusion Accounting/views/edi_views.xml
Normal file
362
Fusion Accounting/views/edi_views.xml
Normal file
@@ -0,0 +1,362 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- =============================================================
|
||||
Fusion EDI Document – List View
|
||||
============================================================= -->
|
||||
<record id="fusion_edi_document_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.edi.document.list</field>
|
||||
<field name="model">fusion.edi.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="EDI Documents"
|
||||
decoration-danger="blocking_level == 'error'"
|
||||
decoration-warning="blocking_level == 'warning'"
|
||||
decoration-muted="state == 'cancelled'">
|
||||
<field name="move_name" string="Invoice"/>
|
||||
<field name="edi_format_id"/>
|
||||
<field name="partner_id" optional="show"/>
|
||||
<field name="state"
|
||||
widget="badge"
|
||||
decoration-info="state == 'to_send'"
|
||||
decoration-success="state == 'sent'"
|
||||
decoration-warning="state == 'to_cancel'"
|
||||
decoration-muted="state == 'cancelled'"/>
|
||||
<field name="blocking_level" column_invisible="True"/>
|
||||
<field name="error_message" optional="hide"/>
|
||||
<field name="create_date" string="Created" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fusion EDI Document – Form View
|
||||
============================================================= -->
|
||||
<record id="fusion_edi_document_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.edi.document.form</field>
|
||||
<field name="model">fusion.edi.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="EDI Document">
|
||||
<header>
|
||||
<button name="action_send"
|
||||
string="Generate & Send"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state != 'to_send'"/>
|
||||
<button name="action_cancel"
|
||||
string="Cancel"
|
||||
type="object"
|
||||
invisible="state not in ('sent', 'to_cancel')"
|
||||
confirm="Are you sure you want to cancel this EDI document?"/>
|
||||
<button name="action_retry"
|
||||
string="Retry"
|
||||
type="object"
|
||||
class="btn-warning"
|
||||
invisible="not error_message"/>
|
||||
<field name="state"
|
||||
widget="statusbar"
|
||||
statusbar_visible="to_send,sent,cancelled"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_alert oe_alert_warning"
|
||||
invisible="not error_message">
|
||||
<strong>Error: </strong>
|
||||
<field name="error_message" nolabel="1"/>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Document">
|
||||
<field name="move_id"/>
|
||||
<field name="edi_format_id"/>
|
||||
<field name="attachment_id" filename="display_name"/>
|
||||
</group>
|
||||
<group string="Details">
|
||||
<field name="partner_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="blocking_level" invisible="not error_message"/>
|
||||
<field name="create_date" string="Created On"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fusion EDI Document – Search View
|
||||
============================================================= -->
|
||||
<record id="fusion_edi_document_view_search" model="ir.ui.view">
|
||||
<field name="name">fusion.edi.document.search</field>
|
||||
<field name="model">fusion.edi.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="EDI Documents">
|
||||
<field name="move_name" string="Invoice"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="edi_format_id"/>
|
||||
<separator/>
|
||||
<filter name="to_send" string="To Send"
|
||||
domain="[('state', '=', 'to_send')]"/>
|
||||
<filter name="sent" string="Sent"
|
||||
domain="[('state', '=', 'sent')]"/>
|
||||
<filter name="errors" string="With Errors"
|
||||
domain="[('error_message', '!=', False)]"/>
|
||||
<separator/>
|
||||
<group>
|
||||
<filter name="group_format" string="Format"
|
||||
context="{'group_by': 'edi_format_id'}"/>
|
||||
<filter name="group_state" string="Status"
|
||||
context="{'group_by': 'state'}"/>
|
||||
<filter name="group_partner" string="Partner"
|
||||
context="{'group_by': 'partner_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fusion EDI Document – Action
|
||||
============================================================= -->
|
||||
<record id="fusion_edi_document_action" model="ir.actions.act_window">
|
||||
<field name="name">EDI Documents</field>
|
||||
<field name="res_model">fusion.edi.document</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="fusion_edi_document_view_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No EDI documents yet
|
||||
</p>
|
||||
<p>
|
||||
EDI documents are automatically created when you send
|
||||
invoices electronically. You can also generate them
|
||||
manually from the invoice form.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
Fusion EDI Format – List View
|
||||
============================================================= -->
|
||||
<record id="fusion_edi_format_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.edi.format.list</field>
|
||||
<field name="model">fusion.edi.format</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="EDI Formats" editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="applicable_to"/>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fusion EDI Format – Form View
|
||||
============================================================= -->
|
||||
<record id="fusion_edi_format_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.edi.format.form</field>
|
||||
<field name="model">fusion.edi.format</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="EDI Format">
|
||||
<sheet>
|
||||
<group>
|
||||
<group string="General">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="applicable_to"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group string="Options">
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Description">
|
||||
<field name="description" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fusion EDI Format – Action
|
||||
============================================================= -->
|
||||
<record id="fusion_edi_format_action" model="ir.actions.act_window">
|
||||
<field name="name">EDI Formats</field>
|
||||
<field name="res_model">fusion.edi.format</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Configure EDI formats
|
||||
</p>
|
||||
<p>
|
||||
Define the electronic document interchange formats your
|
||||
company supports, such as UBL 2.1 or Factur-X.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
Menu Items
|
||||
============================================================= -->
|
||||
<menuitem id="menu_edi_root"
|
||||
name="EDI"
|
||||
parent="account.account_account_menu"
|
||||
sequence="90"/>
|
||||
|
||||
<menuitem id="menu_edi_formats"
|
||||
name="EDI Formats"
|
||||
parent="menu_edi_root"
|
||||
action="fusion_edi_format_action"
|
||||
sequence="10"
|
||||
groups="account.group_account_manager"/>
|
||||
|
||||
<menuitem id="menu_edi_documents"
|
||||
name="EDI Documents"
|
||||
parent="menu_edi_root"
|
||||
action="fusion_edi_document_action"
|
||||
sequence="20"
|
||||
groups="account.group_account_user"/>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
Account Move – Inherit form to add EDI tab & buttons
|
||||
============================================================= -->
|
||||
<record id="view_move_form_edi_inherit" model="ir.ui.view">
|
||||
<field name="name">account.move.form.edi.inherit</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- EDI stat button in the button box -->
|
||||
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
|
||||
<field name="edi_document_count" invisible="1"/>
|
||||
<button name="action_view_edi_documents"
|
||||
class="oe_stat_button"
|
||||
icon="fa-file-code-o"
|
||||
type="object"
|
||||
invisible="edi_document_count == 0">
|
||||
<field name="edi_document_count"
|
||||
string="EDI Docs"
|
||||
widget="statinfo"/>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<!-- EDI action buttons in the header -->
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="action_send_edi"
|
||||
string="Send EDI"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="state != 'posted'"
|
||||
groups="account.group_account_invoice"/>
|
||||
<button name="action_export_edi_xml"
|
||||
string="Export XML"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="edi_document_count == 0"
|
||||
groups="account.group_account_invoice"/>
|
||||
</xpath>
|
||||
|
||||
<!-- EDI tab after existing notebook pages -->
|
||||
<xpath expr="//page[@id='other_tab']" position="after">
|
||||
<page id="edi_tab" string="EDI"
|
||||
invisible="edi_document_count == 0">
|
||||
<div class="oe_alert oe_alert_warning"
|
||||
invisible="not edi_error_message"
|
||||
style="margin-bottom: 8px;">
|
||||
<field name="edi_blocking_level" invisible="1"/>
|
||||
<strong>EDI Error: </strong>
|
||||
<field name="edi_error_message" nolabel="1"/>
|
||||
</div>
|
||||
<field name="edi_state" invisible="1"/>
|
||||
<field name="edi_document_ids" nolabel="1" readonly="1">
|
||||
<list decoration-danger="blocking_level == 'error'"
|
||||
decoration-warning="blocking_level == 'warning'"
|
||||
decoration-muted="state == 'cancelled'">
|
||||
<field name="edi_format_id" string="Format"/>
|
||||
<field name="state"
|
||||
widget="badge"
|
||||
decoration-info="state == 'to_send'"
|
||||
decoration-success="state == 'sent'"
|
||||
decoration-warning="state == 'to_cancel'"
|
||||
decoration-muted="state == 'cancelled'"/>
|
||||
<field name="attachment_id" string="File"/>
|
||||
<field name="blocking_level" column_invisible="True"/>
|
||||
<field name="error_message" optional="hide"/>
|
||||
<button name="action_send"
|
||||
string="Send"
|
||||
type="object"
|
||||
icon="fa-paper-plane"
|
||||
invisible="state != 'to_send'"/>
|
||||
<button name="action_retry"
|
||||
string="Retry"
|
||||
type="object"
|
||||
icon="fa-refresh"
|
||||
invisible="not error_message"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
EDI Import Wizard – Form View
|
||||
============================================================= -->
|
||||
<record id="fusion_edi_import_wizard_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.edi.import.wizard.form</field>
|
||||
<field name="model">fusion.edi.import.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Import EDI Invoice">
|
||||
<group>
|
||||
<field name="xml_file" filename="xml_filename"/>
|
||||
<field name="xml_filename" invisible="1"/>
|
||||
<field name="move_type"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="action_import"
|
||||
string="Import"
|
||||
type="object"
|
||||
class="btn-primary"/>
|
||||
<button string="Cancel" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="fusion_edi_import_wizard_action" model="ir.actions.act_window">
|
||||
<field name="name">Import EDI Invoice</field>
|
||||
<field name="res_model">fusion.edi.import.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
EDI Format – Seed Data (default formats)
|
||||
============================================================= -->
|
||||
<record id="edi_format_ubl_21" model="fusion.edi.format" forcecreate="0">
|
||||
<field name="name">UBL 2.1</field>
|
||||
<field name="code">ubl_21</field>
|
||||
<field name="applicable_to">both</field>
|
||||
<field name="sequence">10</field>
|
||||
<field name="description">OASIS Universal Business Language 2.1 – generates Invoice and CreditNote XML documents conforming to the UBL 2.1 specification. Widely used for Peppol e-invoicing across Europe and beyond.</field>
|
||||
</record>
|
||||
|
||||
<record id="edi_format_cii" model="fusion.edi.format" forcecreate="0">
|
||||
<field name="name">UN/CEFACT CII</field>
|
||||
<field name="code">cii</field>
|
||||
<field name="applicable_to">both</field>
|
||||
<field name="sequence">20</field>
|
||||
<field name="description">UN/CEFACT Cross-Industry Invoice – generates CrossIndustryInvoice XML documents. Used as the basis for Factur-X / ZUGFeRD hybrid PDF invoices in France and Germany.</field>
|
||||
</record>
|
||||
|
||||
<record id="edi_format_facturx" model="fusion.edi.format" forcecreate="0">
|
||||
<field name="name">Factur-X (CII)</field>
|
||||
<field name="code">facturx</field>
|
||||
<field name="applicable_to">both</field>
|
||||
<field name="sequence">30</field>
|
||||
<field name="description">Factur-X / ZUGFeRD profile – generates CII XML and can embed it into a PDF/A-3 container for hybrid human/machine-readable invoices. Supports Minimum, Basic, and EN 16931 profiles.</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
243
Fusion Accounting/views/external_tax_views.xml
Normal file
243
Fusion Accounting/views/external_tax_views.xml
Normal file
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- External Tax Provider - Form View -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="fusion_external_tax_provider_form" model="ir.ui.view">
|
||||
<field name="name">fusion.external.tax.provider.form</field>
|
||||
<field name="model">fusion.external.tax.provider</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="External Tax Provider">
|
||||
<header>
|
||||
<button name="action_test_connection"
|
||||
string="Test Connection"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
icon="fa-plug"
|
||||
confirm="This will attempt to connect to the external tax service. Continue?"/>
|
||||
<button name="action_activate"
|
||||
string="Activate"
|
||||
type="object"
|
||||
class="btn-success"
|
||||
invisible="is_active"
|
||||
icon="fa-check-circle"/>
|
||||
<button name="action_deactivate"
|
||||
string="Deactivate"
|
||||
type="object"
|
||||
class="btn-warning"
|
||||
invisible="not is_active"
|
||||
icon="fa-times-circle"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,test"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" title="Active"
|
||||
bg_color="text-bg-success"
|
||||
invisible="not is_active"/>
|
||||
<widget name="web_ribbon" title="Inactive"
|
||||
bg_color="text-bg-secondary"
|
||||
invisible="is_active"/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. AvaTax Production"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group string="General">
|
||||
<field name="code"/>
|
||||
<field name="provider_type"/>
|
||||
<field name="company_id"
|
||||
options="{'no_create': True}"
|
||||
groups="base.group_multi_company"/>
|
||||
<field name="sequence"/>
|
||||
<field name="is_active" invisible="1"/>
|
||||
</group>
|
||||
<group string="Connection">
|
||||
<field name="api_url" widget="url"/>
|
||||
<field name="api_key" password="True"/>
|
||||
<field name="log_requests"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<!-- AvaTax-Specific Configuration -->
|
||||
<group string="Avalara AvaTax Configuration"
|
||||
invisible="provider_type != 'avatax'">
|
||||
<group>
|
||||
<field name="avatax_account_number"/>
|
||||
<field name="avatax_license_key" password="True"/>
|
||||
<field name="avatax_company_code"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="avatax_environment" widget="radio"/>
|
||||
<field name="avatax_commit_on_post"/>
|
||||
<field name="avatax_address_validation"/>
|
||||
<field name="avatax_default_tax_code"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<!-- Last Test Result -->
|
||||
<group string="Diagnostics"
|
||||
invisible="state == 'draft'">
|
||||
<field name="last_test_message"
|
||||
readonly="1"
|
||||
widget="text"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- External Tax Provider - List View -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="fusion_external_tax_provider_list" model="ir.ui.view">
|
||||
<field name="name">fusion.external.tax.provider.list</field>
|
||||
<field name="model">fusion.external.tax.provider</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="External Tax Providers"
|
||||
decoration-success="is_active"
|
||||
decoration-muted="not is_active">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="provider_type"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="is_active" widget="boolean_toggle"/>
|
||||
<field name="state"
|
||||
widget="badge"
|
||||
decoration-success="state == 'test'"
|
||||
decoration-danger="state == 'error'"
|
||||
decoration-info="state == 'draft'"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- External Tax Provider - Search View -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="fusion_external_tax_provider_search" model="ir.ui.view">
|
||||
<field name="name">fusion.external.tax.provider.search</field>
|
||||
<field name="model">fusion.external.tax.provider</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Tax Providers">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="company_id"/>
|
||||
<filter name="filter_active"
|
||||
string="Active"
|
||||
domain="[('is_active', '=', True)]"/>
|
||||
<filter name="filter_inactive"
|
||||
string="Inactive"
|
||||
domain="[('is_active', '=', False)]"/>
|
||||
<separator/>
|
||||
<filter name="filter_avatax"
|
||||
string="AvaTax"
|
||||
domain="[('provider_type', '=', 'avatax')]"/>
|
||||
<separator/>
|
||||
<filter name="filter_test_passed"
|
||||
string="Test Passed"
|
||||
domain="[('state', '=', 'test')]"/>
|
||||
<filter name="filter_error"
|
||||
string="Connection Error"
|
||||
domain="[('state', '=', 'error')]"/>
|
||||
<group>
|
||||
<filter name="group_company"
|
||||
string="Company"
|
||||
context="{'group_by': 'company_id'}"/>
|
||||
<filter name="group_type"
|
||||
string="Provider Type"
|
||||
context="{'group_by': 'provider_type'}"/>
|
||||
<filter name="group_state"
|
||||
string="State"
|
||||
context="{'group_by': 'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- External Tax Provider - Action -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="fusion_external_tax_provider_action" model="ir.actions.act_window">
|
||||
<field name="name">External Tax Providers</field>
|
||||
<field name="res_model">fusion.external.tax.provider</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="fusion_external_tax_provider_search"/>
|
||||
<field name="context">{'search_default_filter_active': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Configure your first external tax provider
|
||||
</p>
|
||||
<p>
|
||||
External tax providers integrate with services like Avalara AvaTax
|
||||
to automatically compute taxes on invoices based on jurisdiction,
|
||||
product type, and customer exemption status.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- Menu Item: Accounting > Configuration > External Tax Providers -->
|
||||
<!-- ================================================================== -->
|
||||
<menuitem id="menu_fusion_external_tax_providers"
|
||||
name="External Tax Providers"
|
||||
parent="account.account_account_menu"
|
||||
action="fusion_external_tax_provider_action"
|
||||
sequence="25"
|
||||
groups="account.group_account_manager"/>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- Invoice Form Extension - External Tax Status -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_move_form_external_tax" model="ir.ui.view">
|
||||
<field name="name">account.move.form.external.tax</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="priority">50</field>
|
||||
<field name="arch" type="xml">
|
||||
<!-- External tax status in the button box -->
|
||||
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
|
||||
<field name="fusion_is_tax_computed_externally" invisible="1"/>
|
||||
<field name="fusion_use_external_tax" invisible="1"/>
|
||||
<button name="action_compute_external_taxes"
|
||||
class="oe_stat_button"
|
||||
icon="fa-calculator"
|
||||
type="object"
|
||||
invisible="not fusion_use_external_tax or state == 'posted'"
|
||||
string="Compute Tax"
|
||||
title="Compute taxes via external provider"
|
||||
groups="account.group_account_invoice"/>
|
||||
<button class="oe_stat_button"
|
||||
icon="fa-check-circle text-success"
|
||||
invisible="not fusion_is_tax_computed_externally"
|
||||
disabled="1">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">External Tax</span>
|
||||
<span class="o_stat_text text-success">Computed</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<!-- External tax fields in Other Info tab -->
|
||||
<xpath expr="//page[@id='other_tab']//group[@name='accounting_info_group']" position="inside">
|
||||
<field name="fusion_tax_provider_id"
|
||||
readonly="1"
|
||||
invisible="not fusion_is_tax_computed_externally"/>
|
||||
<field name="fusion_external_doc_code"
|
||||
readonly="1"
|
||||
invisible="not fusion_is_tax_computed_externally"/>
|
||||
<field name="fusion_external_tax_amount"
|
||||
readonly="1"
|
||||
invisible="not fusion_is_tax_computed_externally"/>
|
||||
<field name="fusion_external_tax_date"
|
||||
readonly="1"
|
||||
invisible="not fusion_is_tax_computed_externally"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
423
Fusion Accounting/views/fiscal_compliance_views.xml
Normal file
423
Fusion Accounting/views/fiscal_compliance_views.xml
Normal file
@@ -0,0 +1,423 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- =============================================================
|
||||
Fiscal Category – List View
|
||||
============================================================= -->
|
||||
<record id="fusion_fiscal_category_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.fiscal.category.list</field>
|
||||
<field name="model">fusion.fiscal.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Fiscal Categories" editable="bottom"
|
||||
decoration-muted="not active">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="category_type"/>
|
||||
<field name="account_count" string="# Accounts"/>
|
||||
<field name="parent_id" optional="show"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="active" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fiscal Category – Form View
|
||||
============================================================= -->
|
||||
<record id="fusion_fiscal_category_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.fiscal.category.form</field>
|
||||
<field name="model">fusion.fiscal.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Fiscal Category">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. Operating Revenue"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Classification">
|
||||
<field name="code"/>
|
||||
<field name="category_type"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group string="Company">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="account_count"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Accounts" name="accounts">
|
||||
<field name="account_ids">
|
||||
<list>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="account_type"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Sub-categories" name="children">
|
||||
<field name="child_ids">
|
||||
<list>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="category_type"/>
|
||||
<field name="account_count"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Notes" name="notes">
|
||||
<field name="description"
|
||||
placeholder="Internal notes about this fiscal category..."/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fiscal Category – Search View
|
||||
============================================================= -->
|
||||
<record id="fusion_fiscal_category_view_search" model="ir.ui.view">
|
||||
<field name="name">fusion.fiscal.category.search</field>
|
||||
<field name="model">fusion.fiscal.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Fiscal Categories">
|
||||
<field name="name" string="Name / Code"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]"/>
|
||||
<separator/>
|
||||
<filter name="filter_income" string="Income"
|
||||
domain="[('category_type', '=', 'income')]"/>
|
||||
<filter name="filter_expense" string="Expense"
|
||||
domain="[('category_type', '=', 'expense')]"/>
|
||||
<filter name="filter_asset" string="Asset"
|
||||
domain="[('category_type', '=', 'asset')]"/>
|
||||
<filter name="filter_liability" string="Liability"
|
||||
domain="[('category_type', '=', 'liability')]"/>
|
||||
<separator/>
|
||||
<filter name="filter_archived" string="Archived"
|
||||
domain="[('active', '=', False)]"/>
|
||||
<group>
|
||||
<filter name="group_type" string="Type"
|
||||
context="{'group_by': 'category_type'}"/>
|
||||
<filter name="group_parent" string="Parent"
|
||||
context="{'group_by': 'parent_id'}"/>
|
||||
<filter name="group_company" string="Company"
|
||||
context="{'group_by': 'company_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================
|
||||
Fiscal Category – Action
|
||||
============================================================= -->
|
||||
<record id="action_fusion_fiscal_category" model="ir.actions.act_window">
|
||||
<field name="name">Fiscal Categories</field>
|
||||
<field name="res_model">fusion.fiscal.category</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="fusion_fiscal_category_view_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first fiscal category
|
||||
</p>
|
||||
<p>
|
||||
Fiscal categories group general-ledger accounts for
|
||||
structured fiscal reporting and SAF-T exports.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
SAF-T Export Wizard – Form View
|
||||
============================================================= -->
|
||||
<record id="fusion_saft_export_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.saft.export.form</field>
|
||||
<field name="model">fusion.saft.export</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="SAF-T Export">
|
||||
<group invisible="state != 'error'">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<field name="error_message"/>
|
||||
</div>
|
||||
</group>
|
||||
<group invisible="state != 'done'">
|
||||
<div class="alert alert-success" role="alert">
|
||||
SAF-T file generated successfully. The download
|
||||
should start automatically.
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Period">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group string="Settings">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="saft_namespace" groups="base.group_no_one"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group invisible="state != 'done'">
|
||||
<field name="attachment_id" filename="saft_filename"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="action_generate_saft"
|
||||
string="Generate SAF-T"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state == 'done'"/>
|
||||
<button string="Close" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- SAF-T Export – Action -->
|
||||
<record id="action_fusion_saft_export" model="ir.actions.act_window">
|
||||
<field name="name">SAF-T Export</field>
|
||||
<field name="res_model">fusion.saft.export</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
SAF-T Import Wizard – Form View
|
||||
============================================================= -->
|
||||
<record id="fusion_saft_import_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.saft.import.form</field>
|
||||
<field name="model">fusion.saft.import</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="SAF-T Import">
|
||||
<group invisible="state == 'done'">
|
||||
<group string="File">
|
||||
<field name="saft_file" filename="saft_filename"/>
|
||||
<field name="saft_filename" invisible="1"/>
|
||||
</group>
|
||||
<group string="Settings">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group invisible="state != 'done'">
|
||||
<div class="alert alert-success" role="alert">
|
||||
<strong>Import complete.</strong>
|
||||
</div>
|
||||
<group string="Summary">
|
||||
<field name="accounts_created"/>
|
||||
<field name="partners_created"/>
|
||||
<field name="moves_created"/>
|
||||
</group>
|
||||
</group>
|
||||
<group invisible="not import_log">
|
||||
<field name="import_log" readonly="1" nolabel="1"
|
||||
widget="text" colspan="2"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="action_preview"
|
||||
string="Preview"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="state != 'upload'"/>
|
||||
<button name="action_import"
|
||||
string="Import"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state == 'done'"
|
||||
confirm="This will create accounting records. Continue?"/>
|
||||
<button string="Close" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- SAF-T Import – Action -->
|
||||
<record id="action_fusion_saft_import" model="ir.actions.act_window">
|
||||
<field name="name">SAF-T Import</field>
|
||||
<field name="res_model">fusion.saft.import</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
Intrastat Commodity Codes – List / Form
|
||||
============================================================= -->
|
||||
<record id="fusion_intrastat_code_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.intrastat.code.list</field>
|
||||
<field name="model">fusion.intrastat.code</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Intrastat Codes" editable="bottom">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="supplementary_unit" optional="show"/>
|
||||
<field name="active" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="fusion_intrastat_code_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.intrastat.code.form</field>
|
||||
<field name="model">fusion.intrastat.code</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Code">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="supplementary_unit"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_intrastat_code" model="ir.actions.act_window">
|
||||
<field name="name">Commodity Codes</field>
|
||||
<field name="res_model">fusion.intrastat.code</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Add an Intrastat commodity code
|
||||
</p>
|
||||
<p>
|
||||
Commodity codes classify products under the Combined
|
||||
Nomenclature (CN8) for EU Intrastat declarations.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
Intrastat Report Wizard – Form View
|
||||
============================================================= -->
|
||||
<record id="fusion_intrastat_report_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.intrastat.report.form</field>
|
||||
<field name="model">fusion.intrastat.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Declaration">
|
||||
<group>
|
||||
<group string="Period">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group string="Parameters">
|
||||
<field name="flow_type"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook invisible="state != 'done'">
|
||||
<page string="Declaration Lines" name="lines">
|
||||
<field name="line_ids" nolabel="1">
|
||||
<list string="Intrastat Lines">
|
||||
<field name="intrastat_code_id"/>
|
||||
<field name="country_id"/>
|
||||
<field name="transaction_code"/>
|
||||
<field name="total_value" sum="Total Value"/>
|
||||
<field name="total_weight" sum="Total Weight"/>
|
||||
<field name="supplementary_qty" sum="Total Qty"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
<footer>
|
||||
<button name="action_compute"
|
||||
string="Compute"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state == 'done'"/>
|
||||
<button name="action_compute"
|
||||
string="Recompute"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="state != 'done'"/>
|
||||
<button string="Close" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Intrastat Report – Action -->
|
||||
<record id="action_fusion_intrastat_report" model="ir.actions.act_window">
|
||||
<field name="name">Intrastat Declaration</field>
|
||||
<field name="res_model">fusion.intrastat.report</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
Product Template – Inherit to show Intrastat fields
|
||||
============================================================= -->
|
||||
<record id="fusion_product_template_intrastat_form" model="ir.ui.view">
|
||||
<field name="name">product.template.form.intrastat</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='general_information']" position="after">
|
||||
<page string="Intrastat" name="intrastat"
|
||||
groups="account.group_account_user">
|
||||
<group>
|
||||
<group string="Trade Classification">
|
||||
<field name="intrastat_code_id"/>
|
||||
<field name="origin_country_id"/>
|
||||
</group>
|
||||
<group string="Physical Properties">
|
||||
<field name="intrastat_weight"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =============================================================
|
||||
Menu Structure: Accounting > Reports > Fiscal Compliance
|
||||
============================================================= -->
|
||||
<menuitem id="menu_fiscal_compliance_root"
|
||||
name="Fiscal Compliance"
|
||||
parent="account.menu_finance_reports"
|
||||
sequence="90"
|
||||
groups="account.group_account_user"/>
|
||||
|
||||
<menuitem id="menu_fiscal_category"
|
||||
name="Fiscal Categories"
|
||||
parent="menu_fiscal_compliance_root"
|
||||
action="action_fusion_fiscal_category"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem id="menu_saft_export"
|
||||
name="SAF-T Export"
|
||||
parent="menu_fiscal_compliance_root"
|
||||
action="action_fusion_saft_export"
|
||||
sequence="20"/>
|
||||
|
||||
<menuitem id="menu_saft_import"
|
||||
name="SAF-T Import"
|
||||
parent="menu_fiscal_compliance_root"
|
||||
action="action_fusion_saft_import"
|
||||
sequence="30"/>
|
||||
|
||||
<menuitem id="menu_intrastat_report"
|
||||
name="Intrastat Declaration"
|
||||
parent="menu_fiscal_compliance_root"
|
||||
action="action_fusion_intrastat_report"
|
||||
sequence="40"/>
|
||||
|
||||
<!-- Commodity Codes under Configuration -->
|
||||
<menuitem id="menu_intrastat_codes"
|
||||
name="Intrastat Codes"
|
||||
parent="account.menu_finance_configuration"
|
||||
action="action_fusion_intrastat_code"
|
||||
sequence="95"
|
||||
groups="account.group_account_manager"/>
|
||||
|
||||
</odoo>
|
||||
259
Fusion Accounting/views/followup_views.xml
Normal file
259
Fusion Accounting/views/followup_views.xml
Normal file
@@ -0,0 +1,259 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- FOLLOW-UP LEVEL: Configuration Views -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<!-- List View: Follow-up Levels -->
|
||||
<record id="fusion_followup_level_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.followup.level.list</field>
|
||||
<field name="model">fusion.followup.level</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Follow-up Levels" editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="delay"/>
|
||||
<field name="send_email"/>
|
||||
<field name="send_sms"/>
|
||||
<field name="send_letter"/>
|
||||
<field name="join_invoices"/>
|
||||
<field name="company_id" optional="hide" groups="base.group_multi_company"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Form View: Follow-up Level -->
|
||||
<record id="fusion_followup_level_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.followup.level.form</field>
|
||||
<field name="model">fusion.followup.level</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Follow-up Level">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. First Reminder"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Timing">
|
||||
<field name="sequence"/>
|
||||
<field name="delay"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</group>
|
||||
<group string="Communication Channels">
|
||||
<field name="send_email"/>
|
||||
<field name="send_sms"/>
|
||||
<field name="send_letter"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Templates">
|
||||
<field name="email_template_id" invisible="not send_email"/>
|
||||
<field name="sms_template_id" invisible="not send_sms"/>
|
||||
<field name="join_invoices" invisible="not send_email"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Message Body" name="page_description">
|
||||
<field name="description" placeholder="Write the follow-up message content here..."/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action: Follow-up Levels -->
|
||||
<record id="action_fusion_followup_level" model="ir.actions.act_window">
|
||||
<field name="name">Follow-up Levels</field>
|
||||
<field name="res_model">fusion.followup.level</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Define your payment follow-up levels
|
||||
</p>
|
||||
<p>
|
||||
Create escalating reminder stages with configurable delays
|
||||
and communication channels. The system will automatically
|
||||
move partners through these levels as invoices remain unpaid.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- FOLLOW-UP LINE: Partner Tracking Views -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<!-- List View: Follow-up Lines (Dashboard) -->
|
||||
<record id="fusion_followup_line_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.followup.line.list</field>
|
||||
<field name="model">fusion.followup.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Follow-up Reports"
|
||||
decoration-danger="followup_status == 'in_need'"
|
||||
decoration-warning="followup_status == 'with_overdue'"
|
||||
decoration-muted="followup_status == 'no_action_needed'">
|
||||
<field name="partner_id"/>
|
||||
<field name="followup_level_id"/>
|
||||
<field name="date"/>
|
||||
<field name="next_followup_date"/>
|
||||
<field name="overdue_amount" widget="monetary"/>
|
||||
<field name="overdue_count"/>
|
||||
<field name="followup_status" widget="badge"
|
||||
decoration-danger="followup_status == 'in_need'"
|
||||
decoration-warning="followup_status == 'with_overdue'"
|
||||
decoration-success="followup_status == 'no_action_needed'"/>
|
||||
<field name="company_id" optional="hide" groups="base.group_multi_company"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search View: Follow-up Lines -->
|
||||
<record id="fusion_followup_line_view_search" model="ir.ui.view">
|
||||
<field name="name">fusion.followup.line.search</field>
|
||||
<field name="model">fusion.followup.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Follow-up Search">
|
||||
<field name="partner_id"/>
|
||||
<field name="followup_level_id"/>
|
||||
<separator/>
|
||||
<filter name="filter_in_need" string="Action Needed"
|
||||
domain="[('followup_status', '=', 'in_need')]"/>
|
||||
<filter name="filter_with_overdue" string="With Overdue"
|
||||
domain="[('followup_status', '=', 'with_overdue')]"/>
|
||||
<filter name="filter_no_action" string="No Action Needed"
|
||||
domain="[('followup_status', '=', 'no_action_needed')]"/>
|
||||
<separator/>
|
||||
<filter name="filter_overdue_today" string="Due Today"
|
||||
domain="[('next_followup_date', '<=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
<separator/>
|
||||
<group>
|
||||
<filter name="group_by_status" string="Status"
|
||||
context="{'group_by': 'followup_status'}"/>
|
||||
<filter name="group_by_level" string="Follow-up Level"
|
||||
context="{'group_by': 'followup_level_id'}"/>
|
||||
<filter name="group_by_partner" string="Partner"
|
||||
context="{'group_by': 'partner_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Form View: Follow-up Line (Partner Follow-up Detail) -->
|
||||
<record id="fusion_followup_line_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.followup.line.form</field>
|
||||
<field name="model">fusion.followup.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Payment Follow-up">
|
||||
<header>
|
||||
<button name="execute_followup" type="object"
|
||||
string="Send Follow-up"
|
||||
class="btn-primary"
|
||||
invisible="followup_status == 'no_action_needed'"
|
||||
confirm="This will send the follow-up notification to the partner. Continue?"/>
|
||||
<button name="compute_followup_status" type="object"
|
||||
string="Refresh Status"
|
||||
class="btn-secondary"/>
|
||||
<button name="%(fusion_accounting.action_fusion_followup_send_wizard)d"
|
||||
type="action"
|
||||
string="Preview & Send"
|
||||
class="btn-secondary"
|
||||
invisible="followup_status == 'no_action_needed'"/>
|
||||
<field name="followup_status" widget="statusbar"
|
||||
statusbar_visible="no_action_needed,with_overdue,in_need"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="partner_id" readonly="1" options="{'no_open': True}"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Follow-up Details">
|
||||
<field name="followup_level_id"/>
|
||||
<field name="date"/>
|
||||
<field name="next_followup_date"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group string="Outstanding Amounts">
|
||||
<field name="overdue_amount" widget="monetary"/>
|
||||
<field name="overdue_count"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action: Follow-up Reports (Dashboard) -->
|
||||
<record id="action_fusion_followup_line" model="ir.actions.act_window">
|
||||
<field name="name">Follow-up Reports</field>
|
||||
<field name="res_model">fusion.followup.line</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'search_default_filter_in_need': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No partners require payment follow-up
|
||||
</p>
|
||||
<p>
|
||||
Partners with overdue invoices will appear here automatically.
|
||||
Use the scheduled action or click "Refresh Status" to update.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- PARTNER FORM: Follow-up Button -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<record id="fusion_partner_view_form_followup" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.followup</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_open_followup"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-envelope"
|
||||
groups="account.group_account_invoice">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="fusion_overdue_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Overdue</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- MENU ITEMS -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<!-- Sub-menu under Accounting > Customers -->
|
||||
<menuitem id="menu_fusion_followup_root"
|
||||
name="Payment Follow-up"
|
||||
parent="account.menu_finance_receivables"
|
||||
sequence="30"/>
|
||||
|
||||
<menuitem id="menu_fusion_followup_reports"
|
||||
name="Follow-up Reports"
|
||||
parent="menu_fusion_followup_root"
|
||||
action="action_fusion_followup_line"
|
||||
sequence="10"/>
|
||||
|
||||
<!-- Configuration menu -->
|
||||
<menuitem id="menu_fusion_followup_config"
|
||||
name="Follow-up Levels"
|
||||
parent="account.menu_finance_configuration"
|
||||
action="action_fusion_followup_level"
|
||||
sequence="45"
|
||||
groups="account.group_account_manager"/>
|
||||
|
||||
</odoo>
|
||||
7
Fusion Accounting/views/fusion_accounting_menuitems.xml
Normal file
7
Fusion Accounting/views/fusion_accounting_menuitems.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<odoo>
|
||||
<menuitem id="menu_account_reconcile" name="Reconcile" parent="account.menu_finance_entries" action="action_move_line_posted_unreconciled" sequence="65" groups="account.group_account_user"/>
|
||||
<menuitem id="account_tag_menu" parent="account.account_account_menu" action="account_tag_action" groups="base.group_no_one"/>
|
||||
<menuitem id="menu_account_group" parent="account.account_account_menu" action="action_account_group_tree" groups="base.group_no_one"/>
|
||||
<menuitem id="menu_account_fiscal_year" parent="account.account_account_menu" action="actions_account_fiscal_year" groups="fusion_accounting.group_fiscal_year"/>
|
||||
</odoo>
|
||||
179
Fusion Accounting/views/integration_bridge_views.xml
Normal file
179
Fusion Accounting/views/integration_bridge_views.xml
Normal file
@@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ===================================================================
|
||||
Fusion Accounting - Integration Bridge Views
|
||||
===================================================================
|
||||
|
||||
Conditional view extensions that surface bridge fields and actions
|
||||
in the UI. Each extension uses ``invisible`` expressions that
|
||||
evaluate to True when the target model does not exist, so they
|
||||
degrade gracefully when fleet / hr_expense / helpdesk are absent.
|
||||
|
||||
Copyright (c) Nexa Systems Inc. - All rights reserved.
|
||||
-->
|
||||
|
||||
<!-- =================================================================
|
||||
Fleet Bridge: vehicle field on journal-item lines
|
||||
================================================================= -->
|
||||
|
||||
<!-- Add vehicle field to the journal items list view -->
|
||||
<record id="view_move_line_tree_fleet_bridge" model="ir.ui.view">
|
||||
<field name="name">account.move.line.list.fusion.fleet.bridge</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="priority">200</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//list/field[@name='analytic_distribution']" position="after">
|
||||
<field name="fusion_vehicle_id"
|
||||
optional="hide"
|
||||
string="Vehicle"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Add vehicle to the journal items form view -->
|
||||
<record id="view_move_line_form_fleet_bridge" model="ir.ui.view">
|
||||
<field name="name">account.move.line.form.fusion.fleet.bridge</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||
<field name="priority">200</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='analytic_distribution']" position="after">
|
||||
<field name="fusion_vehicle_id" string="Vehicle"/>
|
||||
<field name="fusion_vehicle_license_plate"
|
||||
string="License Plate"
|
||||
readonly="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Vehicle field in the inline invoice/bill line items -->
|
||||
<record id="view_invoice_line_fleet_bridge" model="ir.ui.view">
|
||||
<field name="name">account.move.form.invoice.lines.fusion.fleet.bridge</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="priority">201</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='invoice_line_ids']//list//field[@name='analytic_distribution']"
|
||||
position="after">
|
||||
<field name="fusion_vehicle_id"
|
||||
optional="hide"
|
||||
string="Vehicle"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =================================================================
|
||||
HR Expense Bridge: expense sheet link on journal entries
|
||||
================================================================= -->
|
||||
|
||||
<!-- Stat button + field on journal entry form -->
|
||||
<record id="view_move_form_expense_bridge" model="ir.ui.view">
|
||||
<field name="name">account.move.form.fusion.expense.bridge</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="priority">202</field>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Stat button for linked expense sheet -->
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<field name="fusion_expense_sheet_id" invisible="1"/>
|
||||
<button name="action_open_expense_sheet"
|
||||
class="oe_stat_button"
|
||||
icon="fa-suitcase"
|
||||
type="object"
|
||||
invisible="not fusion_expense_sheet_id">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Expense Report</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<!-- Expense reference in the Other Info tab -->
|
||||
<xpath expr="//page[@id='other_tab']//field[@name='fiscal_position_id']"
|
||||
position="after">
|
||||
<field name="fusion_expense_sheet_id"
|
||||
string="Expense Report"
|
||||
readonly="1"
|
||||
invisible="not fusion_expense_sheet_id"/>
|
||||
<field name="fusion_expense_employee_id"
|
||||
string="Expense Employee"
|
||||
readonly="1"
|
||||
invisible="not fusion_expense_sheet_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Expense sheet reference in journal entry list view -->
|
||||
<record id="view_move_tree_expense_bridge" model="ir.ui.view">
|
||||
<field name="name">account.move.list.fusion.expense.bridge</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_tree"/>
|
||||
<field name="priority">202</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//list/field[@name='ref']" position="after">
|
||||
<field name="fusion_expense_sheet_id"
|
||||
string="Expense Report"
|
||||
optional="hide"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- =================================================================
|
||||
Helpdesk Bridge: ticket link on journal entries
|
||||
================================================================= -->
|
||||
|
||||
<!-- Stat button + field on journal entry form -->
|
||||
<record id="view_move_form_helpdesk_bridge" model="ir.ui.view">
|
||||
<field name="name">account.move.form.fusion.helpdesk.bridge</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="priority">203</field>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Stat button for linked ticket -->
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<field name="fusion_helpdesk_ticket_id" invisible="1"/>
|
||||
<button name="action_open_helpdesk_ticket"
|
||||
class="oe_stat_button"
|
||||
icon="fa-ticket"
|
||||
type="object"
|
||||
invisible="not fusion_helpdesk_ticket_id">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Helpdesk Ticket</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<!-- Ticket reference in the Other Info tab -->
|
||||
<xpath expr="//page[@id='other_tab']//field[@name='fiscal_position_id']"
|
||||
position="after">
|
||||
<field name="fusion_helpdesk_ticket_id"
|
||||
string="Helpdesk Ticket"
|
||||
readonly="1"
|
||||
invisible="not fusion_helpdesk_ticket_id"/>
|
||||
<field name="fusion_helpdesk_ticket_ref"
|
||||
string="Ticket Reference"
|
||||
readonly="1"
|
||||
invisible="not fusion_helpdesk_ticket_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Ticket reference in journal entry list view -->
|
||||
<record id="view_move_tree_helpdesk_bridge" model="ir.ui.view">
|
||||
<field name="name">account.move.list.fusion.helpdesk.bridge</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_tree"/>
|
||||
<field name="priority">203</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//list/field[@name='ref']" position="after">
|
||||
<field name="fusion_helpdesk_ticket_id"
|
||||
string="Helpdesk Ticket"
|
||||
optional="hide"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
259
Fusion Accounting/views/loan_views.xml
Normal file
259
Fusion Accounting/views/loan_views.xml
Normal file
@@ -0,0 +1,259 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- LOAN FORM VIEW -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="fusion_loan_view_form" model="ir.ui.view">
|
||||
<field name="name">fusion.loan.form</field>
|
||||
<field name="model">fusion.loan</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Loan">
|
||||
<header>
|
||||
<button name="compute_amortization_schedule"
|
||||
string="Compute Schedule"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state != 'draft'"/>
|
||||
<button name="action_confirm"
|
||||
string="Confirm"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state != 'draft'"
|
||||
confirm="This will create the disbursement entry and start the loan. Continue?"/>
|
||||
<button name="generate_entries"
|
||||
string="Generate Due Entries"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="state != 'running'"/>
|
||||
<button name="action_pay_early"
|
||||
string="Early Repayment"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="state != 'running'"
|
||||
confirm="This will settle the entire remaining balance. Continue?"/>
|
||||
<button name="action_cancel"
|
||||
string="Cancel"
|
||||
type="object"
|
||||
class="btn-danger"
|
||||
invisible="state not in ('draft', 'running')"
|
||||
confirm="This will reverse all entries and cancel the loan. Continue?"/>
|
||||
<button name="action_reset_to_draft"
|
||||
string="Reset to Draft"
|
||||
type="object"
|
||||
invisible="state != 'cancelled'"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,running,paid"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_entries"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-book"
|
||||
invisible="entries_count == 0">
|
||||
<field name="entries_count" widget="statinfo"
|
||||
string="Entries"/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Loan Details">
|
||||
<field name="partner_id"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="principal_amount"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="interest_rate"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="loan_term"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="start_date"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="payment_frequency"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="amortization_method"
|
||||
readonly="state != 'draft'"/>
|
||||
</group>
|
||||
<group string="Accounting">
|
||||
<field name="journal_id"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="loan_account_id"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="interest_account_id"
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Summary" col="4">
|
||||
<field name="total_amount"/>
|
||||
<field name="total_interest"/>
|
||||
<field name="remaining_balance"/>
|
||||
<field name="paid_installments" string="Progress"
|
||||
widget="progressbar"
|
||||
options="{'max_value': 'installment_count'}"/>
|
||||
<field name="installment_count" invisible="1"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Amortization Schedule" name="schedule">
|
||||
<field name="line_ids" readonly="1" nolabel="1">
|
||||
<list editable="bottom"
|
||||
decoration-success="is_paid"
|
||||
decoration-muted="is_paid"
|
||||
create="0" delete="0">
|
||||
<field name="sequence" string="#"/>
|
||||
<field name="date"/>
|
||||
<field name="principal_amount" sum="Total Principal"/>
|
||||
<field name="interest_amount" sum="Total Interest"/>
|
||||
<field name="total_payment" sum="Total Payments"/>
|
||||
<field name="remaining_balance"/>
|
||||
<field name="is_paid"/>
|
||||
<field name="move_id" optional="hide"/>
|
||||
<field name="currency_id" column_invisible="1"/>
|
||||
<button name="action_create_entry"
|
||||
string="Pay"
|
||||
type="object"
|
||||
class="btn-link"
|
||||
icon="fa-money"
|
||||
invisible="is_paid or parent.state != 'running'"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Journal Entries" name="entries">
|
||||
<field name="move_ids" readonly="1" nolabel="1">
|
||||
<list create="0" delete="0">
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="amount_total_signed" string="Amount"/>
|
||||
<field name="state"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- LOAN LIST VIEW -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="fusion_loan_view_list" model="ir.ui.view">
|
||||
<field name="name">fusion.loan.list</field>
|
||||
<field name="model">fusion.loan</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Loans"
|
||||
decoration-info="state == 'draft'"
|
||||
decoration-success="state == 'running'"
|
||||
decoration-muted="state == 'cancelled'"
|
||||
decoration-bf="state == 'running'">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="principal_amount" sum="Total Principal"/>
|
||||
<field name="interest_rate" string="Rate (%)"/>
|
||||
<field name="loan_term" string="Term (Mo.)"/>
|
||||
<field name="start_date"/>
|
||||
<field name="payment_frequency"/>
|
||||
<field name="amortization_method"/>
|
||||
<field name="remaining_balance" sum="Total Remaining"/>
|
||||
<field name="state"
|
||||
decoration-info="state == 'draft'"
|
||||
decoration-success="state == 'running'"
|
||||
decoration-danger="state == 'cancelled'"
|
||||
widget="badge"/>
|
||||
<field name="currency_id" column_invisible="1"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- LOAN SEARCH VIEW -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="fusion_loan_view_search" model="ir.ui.view">
|
||||
<field name="name">fusion.loan.search</field>
|
||||
<field name="model">fusion.loan</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Loans">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<separator/>
|
||||
<filter name="filter_draft" string="Draft"
|
||||
domain="[('state', '=', 'draft')]"/>
|
||||
<filter name="filter_running" string="Running"
|
||||
domain="[('state', '=', 'running')]"/>
|
||||
<filter name="filter_paid" string="Paid"
|
||||
domain="[('state', '=', 'paid')]"/>
|
||||
<separator/>
|
||||
<filter name="filter_french" string="French"
|
||||
domain="[('amortization_method', '=', 'french')]"/>
|
||||
<filter name="filter_linear" string="Linear"
|
||||
domain="[('amortization_method', '=', 'linear')]"/>
|
||||
<separator/>
|
||||
<group>
|
||||
<filter name="group_state" string="Status"
|
||||
context="{'group_by': 'state'}"/>
|
||||
<filter name="group_partner" string="Lender"
|
||||
context="{'group_by': 'partner_id'}"/>
|
||||
<filter name="group_method" string="Method"
|
||||
context="{'group_by': 'amortization_method'}"/>
|
||||
<filter name="group_frequency" string="Frequency"
|
||||
context="{'group_by': 'payment_frequency'}"/>
|
||||
<filter name="group_start" string="Start Date"
|
||||
context="{'group_by': 'start_date:month'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- ACTION & MENUS -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="action_fusion_loan" model="ir.actions.act_window">
|
||||
<field name="name">Loans</field>
|
||||
<field name="res_model">fusion.loan</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="fusion_loan_view_search"/>
|
||||
<field name="context">{'search_default_filter_running': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first loan
|
||||
</p>
|
||||
<p>
|
||||
Track loans, generate amortization schedules, and create
|
||||
journal entries automatically.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Menu: Accounting > Accounting > Loans -->
|
||||
<menuitem id="menu_fusion_loan"
|
||||
name="Loans"
|
||||
parent="account.menu_finance_entries"
|
||||
action="action_fusion_loan"
|
||||
sequence="70"
|
||||
groups="account.group_account_user"/>
|
||||
|
||||
<!-- Import wizard action (toolbar) -->
|
||||
<record id="action_fusion_loan_import_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Import Loans</field>
|
||||
<field name="res_model">fusion.loan.import.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!-- Menu: Import Loans sub-item -->
|
||||
<menuitem id="menu_fusion_loan_import"
|
||||
name="Import Loans"
|
||||
parent="menu_fusion_loan"
|
||||
action="action_fusion_loan_import_wizard"
|
||||
sequence="10"
|
||||
groups="account.group_account_manager"/>
|
||||
|
||||
</odoo>
|
||||
13
Fusion Accounting/views/mail_activity_views.xml
Normal file
13
Fusion Accounting/views/mail_activity_views.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<record id="account_activity_view_form_popup" model="ir.ui.view">
|
||||
<field name="name">mail.activity.form.inherit.account.tax</field>
|
||||
<field name="model">mail.activity</field>
|
||||
<field name="inherit_id" ref="mail.mail_activity_view_form_popup"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_done']" position="attributes">
|
||||
<attribute name="invisible">activity_category == 'tax_report' or chaining_type == 'trigger'</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
16
Fusion Accounting/views/partner_views.xml
Normal file
16
Fusion Accounting/views/partner_views.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="res_partner_view_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='accounting_disabled']" position="attributes">
|
||||
<attribute name="string">Accounting</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='accounting']" position="attributes">
|
||||
<attribute name="string">Accounting</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
26
Fusion Accounting/views/product_views.xml
Normal file
26
Fusion Accounting/views/product_views.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="res_partner_view_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='accounting_entries']" position="attributes">
|
||||
<attribute name="groups">account.group_account_manager</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- To-Do: Remove me in master -->
|
||||
<record id="product_template_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.form.inherit</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="priority">5</field>
|
||||
<field name="inherit_id" ref="account.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="invoicing" position="attributes">
|
||||
<attribute name="groups">account.group_account_readonly</attribute>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
18
Fusion Accounting/views/report_invoice.xml
Normal file
18
Fusion Accounting/views/report_invoice.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
||||
<div id="right-elements" position="inside">
|
||||
<div t-if="o.show_signature_area" t-attf-class="#{'col-12' if report_type != 'html' else 'col-5 offset-7 offset-md-0 col-md-12'}">
|
||||
<t t-if="o.signature">
|
||||
<img t-if="o.signature" t-att-src="image_data_uri(o.signature)" class="w-100 mx-auto" style="max-height: 6rem;"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<!-- leave an empty space allowing to sign the invoice manually -->
|
||||
<div class="col-12" style="min-height: 10rem"/>
|
||||
</t>
|
||||
<!-- wkhtmltopdf doesn't render a simple `border-top border-dark` -->
|
||||
<p class="col-7 mx-auto text-center" style="border-top: thin solid;">Authorized signatory</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</odoo>
|
||||
10
Fusion Accounting/views/report_template.xml
Normal file
10
Fusion Accounting/views/report_template.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="internal_layout" inherit_id="web.internal_layout" primary="True">
|
||||
<xpath expr="//div[hasclass('header')]//div[hasclass('row')]" position="attributes">
|
||||
<attribute name="class" add="o_footer_font_size" separator=" "/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
16
Fusion Accounting/views/res_company_views.xml
Normal file
16
Fusion Accounting/views/res_company_views.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_company_form" model="ir.ui.view">
|
||||
<field name="name">fusion_accounting.res.company.form</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='parent_id']" position="after">
|
||||
<field name="account_display_representative_field" invisible="1"/>
|
||||
<field name="account_representative_id" invisible="not account_display_representative_field"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
223
Fusion Accounting/views/res_config_settings_views.xml
Normal file
223
Fusion Accounting/views/res_config_settings_views.xml
Normal file
@@ -0,0 +1,223 @@
|
||||
<?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.inherit.account.accountant</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<app name="account" position="attributes">
|
||||
<attribute name="data-string">Accounting</attribute>
|
||||
<attribute name="string">Accounting</attribute>
|
||||
<attribute name="logo">/fusion_accounting/static/description/icon.png</attribute>
|
||||
</app>
|
||||
<setting id="fiscalyear" position="replace">
|
||||
<setting id="fiscalyear" string="Fiscal Year">
|
||||
<div class="content-group">
|
||||
<div class="d-flex mt16 align-items-baseline">
|
||||
<label for="fiscalyear_last_month" string="Last Day" class="col-lg-3 o_light_label pe-2 pe-lg-0"/>
|
||||
<div class="col-lg-9">
|
||||
<field name="fiscalyear_last_month" class="pe-2"/>
|
||||
<field name="fiscalyear_last_day"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
<setting groups="account.group_account_manager"
|
||||
help="The invoices up to this date will not be taken into account as accounting entries">
|
||||
<field name="invoicing_switch_threshold"/>
|
||||
</setting>
|
||||
<setting help="Define fiscal years of more or less than one year">
|
||||
<field name="group_fiscal_year"/>
|
||||
<div class="mt16">
|
||||
<button name="%(fusion_accounting.actions_account_fiscal_year)d" icon="oi-arrow-right"
|
||||
type="action" string="Fiscal Years" class="btn-link"
|
||||
invisible="not group_fiscal_year"/>
|
||||
</div>
|
||||
</setting>
|
||||
</setting>
|
||||
<setting id="dynamic_report" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</setting>
|
||||
<block id="bank_cash" position="inside">
|
||||
<setting groups="base.group_no_one" company_dependent="1"
|
||||
help="Record cost of goods sold in your journal entries">
|
||||
<field name="use_anglo_saxon"/>
|
||||
</setting>
|
||||
</block>
|
||||
<block id="invoicing_settings" position="inside">
|
||||
<setting company_dependent="1" help="To enhance authenticity, add a signature to your invoices">
|
||||
<field name="sign_invoice"/>
|
||||
<label for="signing_user" string="Legal signatory" class="col-lg-5 o_light_label"
|
||||
invisible="not sign_invoice"/>
|
||||
<field name="signing_user" invisible="not sign_invoice"/>
|
||||
</setting>
|
||||
</block>
|
||||
<xpath expr="//block[@id='account_vendor_bills']" position="inside">
|
||||
<setting string="Predict vendor bill product"
|
||||
help="The system will try to predict the product on vendor bill lines based on the label of the line">
|
||||
<field name="predict_bill_product"/>
|
||||
</setting>
|
||||
</xpath>
|
||||
|
||||
<setting id="post_bank_transactions_and_payments_setting" position="after">
|
||||
<setting string="Deferred expense entries:" company_dependent="1">
|
||||
<div class="content-group">
|
||||
<div class="row mt8">
|
||||
<label for="deferred_expense_journal_id" class="col-lg-5 o_light_label" string="Journal"/>
|
||||
<field name="deferred_expense_journal_id" domain="[('type', '=', 'general'), ('active', '=', True)]"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="deferred_expense_account_id" class="col-lg-5 o_light_label" string="Deferred expense"/>
|
||||
<field name="deferred_expense_account_id"
|
||||
domain="[('account_type', '=', 'asset_current')]"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="generate_deferred_expense_entries_method" class="col-lg-5 o_light_label"
|
||||
string="Generate Entries"/>
|
||||
<field name="generate_deferred_expense_entries_method"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="deferred_expense_amount_computation_method" class="col-lg-5 o_light_label" string="Based on"/>
|
||||
<field name="deferred_expense_amount_computation_method"/>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
<setting string="Deferred revenue entries:" company_dependent="1">
|
||||
<div class="content-group">
|
||||
<div class="row mt8">
|
||||
<label for="deferred_revenue_journal_id" class="col-lg-5 o_light_label" string="Journal"/>
|
||||
<field name="deferred_revenue_journal_id" domain="[('type', '=', 'general'), ('active', '=', True)]"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="deferred_revenue_account_id" class="col-lg-5 o_light_label" string="Deferred revenue"/>
|
||||
<field name="deferred_revenue_account_id"
|
||||
domain="[('account_type', '=', 'liability_current')]"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="generate_deferred_revenue_entries_method" class="col-lg-5 o_light_label"
|
||||
string="Generate Entries"/>
|
||||
<field name="generate_deferred_revenue_entries_method"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="deferred_revenue_amount_computation_method" class="col-lg-5 o_light_label" string="Based on"/>
|
||||
<field name="deferred_revenue_amount_computation_method"/>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
</setting>
|
||||
<!-- <setting id="dynamic_report" position="attributes">-->
|
||||
<!-- <attribute name="invisible">not module_account_reports</attribute>-->
|
||||
<!-- </setting>-->
|
||||
|
||||
<setting id="default_taxes" position="after">
|
||||
<setting id="account_tax_periodicity" string="Tax Return Periodicity" company_dependent="1"
|
||||
help="How often tax returns have to be made"
|
||||
documentation="/applications/finance/accounting/reporting/declarations/tax_returns.html">
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label string="Periodicity" for="account_tax_periodicity" class="col-lg-3 o_light_label"/>
|
||||
<field name="account_tax_periodicity"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label string="Reminder" for="account_tax_periodicity_reminder_day" class="col-lg-3 o_light_label"/>
|
||||
<div class="col-lg-auto content-group">
|
||||
<field name="account_tax_periodicity_reminder_day" class="text-center oe_inline"/>
|
||||
days after period
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label string="Journal" for="account_tax_periodicity_journal_id" class="col-lg-3 o_light_label"/>
|
||||
<field name="account_tax_periodicity_journal_id" required="has_chart_of_accounts"/>
|
||||
</div>
|
||||
<div class="mt8">
|
||||
<button name="open_tax_group_list" icon="oi-arrow-right" type="object"
|
||||
string="Configure your tax accounts" class="btn-link"/>
|
||||
</div>
|
||||
<div class="mt8" invisible="not account_reports_show_per_company_setting">
|
||||
<button name="open_company_dependent_report_settings" icon="oi-arrow-right" type="object"
|
||||
string="Configure start dates" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
</setting>
|
||||
|
||||
<block id="analytic" position="after">
|
||||
<block title="Reporting" id="account_reports_settings" groups="account.group_account_user"
|
||||
invisible="not module_account_reports">
|
||||
<setting title="This allows you to choose the position of totals in your financial reports."
|
||||
company_dependent="1"
|
||||
help="When ticked, totals and subtotals appear below the sections of the report">
|
||||
<field name="totals_below_sections"/>
|
||||
</setting>
|
||||
<setting>
|
||||
<button name="%(account.action_check_hash_integrity)d" type="action"
|
||||
string="Download the Data Inalterability Check Report" class="oe_link" id="action_hash_integrity"/>
|
||||
</setting>
|
||||
</block>
|
||||
</block>
|
||||
<xpath expr="//block[@id='default_accounts']" position="after">
|
||||
<block title="Stock Valuation" id="stock_valuation">
|
||||
<setting string="General Account Properties" id="general_accounts">
|
||||
<div class="content-group">
|
||||
<div class="row mt8">
|
||||
<label for="property_account_income_categ_id" class="col-lg-4 o_light_label"/>
|
||||
<field name="property_account_income_categ_id"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="property_account_expense_categ_id" class="col-lg-4 o_light_label"/>
|
||||
<field name="property_account_expense_categ_id"/>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
<setting help="Default stock valuation accounts" id="default_stock_valuation_accounts">
|
||||
<div name="default_accounts" class="content-group">
|
||||
<div class="text-muted">
|
||||
The below accounts will be used by default for inventory valuation.
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="property_stock_valuation_account_id" class="col-lg-5 o_light_label"/>
|
||||
<field name="property_stock_valuation_account_id"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="property_stock_account_input_categ_id" class="col-lg-5 o_light_label"/>
|
||||
<field name="property_stock_account_input_categ_id"/>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<label for="property_stock_account_output_categ_id" class="col-lg-5 o_light_label"/>
|
||||
<field name="property_stock_account_output_categ_id"/>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
</block>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//setting[@id='dynamic_report']" position="replace">
|
||||
<setting id="dynamic_report" groups="account.group_account_user"
|
||||
help="Navigate easily through reports and see what is behind the numbers">
|
||||
<field name="module_account_reports"/>
|
||||
</setting>
|
||||
</xpath>
|
||||
<setting id="dynamic_report" position="attributes">
|
||||
<attribute name="invisible">not module_account_reports</attribute>
|
||||
</setting>
|
||||
|
||||
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_override_autopost_bills" model="ir.ui.view">
|
||||
<field name="name">account.res_config_settings.autopost_bills.override</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
|
||||
<field name="priority" eval="50"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//block[@id='account_vendor_bills']/setting[@id='autopost_bills']" position="replace">
|
||||
<setting id="autopost_bills"
|
||||
help="After importing three bills for a vendor without making changes, your ERP will suggest automatically validating future bills..."
|
||||
groups="account.group_account_user">
|
||||
<field name="autopost_bills"/>
|
||||
</setting>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
14
Fusion Accounting/views/res_partner_views.xml
Normal file
14
Fusion Accounting/views/res_partner_views.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="action_account_reports_customer_statements" model="ir.actions.server">
|
||||
<field name="name">Open Customer Statements</field>
|
||||
<field name="group_ids" eval="[Command.link(ref('account.group_account_invoice'))]"/>
|
||||
<field name="model_id" ref="model_res_partner"/>
|
||||
<field name="binding_model_id" ref="model_res_partner"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.open_partner_ledger()
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
42
Fusion Accounting/views/tax_python_views.xml
Normal file
42
Fusion Accounting/views/tax_python_views.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- Tax Form Extension - Python Compute Fields -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_tax_form_python_compute" model="ir.ui.view">
|
||||
<field name="name">account.tax.form.python.compute</field>
|
||||
<field name="model">account.tax</field>
|
||||
<field name="inherit_id" ref="account.view_tax_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Show python_compute field when amount_type is 'python' -->
|
||||
<xpath expr="//field[@name='amount']" position="after">
|
||||
<field name="python_compute"
|
||||
widget="code"
|
||||
invisible="amount_type != 'python'"
|
||||
options="{'mode': 'python'}"
|
||||
placeholder="# Assign the computed tax amount to 'result' result = price_unit * quantity * 0.10"/>
|
||||
<field name="python_applicable"
|
||||
widget="code"
|
||||
invisible="amount_type != 'python'"
|
||||
options="{'mode': 'python'}"
|
||||
placeholder="# Optional: assign True/False to 'result' to control applicability result = True"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- Tax List Extension - Show Python badge -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_tax_list_python" model="ir.ui.view">
|
||||
<field name="name">account.tax.list.python</field>
|
||||
<field name="model">account.tax</field>
|
||||
<field name="inherit_id" ref="account.view_tax_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='amount_type']" position="attributes">
|
||||
<attribute name="decoration-info">amount_type == 'python'</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user