class MeetingRoom(models.Model):
_name = 'meeting.room'
_inherit = "calendar.event"
categ_ids = fields.Many2many(
'calendar.event.type', 'meeting_room_categ_rel', 'meeting_room_id', 'type_id', 'Tags')
room_id = fields.Many2one('meeting.room.room')
If I don't include categ_ids, I get this error: "TypeError: Many2many fields meeting.room.categ_ids and calendar.event.categ_ids use the same table and columns"
When I include categ_ids, I get this error:
psycopg2.errors.UndefinedColumn: column "meeting_room_id" referenced in foreign key constraint does not exist
You need to change the Many2many
relationnameExample:
You need also to update the functions that use
calendar.eventrecords like _find_attendee_batch which is used in a compute methodThere are references to
calendar.eventin the inverse fields ofattendee_idsandactivity_ids, so you need to override those fields too and update the code with the new field namesExample:
calendar.eventmodel name is hard coded inwrite,default_get,_create_videocall_channel,_create_videocall_channel_id,action_open_composer,_setup_alarmsand_break_recurrencefunctionsYou could have issues with functions calling
super.If you have no reason to create a separate model, just extend the
calendar.eventmodel, create separate views and menus for the meeting room