mirror of
https://gitlab.com/flectra-community/account-closing.git
synced 2024-11-23 06:02:03 +00:00
231 lines
11 KiB
XML
231 lines
11 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<!--
|
||
|
© 2013-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||
|
-->
|
||
|
|
||
|
<flectra>
|
||
|
|
||
|
<menuitem id="cutoff_menu"
|
||
|
parent="account.menu_finance"
|
||
|
name="Cut-offs"
|
||
|
sequence="5"
|
||
|
groups="account.group_account_user,account.group_account_manager"/>
|
||
|
|
||
|
<!-- Form view -->
|
||
|
<record id="account_cutoff_form" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.form</field>
|
||
|
<field name="model">account.cutoff</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Cut-offs">
|
||
|
<header>
|
||
|
<button name="back2draft" string="Back to Draft" type="object" states="done" />
|
||
|
<!-- here, we have the 'get_lines' button that is supplied by the other cutoff modules -->
|
||
|
<button class="oe_highlight" name="create_move" string="Create Journal Entry" type="object" attrs="{'invisible': ['|', ('line_ids', '=', False), ('state', '=', 'done')]}"/>
|
||
|
<field name="state" widget="statusbar" />
|
||
|
</header>
|
||
|
<sheet>
|
||
|
<div class="oe_title">
|
||
|
<h1>
|
||
|
<field name="cutoff_type" readonly="1" />
|
||
|
</h1>
|
||
|
</div>
|
||
|
<group name="top">
|
||
|
<group name="general-params">
|
||
|
<field name="cutoff_date"/>
|
||
|
<field name="total_cutoff_amount"/>
|
||
|
<field name="company_id" groups="base.group_multi_company" widget="selection" />
|
||
|
<field name="company_currency_id" invisible="1"/>
|
||
|
</group>
|
||
|
<group name="accounting-params">
|
||
|
<field name="cutoff_journal_id" required="1"/>
|
||
|
<field name="cutoff_account_id" required="1"/>
|
||
|
<field name="move_label" required="1"/>
|
||
|
<field name="move_id"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
<group name="lines">
|
||
|
<field name="line_ids" nolabel="1" context="{'cutoff_type': cutoff_type}"/>
|
||
|
</group>
|
||
|
</sheet>
|
||
|
<div class="oe_chatter">
|
||
|
<field name="message_follower_ids" widget="mail_followers"/>
|
||
|
<field name="message_ids" widget="mail_thread"/>
|
||
|
</div>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Tree view -->
|
||
|
<record id="account_cutoff_tree" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.tree</field>
|
||
|
<field name="model">account.cutoff</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree string="Cut-offs" colors="blue:state=='draft'">
|
||
|
<field name="cutoff_type" invisible="context.get('cutoff_type')" />
|
||
|
<field name="cutoff_date" />
|
||
|
<field name="total_cutoff_amount"/>
|
||
|
<field name="company_currency_id" invisible="1"/>
|
||
|
<field name="state"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Search view -->
|
||
|
<record id="account_cutoff_filter" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.filter</field>
|
||
|
<field name="model">account.cutoff</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<search string="Search Cut-offs">
|
||
|
<filter name="draft" string="Draft" domain="[('state', '=', 'draft')]" />
|
||
|
<filter name="done" string="Done" domain="[('state', '=', 'done')]" />
|
||
|
<group string="Group By" name="groupby">
|
||
|
<filter name="state_groupby" string="State" context="{'group_by': 'state'}"/>
|
||
|
</group>
|
||
|
</search>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Form view for lines -->
|
||
|
<record id="account_cutoff_line_form" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.line.form</field>
|
||
|
<field name="model">account.cutoff.line</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Cut-off Lines">
|
||
|
<group name="source" string="Source">
|
||
|
<field name="parent_id" invisible="not context.get('account_cutoff_line_main_view', False)"/>
|
||
|
<field name="partner_id"/>
|
||
|
<field name="name"/>
|
||
|
<field name="account_id"/>
|
||
|
<field name="cutoff_account_id"/>
|
||
|
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||
|
<field name="tax_ids" widget="many2many_tags" invisible="'accrued' not in context.get('cutoff_type', '-')"/>
|
||
|
<field name="amount"/>
|
||
|
<field name="currency_id" invisible="1"/>
|
||
|
</group>
|
||
|
<group name="cutoff" string="Cut-off Computation">
|
||
|
<field name="cutoff_amount"/>
|
||
|
<field name="company_currency_id" invisible="1"/>
|
||
|
</group>
|
||
|
<group name="tax" string="Cut-off Taxes Lines" invisible="'accrued' not in context.get('cutoff_type', '-')">
|
||
|
<field name="tax_line_ids" nolabel="1"/>
|
||
|
</group>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Tree view for lines -->
|
||
|
<record id="account_cutoff_line_tree" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.line.tree</field>
|
||
|
<field name="model">account.cutoff.line</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree string="Cut-off Lines">
|
||
|
<field name="parent_id" invisible="not context.get('account_cutoff_line_main_view', False)"/>
|
||
|
<field name="partner_id"/>
|
||
|
<field name="name"/>
|
||
|
<field name="cutoff_account_code"/>
|
||
|
<field name="analytic_account_code" groups="analytic.group_analytic_accounting"/>
|
||
|
<field name="tax_ids" widget="many2many_tags" invisible="'accrued' not in context.get('cutoff_type', '-')"/>
|
||
|
<field name="amount"/>
|
||
|
<field name="currency_id" invisible="1"/>
|
||
|
<field name="cutoff_amount"/>
|
||
|
<field name="company_currency_id" invisible="1"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Form view for tax lines -->
|
||
|
<record id="account_cutoff_tax_line_form" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.tax.line.form</field>
|
||
|
<field name="model">account.cutoff.tax.line</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Cut-off Tax Lines">
|
||
|
<group name="tax" string="Tax">
|
||
|
<field name="parent_id" invisible="not context.get('account_cutoff_tax_line_main_view', False)"/>
|
||
|
<field name="tax_id"/>
|
||
|
<field name="sequence"/>
|
||
|
<field name="cutoff_account_id"/>
|
||
|
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||
|
<field name="base"/>
|
||
|
<field name="amount"/>
|
||
|
<field name="currency_id" invisible="1"/>
|
||
|
</group>
|
||
|
<group name="cutoff" string="Cut-off Computation">
|
||
|
<field name="cutoff_amount"/>
|
||
|
<field name="company_currency_id" invisible="1"/>
|
||
|
</group>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Tree view for tax lines -->
|
||
|
<record id="account_cutoff_tax_line_tree" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.tax.line.tree</field>
|
||
|
<field name="model">account.cutoff.tax.line</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree string="Cut-off Tax Lines">
|
||
|
<field name="parent_id" invisible="not context.get('account_cutoff_tax_line_main_view', False)"/>
|
||
|
<field name="tax_id"/>
|
||
|
<field name="cutoff_account_id"/>
|
||
|
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||
|
<field name="base"/>
|
||
|
<field name="amount"/>
|
||
|
<field name="currency_id" invisible="1"/>
|
||
|
<field name="cutoff_amount"/>
|
||
|
<field name="company_currency_id" invisible="1"/>
|
||
|
<field name="sequence" invisible="1"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Form view for account mappings -->
|
||
|
<record id="account_cutoff_mapping_form" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.mapping.form</field>
|
||
|
<field name="model">account.cutoff.mapping</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Account Cut-off Mapping">
|
||
|
<field name="company_id" groups="base.group_multi_company" widget="selection" invisible="not context.get('account_cutoff_mapping_main_view', False)" />
|
||
|
<field name="account_id"/>
|
||
|
<field name="cutoff_account_id"/>
|
||
|
<field name="cutoff_type"/>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Tree view for account mappings -->
|
||
|
<record id="account_cutoff_mapping_tree" model="ir.ui.view">
|
||
|
<field name="name">account.cutoff.mapping.tree</field>
|
||
|
<field name="model">account.cutoff.mapping</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree string="Account Cut-off Mapping" editable="bottom">
|
||
|
<field name="company_id" groups="base.group_multi_company" widget="selection" invisible="not context.get('account_cutoff_mapping_main_view', False)" />
|
||
|
<field name="account_id"/>
|
||
|
<field name="cutoff_account_id"/>
|
||
|
<field name="cutoff_type"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Action for account mappings -->
|
||
|
<record id="account_cutoff_mapping_action" model="ir.actions.act_window">
|
||
|
<field name="name">Cut-off Account Mapping</field>
|
||
|
<field name="res_model">account.cutoff.mapping</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="context">{'account_cutoff_mapping_main_view': True}</field>
|
||
|
<field name="help" type="html">
|
||
|
<p class="oe_view_nocontent_create">
|
||
|
Click to start a new cutoff account mapping.
|
||
|
</p><p>
|
||
|
These account mappings allow you to have an cutoff account for expense/revenue that is not the same as the original expense/revenue account, using the same concept as the fiscal positions.
|
||
|
</p>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Menu entry for account mapping -->
|
||
|
<menuitem id="account_cutoff_mapping_menu"
|
||
|
parent="account.account_account_menu"
|
||
|
action="account_cutoff_mapping_action"
|
||
|
sequence="100"/>
|
||
|
|
||
|
</flectra>
|