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

I have recently added two fields in calendar.event

room_id = fields.Many2one('meeting.room',string='Meeting Room',help="Location of Event",ondelete='cascade')

calendar_event_type = fields.Char(string='Event Type')
the purpose of these fields is to separate the meeting event in the calendar. I also have an onchage function to fill up calendar_event_type data when room_id is selected.

@api.onchange('room_id')    
defonchange_room_id(self):
        ifself.room_id:
            self.calendar_event_type ='event_type_meeting'
        else:
            self.calendar_event_type =False

but, when I try to create an event it gives the bellow error.

User Error: Failed to render inline_template template : Record does not exist or has been deleted. (Record: calendar.event(406,), User: 2))

It doesn't happen every time, it happens randomly.

 

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

Hi  Imran ahmed ,

If the error occurs randomly, it is likely due to either assigning a record to a different model or providing the wrong ID for a model, resulting in the "Record does not exist or has been deleted" error. 

Also check if a record with ID 406 exists in the 'calendar.event' model and has been unlinked due to some action.


Hope it helps,
Kiran K

อวตาร
ละทิ้ง
ผู้เขียน

I have created only 10 records so far.
(Record: calendar.event(406,) the record id 406 increased by 1 everytime I try to save the form.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 24
1620
0
ก.ย. 22
1970
2
ส.ค. 22
3928
0
ก.พ. 17
3483
2
มิ.ย. 16
3327