mirror of
https://gitlab.com/flectra-community/account-closing.git
synced 2024-11-22 21:52:04 +00:00
99 lines
4.3 KiB
XML
99 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!--
|
|
Copyright 2013-2022 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>
|
|
<record id="account_cutoff_tree" model="ir.ui.view">
|
|
<field name="name">account.cutoff.start.end.dates.tree</field>
|
|
<field name="model">account.cutoff</field>
|
|
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_tree" />
|
|
<field name="arch" type="xml">
|
|
<field name="cutoff_date" position="after">
|
|
<field
|
|
name="start_date"
|
|
column_invisible="'prepaid' not in context.get('default_cutoff_type', '-')"
|
|
invisible="state != 'forecast'"
|
|
optional="hide"
|
|
/>
|
|
<field
|
|
name="end_date"
|
|
column_invisible="'prepaid' not in context.get('default_cutoff_type', '-')"
|
|
invisible="state != 'forecast'"
|
|
optional="hide"
|
|
/>
|
|
</field>
|
|
<field name="cutoff_date" position="attributes">
|
|
<attribute name="invisible">state == 'forecast'</attribute>
|
|
</field>
|
|
<field name="state" position="attributes">
|
|
<attribute name="decoration-warning">state == 'forecast'</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
<record id="account_cutoff_form" model="ir.ui.view">
|
|
<field name="name">account.cutoff.start.end.dates.form</field>
|
|
<field name="model">account.cutoff</field>
|
|
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_form" />
|
|
<field name="arch" type="xml">
|
|
<button name="create_move" position="after">
|
|
<button
|
|
name="forecast_enable"
|
|
type="object"
|
|
string="Enable Forecast Mode"
|
|
invisible="state != 'draft' or cutoff_type not in ('prepaid_revenue', 'prepaid_expense')"
|
|
/>
|
|
<button
|
|
name="forecast_disable"
|
|
type="object"
|
|
string="Leave Forecast Mode"
|
|
invisible="state != 'forecast'"
|
|
/>
|
|
</button>
|
|
<field name="cutoff_date" position="before">
|
|
<!-- I don't set the fields start_date and end_date
|
|
as required, to make it easier for users
|
|
to leave forecast mode if they entered it by mistake -->
|
|
<field name="start_date" invisible="state != 'forecast'" />
|
|
<field name="end_date" invisible="state != 'forecast'" />
|
|
</field>
|
|
<field name="cutoff_date" position="attributes">
|
|
<attribute name="invisible">state not in ['draft', 'done']</attribute>
|
|
</field>
|
|
<field name="state" position="attributes">
|
|
<attribute name="statusbar_visible">draft,done</attribute>
|
|
</field>
|
|
<group name="accounting-params" position="attributes">
|
|
<attribute name="invisible">state not in ['draft', 'done']</attribute>
|
|
</group>
|
|
<field name="source_move_state" position="after">
|
|
<field
|
|
name="source_journal_ids"
|
|
widget="many2many_tags"
|
|
readonly="state == 'done'"
|
|
/>
|
|
</field>
|
|
<button name="get_lines" position="attributes">
|
|
<attribute
|
|
name="invisible"
|
|
>state not in ['draft', 'forecast']</attribute>
|
|
</button>
|
|
</field>
|
|
</record>
|
|
<record id="account_cutoff_filter" model="ir.ui.view">
|
|
<field name="name">account.cutoff.start.end.dates.search</field>
|
|
<field name="model">account.cutoff</field>
|
|
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_filter" />
|
|
<field name="arch" type="xml">
|
|
<filter name="draft" position="after">
|
|
<filter
|
|
name="forecast"
|
|
string="Forecast"
|
|
domain="[('state', '=', 'forecast')]"
|
|
/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
</flectra>
|