diff --git a/addons/event/event.py b/addons/event/event.py index ba3fedea69e..029b9f86310 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -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' diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py index 0fb89f46775..426c410dd99 100644 --- a/addons/event_sale/event_sale.py +++ b/addons/event_sale/event_sale.py @@ -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']