diff --git a/addons/event/__terp__.py b/addons/event/__terp__.py index 04285d4fd3c..654492e4ddf 100644 --- a/addons/event/__terp__.py +++ b/addons/event/__terp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -45,7 +45,9 @@ 'event_view.xml', 'event_sequence.xml', 'security/event_security.xml', - 'security/ir.model.access.csv' + 'security/ir.model.access.csv', + 'wizard/event_registration_view.xml', + 'wizard/event_registrations_partner.xml', ], 'demo_xml': ['event_demo.xml'], 'installable': True, diff --git a/addons/event/event_wizard.xml b/addons/event/event_wizard.xml index fd0488dc1dc..2888bd8587f 100644 --- a/addons/event/event_wizard.xml +++ b/addons/event/event_wizard.xml @@ -2,17 +2,17 @@ - + id="wizard_event_registration"/> --> - + id="wizard_event_reg_partners"/> --> - ). # @@ -15,13 +15,12 @@ # 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 . +# along with this program. If not, see . # ############################################################################## + import event_registration import make_invoice import event_registrations_partner import confirm_registration - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/event/wizard/event_registration.py b/addons/event/wizard/event_registration.py index 40d2196b004..e7252a1a63d 100644 --- a/addons/event/wizard/event_registration.py +++ b/addons/event/wizard/event_registration.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,40 +15,29 @@ # 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 . +# along with this program. If not, see . # ############################################################################## -import wizard -import pooler +from osv import fields, osv -def _event_registration(self, cr, uid, data, context): - event_id = data['id'] - cr.execute('SELECT section_id FROM event_event WHERE id = %s', (event_id, )) - res = cr.fetchone() - value = { - 'domain': [('section_id', '=', res[0])], - 'name': 'Event registration', - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'event.registration', - 'context': { }, - 'type': 'ir.actions.act_window' - } - return value +class event_registration_list(osv.osv_memory): + """ List Event Registration """ + _name = "event.registration.list" + _description = "List Event Registrations" -class wizard_event_registration(wizard.interface): - states = { - 'init': { - 'actions': [], - 'result': { - 'type': 'action', - 'action': _event_registration, - 'state': 'end' - } - }, - } -wizard_event_registration("wizard_event_registration") + def open_registration(self, cr, uid, ids, context={}): + cr.execute('SELECT section_id FROM event_event WHERE id = %s', (context['active_id'],)) + res = cr.fetchone() + return { + 'domain': [('section_id', '=', res[0])], + 'name': 'Event Registrations', + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'event.registration', + 'type': 'ir.actions.act_window' + } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +event_registration_list() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/event/wizard/event_registration_view.xml b/addons/event/wizard/event_registration_view.xml new file mode 100644 index 00000000000..bf56c7df38f --- /dev/null +++ b/addons/event/wizard/event_registration_view.xml @@ -0,0 +1,38 @@ + + + + + + List Event Registrations + event.registration.list + form + +
+