[FIX] crm_profiling: backport of cf9230d1ff

Do not redefine the view arch but do a proper inherit.
It was a problem as the redefinition removed some fields (headers,..).
It was also a problem if crm_profiling was uninstalled as the redefinition was
not removed.

Closes #12454
This commit is contained in:
jeffery chen fan 2016-06-16 20:14:30 +08:00 committed by Martin Trigaux
parent ba49172929
commit bcb191f273
No known key found for this signature in database
GPG Key ID: 7B0E288E7C0F83A7
1 changed files with 31 additions and 36 deletions

View File

@ -143,52 +143,47 @@
<!-- CRM Segmentation Form view -->
<record model="ir.ui.view" id="crm.crm_segmentation-view">
<record model="ir.ui.view" id="crm_segmentation-view">
<field name="name">crm.segmentation.form</field>
<field name="model">crm.segmentation</field>
<field name="inherit_id" ref="crm.crm_segmentation-view" />
<field name="arch" type="xml">
<form string="Partner Segmentation">
<group col="4">
<notebook>
<page string="Segmentation">
<separator string="Segmentation Description" colspan="4"/>
<field name="name"/>
<field name="exclusif"/>
<newline/>
<field name="categ_id" colspan="2"/>
<newline/>
<field name="description" colspan="4"/>
<field name="state"/>
<group col="3" colspan="2">
<button name="process_start"
states="not running" string="Compute Segmentation" type="object"
icon="gtk-apply" />
<button name="process_stop" states="running"
string="Stop Process" type="object" icon="gtk-stop" />
<button name="process_continue" states="running"
string="Continue Process" type="object" icon="gtk-go-forward" />
</group>
</page>
<notebook position="replace">
<notebook>
<page string="Sales Purchase">
<field name="sales_purchase_active"/>
<separator string="Segmentation Test" colspan="4"/>
<field name="segmentation_line" widget="one2many_list" colspan="4"/>
<group>
<field name="sales_purchase_active" />
</group>
<separator string="Segmentation Test" />
<field name="segmentation_line" widget="one2many_list" />
</page>
<page string="Profiling">
<field name="profiling_active" colspan="2"/>
<separator string="Profiling Options" colspan="4"/>
<field name="parent_id" colspan="2"/><newline/>
<separator string="Included Answers :" colspan="2" />
<field name="answer_yes" nolabel="1" colspan="2"/>
<separator string="Excluded Answers :" colspan="2"/>
<field name="answer_no" nolabel="1" colspan="2"/>
<group>
<group>
<field name="profiling_active" />
<separator string="Profiling Options" colspan="4" />
<field name="parent_id" />
</group>
<newline/>
<group>
<separator string="Included Answers" />
<field name="answer_yes" nolabel="1" colspan="2" />
</group>
<group>
<separator string="Excluded Answers" />
<field name="answer_no" nolabel="1" colspan="2" />
</group>
</group>
</page>
</notebook>
</group>
</form>
<page string="Description">
<field name="description" />
</page>
</notebook>
</notebook>
</field>
</record>
<!-- CRM Segmentation Tree view -->
<record model="ir.ui.view" id="view_partner_crm_segmentation_tree">