2
0
account-financial-tools/account_spread_cost_revenue/views/account_spread.xml

387 lines
20 KiB
XML
Raw Permalink Normal View History

2020-09-07 14:17:04 +02:00
<?xml version="1.0" encoding="utf-8" ?>
2018-10-22 12:27:50 +02:00
<odoo>
<record id="view_account_spread" model="ir.ui.view">
<field name="model">account.spread</field>
<field name="arch" type="xml">
<form>
<header>
2020-09-07 14:17:04 +02:00
<button
name="compute_spread_board"
type="object"
string="Recalculate unposted lines"
class="oe_highlight"
attrs="{'invisible': ['|',('debit_account_id', '=', False),('display_recompute_buttons', '=', False)]}"
/>
<button
name="action_recalculate_spread"
type="object"
string="Recalculate entire spread"
attrs="{'invisible': ['|',('debit_account_id', '=', False),('display_recompute_buttons', '=', False)]}"
groups="account.group_account_manager"
/>
<button
name="action_undo_spread"
type="object"
string="Undo spread"
attrs="{'invisible': [('line_ids', '=', [])]}"
groups="account.group_account_manager"
/>
<button
name="action_unlink_invoice_line"
type="object"
string="Unlink Invoice Line"
attrs="{'invisible': [('invoice_line_id', '=', False)]}"
groups="account.group_account_manager"
/>
2018-10-22 12:27:50 +02:00
</header>
<sheet>
<div name="button_box" class="oe_button_box">
2020-09-07 14:17:04 +02:00
<button
name="open_posted_view"
2018-10-22 12:27:50 +02:00
class="oe_stat_button"
icon="fa-bars"
type="object"
string="Posted entries"
2020-09-07 14:17:04 +02:00
>
2018-10-22 12:27:50 +02:00
</button>
</div>
<widget
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
2018-10-22 12:27:50 +02:00
<div class="oe_title">
2020-09-07 14:17:04 +02:00
<label for="name" string="Spread Board Name" />
<h1>
<field
name="name"
placeholder="e.g. One year offices cleaning contract"
/>
</h1>
2018-10-22 12:27:50 +02:00
</div>
<group name="header_info">
<group name="spread_definitions">
2020-09-07 14:17:04 +02:00
<field name="template_id" />
<field
name="invoice_type"
attrs="{'readonly':[('invoice_line_id','!=',False)]}"
/>
<field name="display_recompute_buttons" invisible="1" />
<field name="display_move_line_auto_post" invisible="1" />
<field name="all_posted" invisible="1" />
<field name="active" invisible="1" />
2020-09-07 14:17:04 +02:00
<field name="use_invoice_line_account" invisible="1" />
2018-10-22 12:27:50 +02:00
</group>
</group>
<group name="accounts">
<group name="debits">
2020-09-07 14:17:04 +02:00
<field name="is_debit_account_deprecated" invisible="1" />
<label
for="debit_account_id"
colspan="3"
string="Balance sheet account / Spread account"
attrs="{'invisible':[('invoice_type','not in',('out_invoice','in_refund'))]}"
/>
<label
for="debit_account_id"
colspan="3"
string="Expense account"
attrs="{'invisible':[('invoice_type','not in',('in_invoice','out_refund'))]}"
/>
<div
attrs="{'invisible': [('use_invoice_line_account', '=', True)]}"
colspan="3"
2020-09-07 14:17:04 +02:00
>
<span
class="help-block"
colspan="2"
attrs="{'invisible':[('invoice_type','not in',('out_invoice','in_refund'))]}"
>
The Balance Sheet account used for the spreading.<br
/>This account is the counterpart of the account in the invoice line.
</span>
2020-09-07 14:17:04 +02:00
<span
class="help-block"
colspan="2"
attrs="{'invisible':[('invoice_type','not in',('in_invoice','out_refund'))]}"
>
The Expense account in the vendor bill line.<br
/>Usually the same account of the vendor bill line.
</span>
</div>
2020-09-07 14:17:04 +02:00
<div
attrs="{'invisible': [('use_invoice_line_account', '!=', True)]}"
colspan="3"
2020-09-07 14:17:04 +02:00
>
<span
class="help-block"
colspan="2"
attrs="{'invisible':[('invoice_type','not in',('out_invoice','in_refund'))]}"
>
The Balance Sheet account.<br
/>This is the account in the invoice line.
</span>
2020-09-07 14:17:04 +02:00
<span
class="help-block"
colspan="2"
attrs="{'invisible':[('invoice_type','not in',('in_invoice','out_refund'))]}"
>
The Expense account used for the spreading.<br
/>This account is the counterpart of the account of the vendor bill line.
</span>
</div>
2020-09-07 14:17:04 +02:00
<field
name="debit_account_id"
required="1"
domain="[('deprecated', '=', False), ('account_type', 'not in', ('asset_cash','liability_credit_card')), ('internal_group', '!=', 'off_balance')]"
2020-09-07 14:17:04 +02:00
attrs="{'readonly':[('invoice_line_id','!=',False)]}"
/>
<span
class="help-block text-danger"
colspan="2"
attrs="{'invisible':[('is_debit_account_deprecated','!=',True)]}"
>
2018-10-22 12:27:50 +02:00
This account in deprecated! The reconciliation will be NOT possible.
</span>
</group>
<group name="credits">
2020-09-07 14:17:04 +02:00
<field name="is_credit_account_deprecated" invisible="1" />
<label
for="credit_account_id"
colspan="3"
string="Revenue account"
attrs="{'invisible':[('invoice_type','not in',('out_invoice','in_refund'))]}"
/>
<label
for="credit_account_id"
colspan="3"
string="Balance sheet account / Spread account"
attrs="{'invisible':[('invoice_type','not in',('in_invoice','out_refund'))]}"
/>
<div
attrs="{'invisible': [('use_invoice_line_account', '=', True)]}"
colspan="3"
2020-09-07 14:17:04 +02:00
>
<span
class="help-block"
colspan="2"
attrs="{'invisible':[('invoice_type','not in',('out_invoice','in_refund'))]}"
>
The Revenue account in the invoice line.<br
/>Usually the same account of the invoice line.
</span>
2020-09-07 14:17:04 +02:00
<span
class="help-block"
colspan="2"
attrs="{'invisible':[('invoice_type','not in',('in_invoice','out_refund'))]}"
>
The Balance Sheet account used for the spreading.<br
/>This account is the counterpart of the account in the vendor bill line.
</span>
</div>
2020-09-07 14:17:04 +02:00
<div
attrs="{'invisible': [('use_invoice_line_account', '!=', True)]}"
colspan="3"
2020-09-07 14:17:04 +02:00
>
<span
class="help-block"
colspan="2"
attrs="{'invisible':[('invoice_type','not in',('out_invoice','in_refund'))]}"
>
The Revenue account used for the spreading.<br
/>This account is the counterpart of the account of the invoice line.
</span>
2020-09-07 14:17:04 +02:00
<span
class="help-block"
colspan="2"
attrs="{'invisible':[('invoice_type','not in',('in_invoice','out_refund'))]}"
>
The Balance Sheet account.<br
/>This is the account in the vendor bill line.
</span>
</div>
2020-09-07 14:17:04 +02:00
<field
name="credit_account_id"
required="1"
domain="[('deprecated', '=', False), ('account_type', 'not in', ('asset_cash','liability_credit_card')), ('internal_group', '!=', 'off_balance')]"
2020-09-07 14:17:04 +02:00
attrs="{'readonly':[('invoice_line_id','!=',False)]}"
/>
<span
class="help-block text-danger"
colspan="2"
attrs="{'invisible':[('is_credit_account_deprecated','!=',True)]}"
>
2018-10-22 12:27:50 +02:00
This account in deprecated! The reconciliation will be NOT possible.
</span>
</group>
</group>
<group name="main_info">
<group>
2020-09-07 14:17:04 +02:00
<field
name="invoice_id"
attrs="{'invisible':[('invoice_id','=',False)]}"
/>
<field
name="invoice_line_id"
readonly="1"
attrs="{'invisible':[('invoice_line_id','=',False)]}"
/>
<field
name="estimated_amount"
attrs="{'readonly':[('invoice_line_id','!=',False)],'invisible':[('estimated_amount','=',0.0),('invoice_line_id','!=',False)]}"
/>
<field
name="total_amount"
attrs="{'invisible':[('invoice_line_id','=',False)]}"
/>
<field
name="move_line_auto_post"
attrs="{'invisible':[('display_move_line_auto_post','=',False)]}"
/>
2018-10-22 12:27:50 +02:00
</group>
<group>
2020-09-07 14:17:04 +02:00
<field name="period_number" />
<field name="period_type" />
<field name="spread_date" />
<field name="days_calc" />
<field name="suitable_journal_ids" invisible="1" />
<field name="journal_id" widget="selection" />
2018-10-22 12:27:50 +02:00
</group>
</group>
<notebook name="notebook">
<page name="spread_lines" string="Spread lines">
<field name="line_ids" readonly="1">
<tree>
2020-09-07 14:17:04 +02:00
<field name="name" readonly="1" />
<field
name="amount"
attrs="{'readonly':[('move_id','!=',False)]}"
sum="Total"
/>
<field name="date" readonly="1" />
<field name="move_id" readonly="1" />
<button
name="create_move"
icon="fa-play"
string="Create Move"
type="object"
groups="account.group_account_manager"
attrs="{'invisible':[('move_id','!=',False)]}"
2020-09-07 14:17:04 +02:00
/>
<button
name="open_move"
icon="fa-plus-square-o"
string="View Move"
type="object"
attrs="{'invisible':[('move_id','=',False)]}"
/>
<button
name="unlink_move"
icon="fa-times"
string="Delete Move"
type="object"
confirm="This will delete the move. Are you sure ?"
groups="account.group_account_manager"
attrs="{'invisible':[('move_id','=',False)]}"
/>
2018-10-22 12:27:50 +02:00
</tree>
</field>
<group name="extension">
<group name="extension_left">
</group>
<group name="extension_right">
2020-09-07 14:17:04 +02:00
<field
name="display_create_all_moves"
invisible="1"
/>
<button
name="create_all_moves"
string="Create All Moves"
type="object"
icon="fa-play"
colspan="2"
2020-09-07 14:17:04 +02:00
attrs="{'invisible':[('display_create_all_moves','!=',True)]}"
/>
<field
name="unspread_amount"
attrs="{'invisible': [('unspread_amount', '=', 0)]}"
/>
<field
name="unposted_amount"
attrs="{'invisible': [('unposted_amount', '=', 0)]}"
/>
<field
name="posted_amount"
attrs="{'invisible': [('posted_amount', '=', 0)]}"
/>
2018-10-22 12:27:50 +02:00
</group>
</group>
</page>
<page name="details" string="Details">
<group name="extra_details">
<group>
2020-09-07 14:17:04 +02:00
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
<field
name="currency_id"
groups="base.group_multi_currency"
/>
2018-10-22 12:27:50 +02:00
</group>
<group>
2020-09-07 14:17:04 +02:00
<field
name="analytic_distribution"
2020-09-07 14:17:04 +02:00
groups="analytic.group_analytic_accounting"
widget="analytic_distribution"
2020-09-07 14:17:04 +02:00
/>
2018-10-22 12:27:50 +02:00
</group>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
2020-09-07 14:17:04 +02:00
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
2018-10-22 12:27:50 +02:00
</div>
</form>
</field>
</record>
<record id="view_account_spread_tree" model="ir.ui.view">
<field name="model">account.spread</field>
<field name="arch" type="xml">
<tree>
2020-09-07 14:17:04 +02:00
<field name="name" />
<field name="company_id" groups="base.group_multi_company" />
2018-10-22 12:27:50 +02:00
</tree>
</field>
</record>
2019-08-21 12:11:26 +02:00
<record id="view_account_spread_search" model="ir.ui.view">
<field name="model">account.spread</field>
<field name="arch" type="xml">
<search>
<field name="name" string="Spread" />
2020-09-07 14:17:04 +02:00
<filter
string="Archived"
name="inactive"
domain="[('active','=',False)]"
/>
</search>
2019-08-21 12:11:26 +02:00
</field>
</record>
2018-10-22 12:27:50 +02:00
<record id="action_account_spread_form" model="ir.actions.act_window">
<field name="name">Spread Costs/Revenues</field>
<field name="res_model">account.spread</field>
<field name="view_mode">tree,form</field>
2020-09-07 14:17:04 +02:00
<field name="view_id" ref="view_account_spread_tree" />
2018-10-22 12:27:50 +02:00
</record>
2020-09-07 14:17:04 +02:00
<menuitem
id="menu_action_account_spread_form"
parent="account.menu_finance_entries_accounting_miscellaneous"
2020-09-07 14:17:04 +02:00
action="action_account_spread_form"
groups="account.group_account_user,account.group_account_manager"
/>
2018-10-22 12:27:50 +02:00
</odoo>