[IMP]event: remove res.partner inherit

bzr revid: kjo@tinyerp.com-20120629072431-4bsg54hzww6dzjd6
This commit is contained in:
Kuldeep Joshi (OpenERP) 2012-06-29 12:54:31 +05:30
parent 7e086d1d4f
commit bafe665022
2 changed files with 7 additions and 6 deletions

View File

@ -312,7 +312,7 @@ class event_registration(osv.osv):
"""Event Registration"""
_name= 'event.registration'
_description = __doc__
_inherit = ['ir.needaction_mixin','mail.thread','res.partner']
_inherit = ['ir.needaction_mixin','mail.thread']
_columns = {
'id': fields.integer('ID'),
'origin': fields.char('Source', size=124,readonly=True,help="Name of the sale order which create the registration"),
@ -333,11 +333,17 @@ class event_registration(osv.osv):
('open', 'Confirmed'),
('done', 'Attended')], 'Status',
size=16, readonly=True),
# Fields for address, due to separation from event.registration and res.partner
'email': fields.char('Email', size=240),
'phone': fields.char('Phone', size=64),
'name': fields.char('Name', size=128, required=True, select=True),
'active': fields.boolean('Active'),
}
_defaults = {
'nb_register': 1,
'state': 'draft',
'active': True,
}
_order = 'name, create_date desc'

View File

@ -90,9 +90,4 @@ class sale_order_line(osv.osv):
message = _("The registration %s has been created from the Sale Order %s.") % (registration_id, order_line.order_id.name)
registration_obj.message_append_note(cr, uid, [registration_id], body=message, context=context)
return super(sale_order_line, self).button_confirm(cr, uid, ids, context=context)
class event_registration(osv.osv):
# TOFIX: section_id field is not availble in event_registration table in database but In _columns (_inherited) findout section_id field which added in crm module in res.partner model. so need to fix in framework to restrive columns but right now Fixed to inherit again to update event_registration table.
_name = 'event.registration'
_inherit = ['event.registration','ir.needaction_mixin','mail.thread', 'res.partner']