account-closing/account_cutoff_accrual_base/views/account_cutoff_view.xml

83 lines
3.5 KiB
XML
Raw Permalink Normal View History

2021-03-23 19:28:14 +00:00
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __flectra__.py
-->
<flectra>
<!-- Form view for lines -->
<record id="account_cutoff_line_form" model="ir.ui.view">
<field name="name">accrual.account_cutoff_line</field>
<field name="model">account.cutoff.line</field>
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_line_form"/>
<field name="arch" type="xml">
<field name="amount" position="before">
<field name="quantity" invisible="'accrued' not in context.get('type', '-')"/>
<field name="price_unit" widget="monetary" options="{'currency_field': 'currency_id'}" invisible="'accrued' not in context.get('type', '-')"/>
</field>
</field>
</record>
<!-- Tree view for lines -->
<record id="account_cutoff_line_tree" model="ir.ui.view">
<field name="name">accrual.account_cutoff_line_tree</field>
<field name="model">account.cutoff.line</field>
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_line_tree"/>
<field name="arch" type="xml">
<field name="analytic_account_code" position="after">
<field name="quantity" invisible="'accrued' not in context.get('type', '-')"/>
<field name="price_unit" invisible="'accrued' not in context.get('type', '-')"/>
</field>
</field>
</record>
<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_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('cutoff_type', '=', 'accrued_expense')]</field>
<field name="context">{'cutoff_type': 'accrued_expense'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start preparing a new expense accrual.
</p><p>
This view can be used by accountants in order to collect information about accrued expenses. It then allows to generate the corresponding cut-off journal entry in one click.
</p>
</field>
</record>
<menuitem id="account_expense_accrual_menu"
parent="account_cutoff_base.cutoff_menu"
action="account_expense_accrual_action"
sequence="35"/>
<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_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('cutoff_type', '=', 'accrued_revenue')]</field>
<field name="context">{'cutoff_type': 'accrued_revenue'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start preparing a new revenue accrual.
</p><p>
This view can be used by accountants in order to collect information about accrued revenue. It then allows to generate the corresponding cut-off journal entry in one click.
</p>
</field>
</record>
<menuitem id="account_revenue_accrual_menu"
parent="account_cutoff_base.cutoff_menu"
action="account_revenue_accrual_action"
sequence="30"/>
</flectra>