diff --git a/addons/crm/__init__.py b/addons/crm/__init__.py
index de0fac56e29..362444ccc2c 100644
--- a/addons/crm/__init__.py
+++ b/addons/crm/__init__.py
@@ -33,6 +33,7 @@ import crm_installer
import report
import wizard
+import res_partner
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index 3bc1f703454..0c98fd51c9c 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -96,7 +96,9 @@ between mails and Open ERP.""",
'report/crm_phonecall_report_view.xml',
'process/crm_configuration_process.xml',
- 'crm_installer_view.xml'
+ 'crm_installer_view.xml',
+
+ 'res_partner_view.xml'
],
'demo_xml': [
'crm_demo.xml',
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index 20ae1176ca6..e45ee85b31d 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -175,16 +175,4 @@ class res_users(osv.osv):
res_users()
-class res_partner(osv.osv):
- """ Inherits partner and adds meetings information in the partner form """
- _inherit = 'res.partner'
-
- _columns = {
- 'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
- 'Meetings'),
- }
-
-res_partner()
-
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index ac61809cfad..28cf42e3a73 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -324,21 +324,5 @@
-
-
-
- res.partner.meeting.info.inherit
- res.partner
- form
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index 3bc9fdd6d81..98e4c6f3ded 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -163,16 +163,4 @@ class crm_opportunity(osv.osv):
crm_opportunity()
-class res_partner(osv.osv):
- """ Inherits partner and adds Opportunities information in the partner form """
- _inherit = 'res.partner'
-
- _columns = {
- 'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
- 'Opportunities', domain=[('type', '=', 'opportunity')]),
- }
-
-res_partner()
-
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 3ce0ce788f6..1b0b384f22a 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -328,59 +328,5 @@
-
-
-
- res.partner.opportunity.info.inherit
- res.partner
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py
index 7131a3730d2..205b30d39dc 100644
--- a/addons/crm/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -178,15 +178,5 @@ class crm_phonecall(osv.osv, crm_case):
crm_phonecall()
-class res_partner(osv.osv):
- """ Inherits partner and adds Phonecalls information in the partner form """
- _inherit = 'res.partner'
-
- _columns = {
- 'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id', 'Phonecalls'),
- }
-
-res_partner()
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index a72a8df9de8..65b77ed5abe 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -289,19 +289,5 @@
-
-
-
- res.partner.phonecall.info.inherit
- res.partner
- form
-
-
-
-
-
-
-
-
diff --git a/addons/crm/res_partner.py b/addons/crm/res_partner.py
new file mode 100644
index 00000000000..93d865d7f74
--- /dev/null
+++ b/addons/crm/res_partner.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import fields,osv
+
+class res_partner(osv.osv):
+ """ Inherits partner and adds CRM information in the partner form """
+ _inherit = 'res.partner'
+
+ _columns = {
+ 'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
+ 'Opportunities', domain=[('type', '=', 'opportunity')]),
+ 'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
+ 'Meetings'),
+ 'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id', 'Phonecalls'),
+ }
+
+res_partner()
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml
new file mode 100644
index 00000000000..540c8d13186
--- /dev/null
+++ b/addons/crm/res_partner_view.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+ res.partner.crm.info.inherit
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+