This question has been flagged
1 Reply
1836 Views

When we create a new meeting from the recruitment app, for the hr_applicant, we can click on the smart button 'meetings' to open a calendar view. In the calendar view clicking opens a popup window with name of the document as default, along with 3 buttons. 'Create', 'Edit', 'Cancel'. Clicking on the 'Create' button creates a new meeting which after clicking shows a wizard with a smart button linking back to the parent document(the applicant form).

The above step works fine. Now if we were to click on the 'Edit' button instead of 'Create' button, then we are directed towards a wizard where we can edit and save the meeting details. The problem is, when we save the meeting, and click on the meeting, the documents smart button doesn't link back to the original document. Think this is a bug in odoo.

This happens when we create a meeting in the same way from the partner form. But it does not happen when we create a meeting from the crm pipeline. How to fix this bug?

This happens in demo.odoo.com too...

Avatar
Discard
Author Best Answer

Seems like an odoo bug.

Solved by overriding the create

class CalendarEvent(models.Model):
    """ Model for Calendar Event """
    _inherit = 'calendar.event'
    
    
    @api.model
    def create(self, vals):
        vals['res_id'] = self._context.get('active_id')
        event = super(CalendarEvent, self).create(vals)
        return event
Avatar
Discard