I have been told this is not only possible but standard! But I cannot get it to work.
I enter an event in the Events App. I want it to be listed in the main calendar app. Help! Pulling my hair out!!!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Hello @Jonathan Sharp,
Odoo does not create a record in Calendar App, if we create an Event.
To show the events in main calendar App, Please add below python code in your custom module.
1) Create a new python file event_event.py
2) Add the file in __init__.py, and paste the below python code in event_event.py file.
//Code in comment//
If you have any questions or need further assistance, feel free to reach out.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Code :
# -*- coding: utf-8 -*-
from odoo import models
class EventEvent(models.Model):
_inherit = 'event.event'
@api.model_create_multi
def create(self, vals_list):
"""
Create registration records and automatically generate calendar events
if both start and end dates are provided.
"""
res = super().create(vals_list)
for registration in res:
if registration.date_begin and registration.date_end:
self.env['calendar.event'].create({
'name': registration.name,
'start': registration.date_begin,
'stop': registration.date_end,
'allday': False,
'description': registration.description,
'user_id': registration.user_id.id if registration.user_id else False,
'attendee_ids': [(6, 0, registration.user_id.id)],
})
return res
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
0
jun. 25
|
699 | ||
|
0
apr. 19
|
3260 | ||
|
1
feb. 16
|
6726 | ||
|
1
feb. 16
|
8264 | ||
|
0
mrt. 15
|
4331 |