Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3 Antworten
2933 Ansichten

I created an event and It is only for information, I don't have any registration for this event.

how can I remove the registration button from a particular event?
plz, help me with this. I'm new to this technology.

Avatar
Verwerfen
Beste Antwort

Im also interested on this option... im self hosting Odoo on a docker container, but I'm not finding the options mentioned here, can you please advise?

Avatar
Verwerfen

Anyone able to provide advise on this?

Beste Antwort

Hello Vikas,

Please refer below example to hide/show registration button on events based on a condition.

- Create new field on 'Event' model
- Inherit template 'website_event.event_details'(Event Header) and add condition on call of the template 'website_event.registration_template'(Registration)

Py:
class Event(models.Model):
_inherit = "event.event"

allow_registeration = fields.Boolean(default=True)

Please find code in comment. 

Hope it will be helpful to you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Verwerfen

Please find Code here :-

Xml:

<template id="custom_module.event_details" inherit_id="website_event.event_details">
<xpath expr="//t[@t-call='website_event.registration_template']" position="attributes">
<attribute name="t-if">event.allow_registeration</attribute>
</xpath>
</template>

You can do the same from UI by creating custom field & view, and create condition based on your requirement.

Beste Antwort

Hello,

As a workaround, you may limit registrations by 0 count which will show even as Sold Out and hide the Register button. 
Or this needs to be customised to hide the button for specific scenario by taking one field on event form, and if this field is enabled button will be shown/hidden.



Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat


Avatar
Verwerfen