From 8c1994a571aab2f55be8d7100c30bc2bcada58fc Mon Sep 17 00:00:00 2001 From: qdp Date: Thu, 2 Oct 2008 15:37:03 +0200 Subject: [PATCH] *typos corrected *added a wizard that check whenever a registration is confirmed that there is enough available places and the warn the user if no, giving him the choice to continue or cancell the registration's confirmation. bzr revid: qdp@tinyerp.com-20081002133703-vu7l6lqld6xkj094 --- addons/event/event.py | 13 +--- addons/event/event_view.xml | 4 +- addons/event/event_wizard.xml | 79 +++++++++---------- addons/event/wizard/__init__.py | 1 + addons/event/wizard/confirm_registration.py | 86 +++++++++++++++++++++ 5 files changed, 127 insertions(+), 56 deletions(-) create mode 100644 addons/event/wizard/confirm_registration.py diff --git a/addons/event/event.py b/addons/event/event.py index adfe5b04386..2450441349a 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -134,8 +134,8 @@ class event(osv.osv): 'date_begin': fields.datetime('Beginning date', required=True), 'date_end': fields.datetime('Ending date', required=True), 'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', readonly=True, required=True), - 'mail_auto_registr':fields.boolean('Mail Auto Register',help='A mail is send when the registration is confirmed'), - 'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='A mail is send when the event is confimed'), + 'mail_auto_registr':fields.boolean('Mail Auto Register',help='A mail is sent when the registration is confirmed'), + 'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='A mail is sent when the event is confimed'), 'mail_registr':fields.text('Mail Register',help='Template for the mail'), 'mail_confirm':fields.text('Mail Confirm',help='Template for the mail'), 'budget_id':fields.many2one('account.budget.post','Budget'), @@ -163,13 +163,6 @@ class event_registration(osv.osv): obj.create(cr, uid, data, context) return True - def button_reg_open(self, cr, uid, ids, *args): - self.write(cr, uid, ids, {'state':'open',}) - cases = self.browse(cr, uid, ids) - self._history(cr, uid, cases, 'Open', history=True) - self.mail_user(cr,uid,ids) - return True - def button_reg_close(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state':'done',}) cases = self.browse(cr, uid, ids) @@ -223,7 +216,7 @@ class event_registration(osv.osv): "badge_name":fields.char('Badge Name',size=128), "badge_partner":fields.char('Badge Partner',size=128), "invoice_label":fields.char("Label Invoice",size=128,required=True), - "tobe_invoiced":fields.boolean("To be Invoice"), + "tobe_invoiced":fields.boolean("To be Invoiced"), "invoice_id":fields.many2one("account.invoice","Invoice"), } _defaults = { diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index 081462b2675..f4f02d34b66 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -198,7 +198,7 @@
- + @@ -220,7 +220,7 @@