Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions resource_booking_google_meet/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
=========================================
Resource Booking — Google Meet by default
=========================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:66ab976030b2bfcdaf7512ab210cee2e58ca838b4678ba56f059477473bf9d9c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcalendar-lightgray.png?logo=github
:target: https://github.com/OCA/calendar/tree/18.0/resource_booking_google_meet
:alt: OCA/calendar
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/calendar-18-0/calendar-18-0-resource_booking_google_meet
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/calendar&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

When a ``resource.booking`` is confirmed it creates a
``calendar.event``. This module ensures the ``google_calendar``
integration auto-generates a unique Google Meet URL per booking — with
recording, "Take notes for me" Gemini summaries, and transcripts on
Google Workspace Business Standard and above.

**How it works:** ``google_calendar`` adds conferencing to an event when
both ``videocall_location`` and ``location`` are empty on the event at
sync time. If the booking type has a physical address set, this module
clears ``location`` from the meeting vals so the conferencing condition
is always satisfied for bookings without a custom videocall URL.

If the booking type has an explicit ``videocall_location`` (e.g. a
static Zoom personal room), the module leaves everything unchanged — the
static URL is preserved and Google won't add conferencing.

**Note:** The Meet URL only appears after the first
``google_calendar`` cron sync. The ``videocall_location`` field on
the calendar event is updated automatically once Google returns the
conferencing details.

**Table of contents**

.. contents::
:local:

Changelog
=========

18.0.1.0.0 (2026-05-19)
-----------------------

- [ADD] New module: default resource bookings to Google Meet videocall

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/calendar/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/calendar/issues/new?body=module:%20resource_booking_google_meet%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Ledo Enterprises

Contributors
------------

- Don Kendall dkendall@ledoweb.com

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-dnplkndll| image:: https://github.com/dnplkndll.png?size=40px
:target: https://github.com/dnplkndll
:alt: dnplkndll

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-dnplkndll|

