Thibault Delavallée (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-crm-throw-partner into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-crm-throw-partner/+merge/112573
Separate crm.lead model from res.partner.
Currently, crm.lead inherit from res.partner, in order to have some address
fields. It was previously inheriting from res.partner.address, and now from
res.partner since the merge of the two models. In order to clean the models,
crm.lead should be independent from res.partner.
Specs:
- copy fields required for the views
- remove the inherit from res.partner
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-crm-throw-partner/+merge/112573
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-crm-throw-partner.
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2012-06-25 13:42:53 +0000
+++ crm/crm_lead.py 2012-06-28 14:09:22 +0000
@@ -40,7 +40,7 @@
_name = "crm.lead"
_description = "Lead/Opportunity"
_order = "priority,date_action,id desc"
- _inherit = ['ir.needaction_mixin', 'mail.thread','res.partner']
+ _inherit = ['ir.needaction_mixin', 'mail.thread']
def _get_default_section_id(self, cr, uid, context=None):
""" Gives default section by checking if present in the context """
@@ -245,6 +245,21 @@
'company_currency': fields.related('company_id', 'currency_id', 'symbol', type='char', string='Company Currency', readonly=True),
'user_email': fields.related('user_id', 'user_email', type='char', string='User Email', readonly=True),
'user_login': fields.related('user_id', 'login', type='char', string='User Login', readonly=True),
+
+ # Fields for address, due to separation from crm and res.partner
+ 'street': fields.char('Street', size=128),
+ 'street2': fields.char('Street2', size=128),
+ 'zip': fields.char('Zip', change_default=True, size=24),
+ 'city': fields.char('City', size=128),
+ 'state_id': fields.many2one("res.country.state", 'State', domain="[('country_id','=',country_id)]"),
+ 'country_id': fields.many2one('res.country', 'Country'),
+ 'country': fields.related('country_id', type='many2one', relation='res.country', string='Country'), # for backward compatibility
+ 'phone': fields.char('Phone', size=64),
+ 'fax': fields.char('Fax', size=64),
+ 'mobile': fields.char('Mobile', size=64),
+ 'function': fields.char('Function', size=128),
+ 'title': fields.many2one('res.partner.title','Title'),
+ 'company_id': fields.many2one('res.company', 'Company', select=1),
}
_defaults = {
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp