- Create an option to group internal team members.
- Enable calendar invites to be sent to the entire group by selecting it as a single unit.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухоблік
- Склад
- PoS
- Project
- MRP
Це запитання позначене
To implement Internal Team Grouping for Calendar Invitations in Odoo (v16, v17, or v18), you'll need to customize the calendar and contact functionalities. The idea is to create a custom model for "Internal Teams" and allow selection of this team when creating meetings so invites go to all team members.
Step-by-Step Implementation
1.Create a Custom Model: internal.team
Add a model to define internal teams and assign users.
# models/internal_team.py from odoo import models, fields class InternalTeam(models.Model): _name = 'internal.team' _description = 'Internal Team' name = fields.Char(string='Team Name', required=True) member_ids = fields.Many2many('res.users', string='Team Members')
2.Extend Calendar Event to Link a Team
Add a Many2one field to select an internal team in calendar events.
# models/calendar_event.py from odoo import models, fields, api class CalendarEvent(models.Model): _inherit = 'calendar.event' team_id = fields.Many2one('internal.team', string='Internal Team') @api.onchange('team_id') def _onchange_team_id(self): if self.team_id: self.partner_ids = [(6, 0, self.team_id.member_ids.mapped('partner_id').ids)]
3. Update Views
has. Add a menu for Internal Team:
<!-- views/internal_team_view.xml --> <odoo> <record id="view_internal_team_form" model="ir.ui.view"> <field name="name">internal.team.form</field> <field name="model">internal.team</field> <field name="arch" type="xml"> <form string="Internal Team"> <sheet> <group> <field name="name"/> <field name="member_ids"/> </group> </sheet> </form> </field> </record> <record id="view_internal_team_tree" model="ir.ui.view"> <field name="name">internal.team.tree</field> <field name="model">internal.team</field> <field name="arch" type="xml"> <tree> <field name="name"/> <field name="member_ids"/> </tree> </field> </record> <menuitem id="menu_internal_team_root" name="Internal Teams" parent="base.menu_custom" sequence="10"/> <menuitem id="menu_internal_team" name="Manage Teams" parent="menu_internal_team_root" action="action_internal_team"/> </odoo>
b. Extend calendar event view to add team_id :
<!-- views/calendar_event_inherit.xml --> <odoo> <record id="view_calendar_event_form_inherit_team" model="ir.ui.view"> <field name="name">calendar.event.form.inherit.team</field> <field name="model">calendar.event</field> <field name="inherit_id" ref="calendar.view_calendar_event_form"/> <field name="arch" type="xml"> <xpath expr="//field[@name='partner_ids']" position="before"> <field name="team_id"/> </xpath> </field> </record> </odoo>
4.Security and Access Control
Ensure access to internal.team model for internal users.
<!-- security/ir.model.access.csv --> access_internal_team_user,access.internal.team.user,model_internal_team,base.group_user,1,1,1,1
5. Final Result
- User selects a team in the calendar form.
- All members of that team are automatically added as attendees ( partner_ids ) to the event.
- They receive invitations as usual.
Thanks & Regards,
Email: contact@datainteger.com
Thanks for your support. Appreciated.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
1
лип. 25
|
250 | ||
|
1
трав. 25
|
2316 | ||
|
1
квіт. 25
|
3363 | ||
|
3
серп. 24
|
2528 | ||
|
0
груд. 23
|
1716 |