diff --git a/models/booking_event_registration.py b/models/booking_event_registration.py index 4e87981..96c245b 100755 --- a/models/booking_event_registration.py +++ b/models/booking_event_registration.py @@ -333,6 +333,7 @@ class EventRegistration(models.Model): if event.individual_booking_event: product_price=reg.price_individual_booking + membership_option=False else: product_price=event.booking_price @@ -803,7 +804,21 @@ class EventRegistration(models.Model): invoice.payment_id=payment.id invoice.payment_order_ok=True - + def invoice_without_registration(self,account_description): + + move=self.env['account.move'].search([]) + result='' + for mv in move: + description='' + for line in mv.line_ids: + if line.product_id.name==account_description: + #recherche de l'inscription + reg=self.env['event.registration'].search([('invoice_id','=',int(mv.id))]) + if not reg: result=result+mv.name+':'+mv.partner_id.name+'\nr' + break + + raise UserError(result) +