Browse Source
Merge pull request #445 from Jarsa-dev/10.0-base_partner_merge
Merge pull request #445 from Jarsa-dev/10.0-base_partner_merge
Migrate base_partner_merge to V10pull/452/head
Moises Lopez - https://www.vauxoo.com/
8 years ago
committed by
GitHub
9 changed files with 135 additions and 133 deletions
-
2base_partner_merge/README.rst
-
7base_partner_merge/__init__.py
-
8base_partner_merge/__manifest__.py
-
1base_partner_merge/security/ir.model.access.csv
-
4base_partner_merge/validate_email.py
-
226base_partner_merge/views/base_partner_merge.xml
-
6base_partner_merge/wizard/__init__.py
-
9base_partner_merge/wizard/base_partner_merge.py
-
5base_partner_merge/wizard/validate_email.py
@ -1,2 +1,5 @@ |
|||
from . import base_partner_merge |
|||
from . import validate_email |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2016 Camptocamp SA |
|||
# Copyright 2017 Jarsa Sistemas |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
from . import wizard |
@ -1 +0,0 @@ |
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
@ -1,4 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2016 Camptocamp SA |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
from openerp.addons.crm.validate_email import * # noqa |
@ -1,118 +1,114 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<record model="ir.actions.act_window" id="action_partner_deduplicate"> |
|||
<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> |
|||
|
|||
<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'> |
|||
<sheet> |
|||
<group attrs="{'invisible': [('state', '!=', 'finished')]}" col="1"> |
|||
<h2>There is no more contacts to merge for this request...</h2> |
|||
<button name="%(action_partner_deduplicate)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, |
|||
Odoo will propose you to merge only those having |
|||
all these fields in common. (not one of the fields). |
|||
<odoo> |
|||
<record model="ir.actions.act_window" id="action_partner_deduplicate"> |
|||
<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> |
|||
<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'> |
|||
<sheet> |
|||
<group attrs="{'invisible': [('state', '!=', 'finished')]}" col="1"> |
|||
<h2>There is no more contacts to merge for this request...</h2> |
|||
<button name="%(action_partner_deduplicate)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, |
|||
Odoo 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"> |
|||
Selected contacts will be merged together. |
|||
All documents linked to one of these contacts |
|||
will be redirected to the destination contact. |
|||
You can remove contacts from this list to avoid merging them. |
|||
</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"> |
|||
Selected contacts will be merged together. |
|||
All documents linked to one of these contacts |
|||
will be redirected to the destination contact. |
|||
You can remove contacts from this list to avoid merging them. |
|||
</p> |
|||
<group col="2"> |
|||
<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')]}"/> |
|||
</group> |
|||
<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 col="2"> |
|||
<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')]}"/> |
|||
</group> |
|||
</sheet> |
|||
<footer> |
|||
<button name='merge_cb' string='Merge Contacts' |
|||
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> |
|||
</footer> |
|||
</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="Merge Selected Contacts"/> |
|||
|
|||
</data> |
|||
|
|||
</openerp> |
|||
<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> |
|||
<footer> |
|||
<button name='action_merge' string='Merge Contacts' |
|||
class='oe_highlight' |
|||
type='object' |
|||
attrs="{'invisible': [('state', 'in', ('option', 'finished' ))]}" /> |
|||
<button name='action_skip' string='Skip these contacts' |
|||
type='object' |
|||
attrs="{'invisible': [('state', '!=', 'selection')]}" /> |
|||
<button name='action_start_manual_process' |
|||
string='Merge with Manual Check' |
|||
type='object' class='oe_highlight' |
|||
attrs="{'invisible': [('state', '!=', 'option')]}" /> |
|||
<button name='action_start_automatic_process' |
|||
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='action_update_all_process' |
|||
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 special="cancel" string="Cancel" type="object" class="oe_link oe_inline"/> |
|||
</span> |
|||
<span class="or_cancel" attrs="{'invisible': [('state', '!=', 'finished')]} "> |
|||
<button special="cancel" string="Close" type="object" class="oe_link oe_inline"/> |
|||
</span> |
|||
</footer> |
|||
</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="Merge Selected Contacts"/> |
|||
</odoo> |
@ -0,0 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2016 Camptocamp SA |
|||
# Copyright 2017 Jarsa Sistemas |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
from . import base_partner_merge |
|||
from . import validate_email |
@ -1,11 +1,8 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2016 Camptocamp SA |
|||
# Copyright 2016 Camptocamp SA |
|||
# Copyright 2017 Jarsa Sistemas |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
from openerp.addons.crm.base_partner_merge import * # noqa |
|||
|
|||
|
|||
class NoCRMResPartner(ResPartner): # noqa |
|||
_module = 'base_partner_merge' |
|||
from odoo.addons.crm.wizard.base_partner_merge import * # noqa |
|||
|
|||
|
|||
class NoCRMMergePartnerLine(MergePartnerLine): # noqa |
@ -0,0 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2016 Camptocamp SA |
|||
# Copyright 2017 Jarsa Sistemas |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
from odoo.addons.crm.wizard.validate_email import * # noqa |
Write
Preview
Loading…
Cancel
Save
Reference in new issue