2
0
account-financial-tools/account_move_template/view/account_move_template.xml

194 lines
8.1 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="account_move_template_line_tree" model="ir.ui.view">
<field name="name">account.move.template.line.tree</field>
<field name="model">account.move.template.line</field>
<field name="arch" type="xml">
<tree>
<field name="sequence" />
<field name="account_id" />
<field name="opt_account_id" />
<field name="partner_id" />
<field name="name" />
<field
name="analytic_distribution"
widget="analytic_distribution"
groups="analytic.group_analytic_accounting"
/>
<field name="move_line_type" />
<field name="type" />
<field name="note" />
<field name="tax_line_id" invisible="1" />
<field
name="tax_ids"
widget="many2many_tags"
options="{'no_create': True}"
/>
<field name="payment_term_id" />
<field name="company_id" invisible="1" />
<field name="company_currency_id" invisible="1" />
</tree>
</field>
</record>
<record id="account_move_template_line_form" model="ir.ui.view">
<field name="name">account.move.template.line.form</field>
<field name="model">account.move.template.line</field>
<field name="arch" type="xml">
<form string="Journal Entry Template Line">
<sheet>
<group name="main">
<group name="main-left">
<field name="sequence" />
<field name="account_id" />
<field name="opt_account_id" />
<field name="partner_id" />
<field name="name" />
<field
name="analytic_distribution"
widget="analytic_distribution"
groups="analytic.group_analytic_accounting"
options="{'account_field': 'account_id'}"
/>
<field name="payment_term_id" />
<field name="is_refund" />
<field name="tax_line_id" />
<field
name="tax_repartition_line_id"
attrs="{'invisible': [('tax_line_id','=',False)]}"
/>
<field name="tax_ids" widget="many2many_tags" />
<field name="company_id" invisible="1" />
</group>
<group name="main-right">
<field name="move_line_type" />
<field name="type" widget="radio" />
<field name="note" />
>
<div
name="python_code_help"
colspan="2"
attrs="{'invisible': [('type', '!=', 'computed')]}"
>
<p
>You can refer to other lines using their sequence number e.g. <i
>L1</i> for line with sequence = 1. Examples:</p>
<ul>
<li>L1 * 0.2</li>
<li>L2 - L1</li>
<li>L1 + L2 + L3</li>
<li>1250</li>
</ul>
</div>
<field
name="python_code"
attrs="{'invisible': [('type', '!=', 'computed')], 'required': [('type', '=', 'computed')]}"
/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="account_move_template_form" model="ir.ui.view">
<field name="name">account.move.template.form</field>
<field name="model">account.move.template</field>
<field name="arch" type="xml">
<form string="Journal Entry Template">
<header>
<button
string="Generate Journal Entry"
name="generate_journal_entry"
class="btn-primary"
type="object"
/>
</header>
<sheet>
<widget
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<div class="oe_title">
<label for="name" class="oe_edit_only" />
<h1>
<field name="active" invisible="1" />
<field name="name" />
</h1>
</div>
<group name="main">
<group name="main-left">
<field name="company_id" invisible="1" />
<field
name="company_id"
widget="selection"
groups="base.group_multi_company"
/>
<field
name="journal_id"
options="{'no_open': True, 'no_create': True}"
/>
</group>
<group name="main-right">
<field name="ref" />
</group>
</group>
<group name="lines">
<field
name="line_ids"
nolabel="1"
context="{'default_company_id': company_id}"
colspan="2"
/>
</group>
</sheet>
</form>
</field>
</record>
<record id="account_move_template_tree" model="ir.ui.view">
<field name="name">account.move.template.tree</field>
<field name="model">account.move.template</field>
<field name="arch" type="xml">
<tree>
<field name="name" />
<field name="journal_id" />
<field name="company_id" groups="base.group_multi_company" />
</tree>
</field>
</record>
<record id="account_move_template_search" model="ir.ui.view">
<field name="name">account.move.template.search</field>
<field name="model">account.move.template</field>
<field name="arch" type="xml">
<search string="Journal Entry Template">
<filter
string="Archived"
name="inactive"
domain="[('active','=',False)]"
/>
<field name="name" />
<group name="groupby">
<filter
name="journal_groupby"
string="Journal"
context="{'group_by': 'journal_id'}"
/>
</group>
</search>
</field>
</record>
<record id="account_move_template_action" model="ir.actions.act_window">
<field name="name">Journal Entry Templates</field>
<field name="res_model">account.move.template</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem
id="account_move_template_menu"
action="account_move_template_action"
parent="account.account_account_menu"
sequence="300"
/>
</odoo>