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

99 lines
4.6 KiB
XML
Raw 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_template" model="ir.ui.view">
<field name="model">account.spread.template</field>
<field name="arch" type="xml">
<form>
<header>
</header>
<sheet>
<div class="oe_title">
2020-09-07 14:17:04 +02:00
<label for="name" string="Spread Template Name" />
<h1>
<field
name="name"
placeholder="e.g. Template cleaning contract"
/>
</h1>
2018-10-22 12:27:50 +02:00
</div>
<group name="main_info">
<group>
2020-09-07 14:17:04 +02:00
<field name="spread_type" />
<field
name="company_id"
groups="base.group_multi_company"
/>
<field name="period_number" />
<field name="period_type" />
<field name="start_date" />
<field name="days_calc" />
2018-10-22 12:27:50 +02:00
</group>
<group>
2020-09-07 14:17:04 +02:00
<field name="use_invoice_line_account" />
<field
name="spread_account_id"
domain="[('deprecated', '=', False), ('account_type', 'not in', ('asset_cash','liability_credit_card')), ('internal_group', '!=', 'off_balance')]"
2020-09-07 14:17:04 +02:00
options="{'no_create': True}"
attrs="{'required': [('use_invoice_line_account', '!=', True)], 'invisible': [('use_invoice_line_account', '=', True)]}"
/>
<field
name="exp_rev_account_id"
attrs="{'invisible': [('use_invoice_line_account', '=', False)], 'required': [('use_invoice_line_account', '=', True)]}"
domain="[('deprecated', '=', False)]"
2020-09-07 14:17:04 +02:00
options="{'no_create': True}"
/>
<field name="spread_journal_id" widget="selection" />
2020-09-07 14:17:04 +02:00
<field
name="analytic_distribution"
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>
<div>
2020-09-07 14:17:04 +02:00
<field name="auto_spread" />
<label for="auto_spread" />
</div>
<p attrs="{'invisible': [('auto_spread', '!=', True)]}">
Automatically use this spread template on invoice validation for invoice lines using below product and/or account and/or analytic,
</p>
2020-09-07 14:17:04 +02:00
<field
name="auto_spread_ids"
attrs="{'invisible': [('auto_spread', '!=', True)]}"
nolabel="1"
>
<tree editable="bottom">
2020-09-07 14:17:04 +02:00
<field name="name" />
<field name="product_id" />
<field name="account_id" />
</tree>
</field>
2018-10-22 12:27:50 +02:00
</sheet>
</form>
</field>
</record>
<record id="view_account_spread_template_tree" model="ir.ui.view">
<field name="model">account.spread.template</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" />
<field name="spread_account_id" />
<field name="spread_journal_id" />
2018-10-22 12:27:50 +02:00
</tree>
</field>
</record>
<record id="action_account_spread_template_form" model="ir.actions.act_window">
<field name="name">Spread Templates</field>
<field name="res_model">account.spread.template</field>
<field name="view_mode">tree,form</field>
2020-09-07 14:17:04 +02:00
<field name="view_id" ref="view_account_spread_template_tree" />
2018-10-22 12:27:50 +02:00
</record>
2020-09-07 14:17:04 +02:00
<menuitem
id="menu_action_account_spread_template_form"
parent="account.account_account_menu"
action="action_account_spread_template_form"
groups="account.group_account_manager"
/>
2018-10-22 12:27:50 +02:00
</odoo>