openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #00273
lp:~vauxoo/server-env-tools/7.0-add_group_in_partner_do_merge-dev-sabrina into lp:server-env-tools
Sabrina Romero (vauxoo) has proposed merging lp:~vauxoo/server-env-tools/7.0-add_group_in_partner_do_merge-dev-sabrina into lp:server-env-tools.
Requested reviews:
Sabrina Romero (vauxoo) (sabrina)
Jose Antonio Morales Ponce(vauxoo) - - http://www.vauxoo.com (josemoralesp)
For more details, see:
https://code.launchpad.net/~vauxoo/server-env-tools/7.0-add_group_in_partner_do_merge-dev-sabrina/+merge/188895
Some changes added in group assignation.
--
https://code.launchpad.net/~vauxoo/server-env-tools/7.0-add_group_in_partner_do_merge-dev-sabrina/+merge/188895
Your team Server Environment And Tools Core Editors is subscribed to branch lp:server-env-tools.
=== added directory 'partner_do_merge'
=== added file 'partner_do_merge/__openerp__.py.OTHER'
--- partner_do_merge/__openerp__.py.OTHER 1970-01-01 00:00:00 +0000
+++ partner_do_merge/__openerp__.py.OTHER 2013-10-02 18:50:40 +0000
@@ -0,0 +1,71 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+ 'name' : 'Merge Duplicate Partner',
+ 'version' : '0.1',
+ 'author': 'OpenERP SA',
+ 'website': 'http://www.openerp.com',
+ 'category' : 'Base',
+ 'description' : """
+Merge Partners
+==============
+We can merge duplicates partners and set the new id in all documents of
+partner merged
+
+We can merge partner using like mach parameter these fields:
+-Email
+-VAT
+-Company
+-Is company
+-Name
+-Parent Company
+
+We can select which partner will be the main partner
+
+This feature is in the follow path Sales/Tools/Deduplicate Contacts also is
+created an action menu in the partner view
+ """,
+ 'images' : [],
+ 'depends' : [
+ 'base',
+ 'crm',
+ ],
+ 'data': [
+ 'security/res_groups.xml',
+ 'wizard/base_partner_merge_view.xml',
+ 'wizard/merge_by_partner.xml',
+ 'view/res_partner_view.xml',
+ ],
+ 'js': [
+ ],
+ 'qweb' : [
+ ],
+ 'css':[
+ ],
+ 'demo': [
+ ],
+ 'test': [
+ ],
+ 'installable': True,
+ 'auto_install': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
=== added directory 'partner_do_merge/security'
=== added file 'partner_do_merge/security/res_groups.xml'
--- partner_do_merge/security/res_groups.xml 1970-01-01 00:00:00 +0000
+++ partner_do_merge/security/res_groups.xml 2013-10-02 18:50:40 +0000
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data noupdate="1">
+ <record id="res_group_partner_do_merge" model="res.groups">
+ <field name="name">Show wizard Partner Do Merge</field>
+ </record>
+ </data>
+</openerp>
=== added directory 'partner_do_merge/wizard'
=== added file 'partner_do_merge/wizard/base_partner_merge_view.xml.OTHER'
--- partner_do_merge/wizard/base_partner_merge_view.xml.OTHER 1970-01-01 00:00:00 +0000
+++ partner_do_merge/wizard/base_partner_merge_view.xml.OTHER 2013-10-02 18:50:40 +0000
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+ <data>
+ <!-- the sequence of the configuration sub menu is 30 -->
+ <menuitem id='root_menu' name='Tools' parent='base.menu_base_partner' sequence="25" groups='res_group_partner_do_merge'/>
+
+ <record model="ir.actions.act_window" id="base_partner_merge_automatic_act">
+ <field name="name">Deduplicate Contacts</field>
+ <field name="res_model">base.partner.merge.automatic.wizard</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ <field name="context">{'active_test': False}</field>
+ </record>
+
+ <menuitem id='partner_merge_automatic_menu'
+ action='base_partner_merge_automatic_act'
+ groups='res_group_partner_do_merge'
+ parent='root_menu' />
+
+ <record model='ir.ui.view' id='base_partner_merge_automatic_wizard_form'>
+ <field name='name'>base.partner.merge.automatic.wizard.form</field>
+ <field name='model'>base.partner.merge.automatic.wizard</field>
+ <field name='arch' type='xml'>
+ <form string='Automatic Merge Wizard' version='7.0'>
+ <header>
+ <button name='merge_cb' string='Merge Selection'
+ class='oe_highlight'
+ type='object'
+ attrs="{'invisible': [('state', 'in', ('option', 'finished' ))]}"
+ />
+ <button name='next_cb' string='Skip these contacts'
+ type='object' class='oe_link'
+ attrs="{'invisible': [('state', '!=', 'selection')]}" />
+ <button name='start_process_cb'
+ string='Merge with Manual Check'
+ type='object' class='oe_highlight'
+ attrs="{'invisible': [('state', '!=', 'option')]}" />
+ <button name='automatic_process_cb'
+ string='Merge Automatically'
+ type='object' class='oe_highlight'
+ confirm="Are you sure to execute the automatic merge of your contacts ?"
+ attrs="{'invisible': [('state', '!=', 'option')]}" />
+ <button name='update_all_process_cb'
+ string='Merge Automatically all process'
+ type='object'
+ confirm="Are you sure to execute the list of automatic merges of your contacts ?"
+ attrs="{'invisible': [('state', '!=', 'option')]}" />
+ <span class="or_cancel" attrs="{'invisible': [('state', '=', 'finished')]} ">or
+ <button name="close_cb" special="nosave" string="Cancel" type="object" class="oe_link oe_inline"/>
+ </span>
+ <span class="or_cancel" attrs="{'invisible': [('state', '!=', 'finished')]} ">
+ <button name="close_cb" special="nosave"
+ string="Close"
+ type="object"
+ class="oe_link oe_inline"/>
+ </span>
+ </header>
+ <sheet>
+ <group attrs="{'invisible': [('state', '!=', 'finished')]}" col="1">
+ <h2>There is no more contacts to merge for this request...</h2>
+ <button name="%(base_partner_merge_automatic_act)d" string="Deduplicate the other Contacts" class="oe_highlight"
+ type="action"/>
+ </group>
+ <p class="oe_grey" attrs="{'invisible': [('state', '!=', ('option'))]}">
+ Select the list of fields used to search for
+ duplicated records. If you select several fields,
+ OpenERP will propose you to merge only those having
+ all these fields in common. (not one of the fields).
+ </p>
+ <group attrs="{'invisible': ['|', ('state', 'not in', ('selection', 'finished')), ('number_group', '=', 0)]}">
+ <field name="state" invisible="1" />
+ <field name="number_group"/>
+ </group>
+ <group string="Search duplicates based on duplicated data in"
+ attrs="{'invisible': [('state', 'not in', ('option',))]}">
+ <field name='group_by_email' />
+ <field name='group_by_name' />
+ <field name='group_by_is_company' />
+ <field name='group_by_vat' />
+ <field name='group_by_parent_id' />
+ </group>
+ <group string="Exclude contacts having"
+ attrs="{'invisible': [('state', 'not in', ('option',))]}">
+ <field name='exclude_contact' />
+ <field name='exclude_journal_item' />
+ </group>
+ <separator string="Options" attrs="{'invisible': [('state', 'not in', ('option',))]}"/>
+ <group attrs="{'invisible': [('state', 'not in', ('option','finished'))]}">
+ <field name='maximum_group' attrs="{'readonly': [('state', 'in', ('finished'))]}"/>
+ </group>
+ <separator string="Merge the following contacts"
+ attrs="{'invisible': [('state', 'in', ('option', 'finished'))]}"/>
+ <group attrs="{'invisible': [('state', 'in', ('option', 'finished'))]}" col="1">
+ <p class="oe_grey">
+ The selected contacts will be merged together. All
+ documents linking to one of these contacts will be
+ redirected to the aggregated contact. You can remove
+ contacts from this list to avoid merging them.
+ </p>
+ <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')]}"/>
+ <field name="partner_ids" nolabel="1">
+ <tree string="Partners">
+ <field name="id" />
+ <field name="display_name" />
+ <field name="email" />
+ <field name="is_company" />
+ <field name="vat" />
+ <field name="country_id" />
+ </tree>
+ </field>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <act_window id="action_partner_merge" res_model="base.partner.merge.automatic.wizard" src_model="res.partner"
+ target="new" multi="True" key2="client_action_multi" view_mode="form" name="Automatic Merge" groups='res_group_partner_do_merge'/>
+
+ </data>
+
+</openerp>
=== added file 'partner_do_merge/wizard/merge_by_partner.xml.OTHER'
--- partner_do_merge/wizard/merge_by_partner.xml.OTHER 1970-01-01 00:00:00 +0000
+++ partner_do_merge/wizard/merge_by_partner.xml.OTHER 2013-10-02 18:50:40 +0000
@@ -0,0 +1,37 @@
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="view_merge_parter_by_partner_wizard">
+ <field name="name">view.merge.partner.by.partner.wizard</field>
+ <field name="model">wizard.merge.partner.by.partner</field>
+ <field name="arch" type="xml">
+ <form string="Merge Parners" version="7.0">
+ <group>
+ <field name='partner_id'/>
+ <field name='partner_ids'>
+ <tree string="Partners to Merge">
+ <field name="name"/>
+ </tree>
+ </field>
+ </group>
+ <footer>
+ <button name="merge_cb" type="object" string="Merge" class="oe_highlight"/>
+ or
+ <button name="action_skip" type="object" special="cancel" string="Cancel" class="oe_link"/>
+ </footer>
+ </form>
+ </field>
+ </record>
+
+ <act_window id="merge_parter_by_partner_wizard"
+ name="Merge Partners"
+ src_model="res.partner"
+ res_model="wizard.merge.partner.by.partner"
+ view_mode="form"
+ target="new"
+ key2="client_action_multi"
+ groups='res_group_partner_do_merge'
+ />
+
+ </data>
+</openerp>