Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
633 Lượt xem

Can you tell me what info is required to schedule an appointment through the Odoo RPC? I'm using this:

{

​'active': True,

​'appointment_type_id': self.type_id,

​'appointment_resource_id': self.resource_id,

​'calendar_event_id': self.calendar_event_id,

​'display_name': self.event.name,

​'event_start': self.start_utc_str, # Odoo uses 'start' and 'stop' for datetimes

​'event_stop': self.end_utc_str,

​'capacity_reserved': self.capacity_reserved,

​'capacity_used': self.capacity_used

}


For the calendar events I'm using this one:

{

​'name': self.name,

​'start': self.start_utc.strftime('%Y-%m-%d %H:%M:%S'),

​'stop': self.end_utc.strftime('%Y-%m-%d %H:%M:%S'),

​'partner_ids': [self.partner_ids],

​'alarm_ids': self.alarm_ids,

​'description': self.description,

​'location': self.location,

​'privacy': self.privacy,

​'show_as': self.show_as,

​'recurrency': self.recurrency,

​'interval': self.interval,

​'rrule_type': self.rrule_type,

​'count': self.count if self.recurrency else False,

​'allday': self.is_all_day, 

​'event_tz': self.timezone_str

}


The error I'm getting is Error: <Fault 2: '"Resource_im_assigning" can not be used for "False"'>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Please verify that both self.type_id and self.resource_id are valid IDs and not False or None.


Hope it helps

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 24
1519
0
thg 2 24
1355
2
thg 11 20
3396
4
thg 6 24
3651
0
thg 3 24
1047