This module is part of the `OCA/calendar <https://github.com/OCA/calendar/tree/18.0/resource_booking_google_meet>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions resource_booking_google_meet/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions resource_booking_google_meet/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2026 Ledo Enterprises - D. Kendall
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Resource Booking — Google Meet by default",
"version": "18.0.1.0.0",
"category": "Marketing/Online Appointment",
"summary": "Default new resource bookings to Google Meet for the videocall",
"author": "Ledo Enterprises, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/calendar",
"license": "AGPL-3",
"depends": ["resource_booking", "google_calendar"],
"data": ["data/mail_template_meet_link.xml"],
"installable": True,
"auto_install": False,
"maintainers": ["dnplkndll"],
}
87 changes: 87 additions & 0 deletions resource_booking_google_meet/data/mail_template_meet_link.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="mail_template_meet_link" model="mail.template">
<field name="name">Resource Booking: Google Meet link ready</field>
<field name="model_id" ref="resource_booking.model_resource_booking" />
<field name="subject">Your Google Meet link — {{ object.type_id.name }}</field>
<field
name="email_to"
>{{ ','.join([p.email for p in object.partner_ids if p.email]) }}</field>
<field name="auto_delete" eval="True" />
<field name="body_html" type="html">
<div
style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:#f5f5f5;padding:32px 16px;"
>
<div
style="max-width:560px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;"
>
<div style="background:#1a73e8;padding:24px 32px;">
<p
style="margin:0;font-size:20px;font-weight:700;color:#ffffff;"
>Your Google Meet link is ready</p>
</div>

<div style="padding:32px;">
<p
style="margin:0 0 24px;font-size:15px;line-height:1.6;color:#444444;"
>
Hi {{ object.partner_ids[:1].name or 'there' }},<br /><br />
Your meeting room for <strong>{{ object.type_id.name }}</strong> is now set up.
Use the button below to join at the scheduled time.
</p>

<table
cellpadding="0"
cellspacing="0"
style="background:#f0f4ff;border-radius:6px;width:100%;margin-bottom:28px;"
>
<tr>
<td style="padding:20px 24px;">
<p
style="margin:0 0 4px;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:#888888;"
>Meeting</p>
<p
style="margin:0 0 16px;font-size:17px;font-weight:600;color:#111111;"
>{{ object.type_id.name }}</p>
<p
style="margin:0 0 4px;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:#888888;"
>When</p>
<p style="margin:0;font-size:15px;color:#333333;">
{{ format_datetime(object.start, dt_format='full') }}
</p>
</td>
</tr>
</table>

<table
cellpadding="0"
cellspacing="0"
style="margin-bottom:28px;"
>
<tr>
<td style="background:#1a73e8;border-radius:6px;">
<a
href="{{ object.meeting_id.videocall_location }}"
style="display:inline-block;padding:14px 28px;font-size:15px;font-weight:600;color:#ffffff;text-decoration:none;"
>
Join Google Meet
</a>
</td>
</tr>
</table>

<p style="margin:0;font-size:12px;color:#999999;">
Or copy this link:
<a
href="{{ object.meeting_id.videocall_location }}"
style="color:#1a73e8;word-break:break-all;"
>
{{ object.meeting_id.videocall_location }}
</a>
</p>
</div>
</div>
</div>
</field>
</record>
</odoo>
2 changes: 2 additions & 0 deletions resource_booking_google_meet/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import calendar_event
from . import resource_booking
29 changes: 29 additions & 0 deletions resource_booking_google_meet/models/calendar_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2026 Ledo Enterprises - D. Kendall
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models


class CalendarEvent(models.Model):
_inherit = "calendar.event"

def write(self, vals):
# Capture events that are about to receive a Google Meet URL for the first time.
# Must run before super() so we can compare old vs new videocall_location.
to_notify = self.env["calendar.event"]
if "meet.google.com" in (vals.get("videocall_location") or ""):
to_notify = self.filtered(
lambda e: "meet.google.com" not in (e.videocall_location or "")
)
result = super().write(vals)
if to_notify:
template = self.env.ref(
"resource_booking_google_meet.mail_template_meet_link",
raise_if_not_found=False,
)
if template:
bookings = self.env["resource.booking"].search(
[("meeting_id", "in", to_notify.ids)]
)
for booking in bookings:
template.send_mail(booking.id, force_send=True)
return result
26 changes: 26 additions & 0 deletions resource_booking_google_meet/models/resource_booking.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2026 Ledo Enterprises - D. Kendall
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models


class ResourceBooking(models.Model):
_inherit = "resource.booking"

def _prepare_meeting_vals(self):
"""Ensure google_calendar generates a per-booking Meet URL.

Behaviour:
- Booking type with no videocall_location → clear location on the event
so google_calendar's _google_values() satisfies `not location` and sends
conferenceData to Google, which returns a unique meet.google.com URL.
- Booking type with a videocall_location URL → leave everything unchanged;
the static URL (Zoom, Whereby, etc.) is preserved and Google won't add
conferencing because videocall_location is already non-empty.
"""
vals = super()._prepare_meeting_vals()
if not vals.get("videocall_location"):
# google_calendar only requests a Meet URL when both videocall_location
# and location are falsy on the event. Clear location here so the sync
# condition passes even when the booking type has a physical address.
vals["location"] = False
return vals
7 changes: 7 additions & 0 deletions resource_booking_google_meet/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[project]
name = "odoo-addon-resource-booking-google-meet"
version = "18.0.1.0.0"

[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions resource_booking_google_meet/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Don Kendall <dkendall@ledoweb.com>
18 changes: 18 additions & 0 deletions resource_booking_google_meet/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
When a `resource.booking` is confirmed it creates a `calendar.event`. This module
ensures the `google_calendar` integration auto-generates a unique Google Meet URL per
booking — with recording, "Take notes for me" Gemini summaries, and transcripts on
Google Workspace Business Standard and above.

**How it works:** `google_calendar` adds conferencing to an event when both
`videocall_location` and `location` are empty on the event at sync time. If the booking
type has a physical address set, this module clears `location` from the meeting vals so
the conferencing condition is always satisfied for bookings without a custom videocall
URL.

If the booking type has an explicit `videocall_location` (e.g. a static Zoom personal
room), the module leaves everything unchanged — the static URL is preserved and Google
won't add conferencing.

> **Note:** The Meet URL only appears after the first `google_calendar` cron sync.
> The `videocall_location` field on the calendar event is updated automatically once
> Google returns the conferencing details.
3 changes: 3 additions & 0 deletions resource_booking_google_meet/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 18.0.1.0.0 (2026-05-19)

- \[ADD\] New module: default resource bookings to Google Meet videocall
Loading
Loading