odoo/addons/account_test/account_test_view.xml

80 lines
3.1 KiB
XML

<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="account_assert_tree">
<field name="name">Tests</field>
<field name="model">accounting.assert.test</field>
<field name="arch" type="xml">
<tree string="Tests">
<field name="sequence"/>
<field name="name"/>
<field name="desc"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="account_assert_form">
<field name="name">Tests</field>
<field name="model">accounting.assert.test</field>
<field name="arch" type="xml">
<form string="Tests" version="7.0">
<sheet>
<group>
<group>
<field name="name"/>
<field name="sequence"/>
</group>
<group>
<field name="active"/>
</group>
</group>
<notebook>
<page string="Description">
<field name="desc" nolabel="1"/>
</page>
<page string="Expression">
<group string="Python Code">
<field colspan="4" name="code_exec" nolabel="1"/>
</group>
<group string="Code Help">
<pre>
You can write a query in order to create Consistency Test and you will get the result of the test
in PDF format which can be accessed by Menu Reporting -> Accounting Tests, then select the test
and print the report from Print button in header area.
You can also use the following functions:
get_parent(acc_id) : return parent id of analytic account(acc_id)
reconciled_inv() : returns ids of records which are reconciled
Example:
sql = 'select id, name, ref, date from account_move_line where account_id in
(select id from account_account where type = 'view')'
cr.execute(sql)
result = cr.dictfetchall()
</pre>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_accounting_assert">
<field name="name">Accounting Tests</field>
<field name="res_model">accounting.assert.test</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create Accounting Test.
</p>
</field>
</record>
<menuitem name="Accounting Tests" parent="account.menu_finance_reporting" id="menu_action_license" action="action_accounting_assert"/>
</data>
</openerp>