- 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
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
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.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
1
lip 25
|
456 | ||
|
1
maj 25
|
2413 | ||
|
1
kwi 25
|
3536 | ||
|
3
sie 24
|
2625 | ||
|
0
gru 23
|
1776 |