[REF] account_statement_ext - simplify xpath in xml views

This commit is contained in:
Yannick Vaucher
2013-06-28 16:16:00 +02:00
parent ab44bf61aa
commit 81f89c49f1

View File

@@ -99,8 +99,8 @@
<field name="arch" type="xml">
<!-- Add before the group : profile and related infos -->
<xpath expr="/form/sheet/group/group/field[@name='journal_id']" position="replace">
</xpath>
<field name="journal_id" position="replace">
</field>
<xpath expr="/form/sheet/group" position="after">
<group>
@@ -114,35 +114,35 @@
</xpath>
# Make balance visible or not depending on profile
<xpath expr="/form/sheet/group/group/field[@name='balance_start']" position="attributes">
<field name="balance_start" position="attributes">
<attribute name="attrs">{'invisible':[('balance_check','=',False)]}</attribute>
</xpath>
<xpath expr="/form/sheet/group/group/field[@name='balance_end_real']" position="attributes">
</field>
<field name="balance_end_real" position="attributes">
<attribute name="attrs">{'invisible':[('balance_check','=',False)]}</attribute>
</xpath>
<xpath expr="/form/sheet/group/group/field[@name='balance_end_real']" position="after">
</field>
<field name="balance_end_real" position="after">
<field name="balance_end" widget="monetary" options='{"currency_field" : "currency"}' attrs="{'invisible':[('balance_check','=',False)]}"/>
</xpath>
</field>
<xpath expr="/form/sheet/notebook/page/field/tree/field[@name='sequence']" position="after">
<xpath expr="//field[@name='line_ids']/tree/field[@name='sequence']" position="after">
<field name="id" readonly="1" />
</xpath>
<xpath expr="/form/sheet/notebook/page/field/form/group/field[@name='date']" position="before">
<xpath expr="//field[@name='line_ids']/form//field[@name='date']" position="before">
<field name="id" readonly="1" />
</xpath>
# Adapt onchange signature
<xpath expr="/form/sheet/notebook/page/field/tree/field[@name='partner_id']" position="replace">
# Adapt onchange signature
<xpath expr="//field[@name='line_ids']/tree/field[@name='partner_id']" position="replace">
<field name="partner_id" on_change="onchange_partner_id(partner_id,parent.profile_id)" domain="['|',('parent_id','=',False),('is_company','=',True)]"/>
</xpath>
<xpath expr="/form/sheet/notebook/page/field/form/group/field[@name='partner_id']" position="replace">
<xpath expr="//field[@name='line_ids']/form//field[@name='partner_id']" position="replace">
<field name="partner_id" on_change="onchange_partner_id(partner_id,parent.profile_id)" domain="['|',('parent_id','=',False),('is_company','=',True)]"/>
</xpath>
<xpath expr="/form/sheet/notebook/page/field/form/group/field[@name='type']" position="replace">
<xpath expr="//field[@name='line_ids']/form//field[@name='type']" position="replace">
<field name="type" on_change="onchange_type(partner_id, type, parent.profile_id)"/>
</xpath>
<xpath expr="/form/sheet/notebook/page/field/tree/field[@name='type']" position="replace">
<xpath expr="//field[@name='line_ids']/tree/field[@name='type']" position="replace">
<field name="type" on_change="onchange_type(partner_id, type, parent.profile_id)"/>
</xpath>