136 lines
6.3 KiB
XML
136 lines
6.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_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="name"/>
|
|
<field name="journal_id" domain="[('company_id','=',company_id)]"/>
|
|
<field name="account_id" domain="[('company_id','=',company_id)]"/>
|
|
<field name="partner_id"/>
|
|
<field name="analytic_account_id" domain="[('company_id','=',company_id)]" groups="analytic.group_analytic_accounting"/>
|
|
<field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_accounting"/>
|
|
<field name="tax_line_id"/>
|
|
<field name="tax_ids" widget="many2many_tags"/>
|
|
<field name="type"/>
|
|
<field name="python_code"/>
|
|
<field name="move_line_type"/>
|
|
<field name="company_id" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_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>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="sequence"/>
|
|
<field name="journal_id" domain="[('company_id','=',company_id)]"/>
|
|
<field name="account_id" domain="[('company_id','=',company_id)]"/>
|
|
<field name="partner_id"/>
|
|
<field name="company_id" invisible="1"/>
|
|
</group>
|
|
<group groups="analytic.group_analytic_accounting" string="Analytic">
|
|
<field name="analytic_account_id" domain="[('company_id','=',company_id)]"/>
|
|
<field name="analytic_tag_ids" widget="many2many_tags"/>
|
|
</group>
|
|
<group>
|
|
<field name="type"/>
|
|
<field name="move_line_type"/>
|
|
</group>
|
|
<group string="Taxes">
|
|
<field name="tax_line_id"/>
|
|
<field name="tax_ids" widget="many2many_tags"/>
|
|
</group>
|
|
</group>
|
|
<label for="python_code" string="Python Code"
|
|
attrs="{'invisible': [('type', '!=', 'computed')]}" nolabel="1"/>
|
|
<field name="python_code" colspan="4" attrs="{'readonly': [('type', '!=', 'computed')]}" nolabel="1"/>
|
|
<div class="oe_account_help">You can refer to other lines using their
|
|
sequence number (e.g. 'L(1)' for first line).
|
|
Examples of code: 'L(1) * 0.2'; 'L(2) - L(1)'; 'L(1)
|
|
+ L(2) + L(3)'; '1250'</div>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_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="Test template"
|
|
name="action_run_template"
|
|
class="btn-primary"
|
|
type="object"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<label for="name" class="oe_edit_only"/>
|
|
<h1><field name="name"/></h1>
|
|
</div>
|
|
<group>
|
|
<field name="company_id" widget='selection' groups="base.group_multi_company"/>
|
|
<field name="journal_id" widget='selection'/>
|
|
</group>
|
|
<field nolabel="1" name="template_line_ids" context="{'default_company_id' : company_id}"/>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<!--<field name="activity_ids"
|
|
widget="mail_activity"/> TODO: uncomment on saas-15-->
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_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="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_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">
|
|
<group>
|
|
<separator orientation="vertical"/>
|
|
<field name="name"/>
|
|
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_move_template_form" model="ir.actions.act_window">
|
|
<field name="name">Journal Entry Templates</field>
|
|
<field name="res_model">account.move.template</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="search_view_id" ref="view_move_template_search"/>
|
|
</record>
|
|
|
|
<menuitem
|
|
action="action_move_template_form"
|
|
id="menu_action_move_template_form" sequence="300"
|
|
parent="account.account_account_menu"
|
|
groups="account.group_account_manager"/>
|
|
</odoo>
|