mirror of
https://gitlab.com/flectra-community/account-closing.git
synced 2024-11-23 06:02:03 +00:00
230 lines
9.5 KiB
XML
230 lines
9.5 KiB
XML
|
<?xml version="1.0" encoding="utf-8" ?>
|
||
|
<!--
|
||
|
Copyright 2013-2020 Akretion France (http://www.akretion.com/)
|
||
|
@author: 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_entries"
|
||
|
name="Cut-offs"
|
||
|
groups="account.group_account_user,account.group_account_manager,account.group_account_readonly"
|
||
|
/>
|
||
|
|
||
|
<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>
|
||
|
<header>
|
||
|
<button
|
||
|
name="back2draft"
|
||
|
string="Back to Draft"
|
||
|
type="object"
|
||
|
invisible="state != 'done'"
|
||
|
confirm="Are you sure you want to go back to draft state?"
|
||
|
/>
|
||
|
<button
|
||
|
class="btn-primary"
|
||
|
name="get_lines"
|
||
|
string="Re-Generate Lines"
|
||
|
type="object"
|
||
|
invisible="state != 'draft'"
|
||
|
/>
|
||
|
<button
|
||
|
class="btn-primary"
|
||
|
name="create_move"
|
||
|
string="Create Journal Entry"
|
||
|
type="object"
|
||
|
invisible="line_ids == [] or state != 'draft'"
|
||
|
/>
|
||
|
<field name="state" widget="statusbar" />
|
||
|
</header>
|
||
|
<sheet>
|
||
|
<div class="oe_button_box" name="button_box">
|
||
|
<button
|
||
|
name="button_line_tree"
|
||
|
class="oe_stat_button"
|
||
|
icon="fa-building-o"
|
||
|
type="object"
|
||
|
help="List view of lines"
|
||
|
>
|
||
|
<div class="o_form_field o_stat_info">
|
||
|
<span class="o_stat_text">Lines Fullscreen</span>
|
||
|
</div>
|
||
|
</button>
|
||
|
</div>
|
||
|
<div class="oe_title">
|
||
|
<h1>
|
||
|
<field name="cutoff_type" readonly="1" />
|
||
|
</h1>
|
||
|
</div>
|
||
|
<group name="top">
|
||
|
<group name="general-params">
|
||
|
<field
|
||
|
name="cutoff_date"
|
||
|
options="{'datepicker': {'warn_future': true}}"
|
||
|
readonly="state == 'done'"
|
||
|
/>
|
||
|
<field name="total_cutoff_amount" />
|
||
|
<field
|
||
|
name="source_move_state"
|
||
|
widget="radio"
|
||
|
readonly="state == 'done'"
|
||
|
/>
|
||
|
<field
|
||
|
name="company_id"
|
||
|
options="{'no_create': True}"
|
||
|
readonly="state == 'done'"
|
||
|
/>
|
||
|
<field name="company_currency_id" invisible="1" />
|
||
|
</group>
|
||
|
<group name="accounting-params">
|
||
|
<field
|
||
|
name="cutoff_journal_id"
|
||
|
required="1"
|
||
|
options="{'no_create': True}"
|
||
|
readonly="state == 'done'"
|
||
|
/>
|
||
|
<field
|
||
|
name="cutoff_account_id"
|
||
|
required="1"
|
||
|
options="{'no_create': True}"
|
||
|
readonly="state == 'done'"
|
||
|
/>
|
||
|
<field name="move_ref" readonly="state == 'done'" />
|
||
|
<field name="move_partner" readonly="state == 'done'" />
|
||
|
<field name="move_id" />
|
||
|
</group>
|
||
|
</group>
|
||
|
<group name="lines">
|
||
|
<field
|
||
|
name="line_ids"
|
||
|
nolabel="1"
|
||
|
colspan="2"
|
||
|
context="{'cutoff_type': cutoff_type}"
|
||
|
readonly="state == 'done'"
|
||
|
/>
|
||
|
</group>
|
||
|
</sheet>
|
||
|
<div class="oe_chatter">
|
||
|
<field name="message_follower_ids" widget="mail_followers" />
|
||
|
<field name="activity_ids" widget="mail_activity" />
|
||
|
<field name="message_ids" widget="mail_thread" />
|
||
|
</div>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
<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>
|
||
|
<field
|
||
|
name="cutoff_type"
|
||
|
readonly="state == 'done'"
|
||
|
column_invisible="context.get('default_cutoff_type')"
|
||
|
/>
|
||
|
<field name="cutoff_date" decoration-bf="1" />
|
||
|
<field name="move_ref" optional="hide" />
|
||
|
<field name="total_cutoff_amount" />
|
||
|
<field name="company_currency_id" column_invisible="1" />
|
||
|
<field name="company_id" optional="show" />
|
||
|
<field
|
||
|
name="state"
|
||
|
widget="badge"
|
||
|
decoration-info="state == 'draft'"
|
||
|
decoration-success="state == 'done'"
|
||
|
/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
<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>
|
||
|
<field name="cutoff_date" />
|
||
|
<filter
|
||
|
name="draft"
|
||
|
string="Draft"
|
||
|
domain="[('state', '=', 'draft')]"
|
||
|
/>
|
||
|
<filter name="done" string="Done" domain="[('state', '=', 'done')]" />
|
||
|
<separator />
|
||
|
<filter string="Cutoff Date" name="cutoff_date" date="cutoff_date" />
|
||
|
<group string="Group By" name="groupby">
|
||
|
<filter
|
||
|
name="state_groupby"
|
||
|
string="State"
|
||
|
context="{'group_by': 'state'}"
|
||
|
/>
|
||
|
<filter
|
||
|
name="cutoff_date_groupby"
|
||
|
string="Cutoff Date"
|
||
|
context="{'group_by': 'cutoff_date'}"
|
||
|
/>
|
||
|
|
||
|
</group>
|
||
|
</search>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="account_revenue_accrual_action" model="ir.actions.act_window">
|
||
|
<field name="name">Accrued Revenue</field>
|
||
|
<field name="res_model">account.cutoff</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="domain">[('cutoff_type', '=', 'accrued_revenue')]</field>
|
||
|
<field name="context">{'default_cutoff_type': 'accrued_revenue'}</field>
|
||
|
</record>
|
||
|
<menuitem
|
||
|
id="account_revenue_accrual_menu"
|
||
|
parent="cutoff_menu"
|
||
|
action="account_revenue_accrual_action"
|
||
|
sequence="10"
|
||
|
/>
|
||
|
|
||
|
<record id="account_expense_accrual_action" model="ir.actions.act_window">
|
||
|
<field name="name">Accrued Expense</field>
|
||
|
<field name="res_model">account.cutoff</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="domain">[('cutoff_type', '=', 'accrued_expense')]</field>
|
||
|
<field name="context">{'default_cutoff_type': 'accrued_expense'}</field>
|
||
|
</record>
|
||
|
<menuitem
|
||
|
id="account_expense_accrual_menu"
|
||
|
parent="cutoff_menu"
|
||
|
action="account_expense_accrual_action"
|
||
|
sequence="20"
|
||
|
/>
|
||
|
|
||
|
<record id="account_cutoff_prepaid_revenue_action" model="ir.actions.act_window">
|
||
|
<field name="name">Prepaid Revenue</field>
|
||
|
<field name="res_model">account.cutoff</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="domain">[('cutoff_type', '=', 'prepaid_revenue')]</field>
|
||
|
<field name="context">{'default_cutoff_type': 'prepaid_revenue'}</field>
|
||
|
</record>
|
||
|
<menuitem
|
||
|
id="account_cutoff_prepaid_revenue_menu"
|
||
|
parent="cutoff_menu"
|
||
|
action="account_cutoff_prepaid_revenue_action"
|
||
|
sequence="30"
|
||
|
/>
|
||
|
|
||
|
<record id="account_cutoff_prepaid_expense_action" model="ir.actions.act_window">
|
||
|
<field name="name">Prepaid Expense</field>
|
||
|
<field name="res_model">account.cutoff</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="domain">[('cutoff_type', '=', 'prepaid_expense')]</field>
|
||
|
<field name="context">{'default_cutoff_type': 'prepaid_expense'}</field>
|
||
|
</record>
|
||
|
<menuitem
|
||
|
id="account_cutoff_prepaid_expense_menu"
|
||
|
parent="cutoff_menu"
|
||
|
action="account_cutoff_prepaid_expense_action"
|
||
|
sequence="40"
|
||
|
/>
|
||
|
</flectra>
|