From b44bcdba39ad7165a8a5f25335501a887cacbab1 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 18:19:30 +0530 Subject: [PATCH] [FIX] Event: Copy registration will not copy invoice_id bzr revid: mra@mra-laptop-20101110124930-i3oq64k3gwyt0066 --- addons/event/event.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/addons/event/event.py b/addons/event/event.py index 64f93e6db55..d54d0253b2d 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -370,6 +370,18 @@ class event_registration(osv.osv): self.history(cr, uid, [reg], _('Invoiced')) return inv_id + def copy(self, cr, uid, id, default=None, context=None): + """ Copy record of Given id + @param id: Id of Registration record. + @param context: A standard dictionary for contextual values + """ + if not default: + default = {} + default.update({ + 'invoice_id': False, + }) + return super(event_registration, self).copy(cr, uid, id, default=default, context=context) + def action_invoice_create(self, cr, uid, ids, grouped=False, date_inv = False, context=None): """ Action of Create Invoice """ res = False