[REV] crm: reverted most changes about stages for this branch.
[odoo/odoo.git] / addons / crm / base_partner_merge_view.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <openerp>
3     <data>
4         <!-- the sequence of the configuration sub menu is 30 -->
5         <menuitem id='root_menu' name='Tools' parent='base.menu_base_partner' sequence="25"/>
6
7         <record model="ir.actions.act_window" id="base_partner_merge_automatic_act">
8             <field name="name">Deduplicate Contacts</field>
9             <field name="res_model">base.partner.merge.automatic.wizard</field>
10             <field name="view_type">form</field>
11             <field name="view_mode">form</field>
12             <field name="target">new</field>
13             <field name="context">{'active_test': False}</field>
14         </record>
15
16         <menuitem id='partner_merge_automatic_menu'
17             action='base_partner_merge_automatic_act'
18             groups='base.group_system'
19             parent='root_menu' />
20
21         <record model='ir.ui.view' id='base_partner_merge_automatic_wizard_form'>
22             <field name='name'>base.partner.merge.automatic.wizard.form</field>
23             <field name='model'>base.partner.merge.automatic.wizard</field>
24             <field name='arch' type='xml'>
25                 <form string='Automatic Merge Wizard' version='7.0'>
26                     <header>
27                         <button name='merge_cb' string='Merge Selection'
28                             class='oe_highlight'
29                             type='object'
30                             attrs="{'invisible': [('state', 'in', ('option', 'finished' ))]}"
31                             />
32                         <button name='next_cb' string='Skip these contacts'
33                             type='object'  class='oe_link'
34                             attrs="{'invisible': [('state', '!=', 'selection')]}" />
35                         <button name='start_process_cb'
36                             string='Merge with Manual Check'
37                             type='object'  class='oe_highlight'
38                             attrs="{'invisible': [('state', '!=', 'option')]}" />
39                         <button name='automatic_process_cb'
40                             string='Merge Automatically'
41                             type='object' class='oe_highlight'
42                             confirm="Are you sure to execute the automatic merge of your contacts ?"
43                             attrs="{'invisible': [('state', '!=', 'option')]}" />
44                         <button name='update_all_process_cb'
45                             string='Merge Automatically all process'
46                             type='object'
47                             confirm="Are you sure to execute the list of automatic merges of your contacts ?"
48                             attrs="{'invisible': [('state', '!=', 'option')]}" />
49                         <span class="or_cancel" attrs="{'invisible': [('state', '=', 'finished')]} ">or
50                             <button name="close_cb" special="nosave" string="Cancel" type="object" class="oe_link oe_inline"/>
51                         </span>
52                         <span class="or_cancel" attrs="{'invisible': [('state', '!=', 'finished')]} ">
53                             <button name="close_cb" special="nosave"
54                                 string="Close"
55                                 type="object"
56                                 class="oe_link oe_inline"/>
57                         </span>
58                     </header>
59                     <sheet>
60                         <group attrs="{'invisible': [('state', '!=', 'finished')]}" col="1">
61                             <h2>There is no more contacts to merge for this request...</h2>
62                             <button name="%(base_partner_merge_automatic_act)d" string="Deduplicate the other Contacts" class="oe_highlight"
63                             type="action"/>
64                         </group>
65                         <p class="oe_grey" attrs="{'invisible': [('state', '!=', ('option'))]}">
66                             Select the list of fields used to search for
67                             duplicated records. If you select several fields,
68                             OpenERP will propose you to merge only those having
69                             all these fields in common. (not one of the fields).
70                         </p>
71                         <group attrs="{'invisible': ['|', ('state', 'not in', ('selection', 'finished')), ('number_group', '=', 0)]}">
72                             <field name="state" invisible="1" />
73                             <field name="number_group"/>
74                         </group>
75                         <group string="Search duplicates based on duplicated data in"
76                             attrs="{'invisible': [('state', 'not in', ('option',))]}">
77                             <field name='group_by_email' />
78                             <field name='group_by_name' />
79                             <field name='group_by_is_company' />
80                             <field name='group_by_vat' />
81                             <field name='group_by_parent_id' />
82                         </group>
83                         <group string="Exclude contacts having"
84                             attrs="{'invisible': [('state', 'not in', ('option',))]}">
85                             <field name='exclude_contact' />
86                             <field name='exclude_journal_item' />
87                         </group>
88                         <separator string="Options" attrs="{'invisible': [('state', 'not in', ('option',))]}"/>
89                         <group attrs="{'invisible': [('state', 'not in', ('option','finished'))]}">
90                             <field name='maximum_group' attrs="{'readonly': [('state', 'in', ('finished'))]}"/>
91                         </group>
92                         <separator string="Merge the following contacts"
93                             attrs="{'invisible': [('state', 'in', ('option', 'finished'))]}"/>
94                         <group attrs="{'invisible': [('state', 'in', ('option', 'finished'))]}" col="1">
95                             <p class="oe_grey">
96                                 The selected contacts will be merged together. All
97                                 documents linking to one of these contacts will be
98                                 redirected to the aggregated contact. You can remove
99                                 contacts from this list to avoid merging them.
100                             </p>
101                             <field name="dst_partner_id" domain="[('id', 'in', partner_ids and partner_ids[0] and partner_ids[0][2] or False)]" attrs="{'required': [('state', '=', 'selection')]}"/>
102                             <field name="partner_ids" nolabel="1">
103                                 <tree string="Partners">
104                                     <field name="id" />
105                                     <field name="display_name" />
106                                     <field name="email" />
107                                     <field name="is_company" />
108                                     <field name="vat" />
109                                     <field name="country_id" />
110                                 </tree>
111                             </field>
112                         </group>
113                     </sheet>
114                 </form>
115             </field>
116         </record>
117         
118         <act_window id="action_partner_merge" res_model="base.partner.merge.automatic.wizard" src_model="res.partner"
119             target="new" multi="True" key2="client_action_multi" view_mode="form" name="Automatic Merge"/>
120
121     </data>
122
123 </openerp>