2018-10-22 12:27:50 +02:00
<?xml version="1.0" encoding="utf-8"?>
<odoo >
<record id= "view_account_spread" model= "ir.ui.view" >
<field name= "model" > account.spread</field>
<field name= "arch" type= "xml" >
<form >
<header >
<button name= "compute_spread_board" type= "object" string= "Recalculate unposted lines" class= "oe_highlight" attrs= "{'invisible': [('debit_account_id', '=', False)]}" />
<button name= "action_recalculate_spread" type= "object" string= "Recalculate entire spread" attrs= "{'invisible': [('debit_account_id', '=', 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" />
</header>
<sheet >
<div class= "oe_button_box" >
<button name= "open_reconcile_view"
class="oe_stat_button"
icon="fa-bars"
type="object"
string="Reconciled entries">
</button>
</div>
<div class= "oe_title" >
<label for= "name" string= "Spread Board Name" />
<h1 > <field name= "name" placeholder= "e.g. One year offices cleaning contract" /> </h1>
</div>
<group name= "header_info" >
<group name= "spread_definitions" >
<field name= "template_id" />
<field name= "invoice_type" attrs= "{'readonly':[('invoice_line_id','!=',False)]}" />
</group>
</group>
<group name= "accounts" >
<group name= "debits" >
<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'))]}"/>
<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>
<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>
<field name= "debit_account_id" required= "1" domain= "[('company_id', '=', company_id), ('deprecated', '=', False)]" attrs= "{'readonly':[('invoice_line_id','!=',False)]}" />
<span class= "help-block text-danger" colspan= "2"
attrs="{'invisible':[('is_debit_account_deprecated','!=',True)]}">
This account in deprecated! The reconciliation will be NOT possible.
</span>
</group>
<group name= "credits" >
<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'))]}"/>
<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>
<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>
<field name= "credit_account_id" required= "1" domain= "[('company_id', '=', company_id), ('deprecated', '=', False)]" attrs= "{'readonly':[('invoice_line_id','!=',False)]}" />
<span class= "help-block text-danger" colspan= "2"
attrs="{'invisible':[('is_credit_account_deprecated','!=',True)]}">
This account in deprecated! The reconciliation will be NOT possible.
</span>
</group>
</group>
<group name= "main_info" >
<group >
<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" />
</group>
<group >
<field name= "period_number" />
<field name= "period_type" />
<field name= "spread_date" />
<field name= "journal_id" domain= "[('company_id', '=', company_id)]" widget= "selection" />
</group>
</group>
<notebook name= "notebook" >
<page name= "spread_lines" string= "Spread lines" >
<field name= "line_ids" readonly= "1" >
<tree >
<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" />
2018-12-20 10:21:14 +01:00
<button name= "create_move" icon= "fa-play" string= "Create Move" type= "object" groups= "account.group_account_manager"
2018-10-22 12:27:50 +02:00
attrs="{'invisible':['|',('move_id','!=',False)]}"/>
2018-12-20 10:21:14 +01:00
<button name= "open_move" icon= "fa-plus-square-o" string= "View Move" type= "object"
2018-10-22 12:27:50 +02:00
attrs="{'invisible':[('move_id','=',False)]}"/>
2018-12-20 10:21:14 +01:00
<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"
2018-10-22 12:27:50 +02:00
attrs="{'invisible':[('move_id','=',False)]}"/>
</tree>
</field>
<group name= "extension" >
<group name= "extension_left" >
</group>
<group name= "extension_right" >
2018-12-21 09:17:51 +01:00
<field name= "display_create_all_moves" invisible= "1" />
<button name= "create_all_moves" string= "Create All Moves" type= "object"
icon="fa-play" attrs="{'invisible':[('display_create_all_moves','!=',True)]}"/>
2018-10-22 12:27:50 +02:00
<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)]}" />
</group>
</group>
</page>
<page name= "details" string= "Details" >
<group name= "extra_details" >
<group >
<field name= "company_id" groups= "base.group_multi_company" options= "{'no_create': True}" />
<field name= "currency_id" groups= "base.group_multi_currency" />
</group>
<group >
<field name= "account_analytic_id" domain= "[('company_id', '=', company_id)]" groups= "analytic.group_analytic_accounting" options= "{'no_create': True}" />
<field name= "analytic_tag_ids" groups= "analytic.group_analytic_accounting" widget= "many2many_tags" />
</group>
</group>
</page>
</notebook>
</sheet>
<div class= "oe_chatter" >
<field name= "message_follower_ids" widget= "mail_followers" />
<field name= "message_ids" widget= "mail_thread" />
</div>
</form>
</field>
</record>
<record id= "view_account_spread_account_manager" model= "ir.ui.view" >
<field name= "model" > account.spread</field>
<field name= "inherit_id" ref= "view_account_spread" />
<field name= "groups_id" eval= "[(4, ref('account.group_account_manager'))]" />
<field name= "arch" type= "xml" >
<tree position= "attributes" >
<attribute name= "editable" > 1</attribute>
</tree>
<field name= "amount" position= "attributes" >
<attribute name= "readonly" />
</field>
<field name= "line_ids" position= "attributes" >
<attribute name= "readonly" />
</field>
</field>
</record>
<record id= "view_account_spread_tree" model= "ir.ui.view" >
<field name= "model" > account.spread</field>
<field name= "arch" type= "xml" >
<tree >
<field name= "name" />
<field name= "company_id" groups= "base.group_multi_company" />
</tree>
</field>
</record>
<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_type" > form</field>
<field name= "view_mode" > tree,form</field>
<field name= "view_id" ref= "view_account_spread_tree" />
</record>
<menuitem id= "menu_action_account_spread_form"
parent="account.menu_finance_entries_accounting_entries"
action="action_account_spread_form"
groups="account.group_account_user,account.group_account_manager"/>
</odoo>