how to inherit the event module in form view
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hello Jignasha,
Try this :-
In .py
class EventEvent(models.Model):
_inherit = 'event.event'
custom_field = fields.Char('Custom')
In .xml
<record id="event_form_view_inherit" model="ir.ui.view">
<field name="name">event.form.view.inherit</field>
<field name="model">event.event</field>
<field name="inherit_id" ref="event.view_event_form"/>
<field name="arch" type="xml">
<xpath expr="/form/sheet/group[@name='main_field_group']/group/field[@name='date_tz']" position="after">
<field name="custom_field"/>
</xpath>
</field>
</record>
From above code, your custom field display after Timezone in Event form view.
Hope it works for you.
Thanks,
Thank u so much
How to make event tree, form and kanban views visible in the custom module? Tried inheriting and creating menuitems, but there is no action for the event views.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up