Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
2934 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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?

อวตาร
ละทิ้ง

Anyone able to provide advise on this?

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง

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.

คำตอบที่ดีที่สุด

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


อวตาร
ละทิ้ง