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" />
|
2023-02-08 05:57:36 +01:00
|
|
|
<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"
|
2020-09-07 14:31:18 +02:00
|
|
|
domain="[('company_id', '=', company_id), ('deprecated', '=', False), ('internal_type','!=','liquidity'), ('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"
|
2021-10-01 11:50:58 +02:00
|
|
|
attrs="{'invisible': [('use_invoice_line_account', '=', False)], 'required': [('use_invoice_line_account', '=', True)]}"
|
2020-09-07 14:17:04 +02:00
|
|
|
domain="[('company_id', '=', company_id), ('deprecated', '=', False)]"
|
|
|
|
options="{'no_create': True}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="spread_journal_id"
|
|
|
|
domain="[('company_id', '=', company_id)]"
|
|
|
|
widget="selection"
|
|
|
|
/>
|
2018-10-22 12:27:50 +02:00
|
|
|
</group>
|
|
|
|
</group>
|
2020-05-17 16:37:40 +02:00
|
|
|
<div>
|
2020-09-07 14:17:04 +02:00
|
|
|
<field name="auto_spread" />
|
|
|
|
<label for="auto_spread" />
|
2020-05-17 16:37:40 +02:00
|
|
|
</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"
|
|
|
|
>
|
2020-05-17 16:37:40 +02:00
|
|
|
<tree editable="bottom">
|
2020-09-07 14:17:04 +02:00
|
|
|
<field name="name" />
|
|
|
|
<field name="product_id" />
|
|
|
|
<field name="account_id" />
|
|
|
|
<field
|
|
|
|
name="analytic_account_id"
|
|
|
|
groups="analytic.group_analytic_accounting"
|
|
|
|
/>
|
2020-05-17 16:37:40 +02:00
|
|
|
</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>
|