Skip to content

Conversation

@std-odoo
Copy link
Contributor

Purpose

Then enrichment feature of the addon made it slow and hard to use in
practice, so we simplify it, and we keep only the core feature, which
is logging the email on the records and viewing information about the
contact.

If a conversation contains many contacts, before it took the first
one. We can now choose the contact we want to open.

Allow searching any records, not only partners.

We fixed some UI issues than were introduced by
update of the Gmail API.

Task-4727609

@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch 6 times, most recently from e679c10 to 2da20fd Compare October 3, 2025 12:50
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch 3 times, most recently from 173c0ec to d710a18 Compare October 13, 2025 13:40
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch 4 times, most recently from e259ed2 to 89e1fb5 Compare October 15, 2025 12:50
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch 4 times, most recently from 6a4bfa2 to 4610569 Compare October 23, 2025 12:55
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch 2 times, most recently from df57832 to 8784f69 Compare October 30, 2025 15:41
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch 6 times, most recently from 36c5354 to 9d9c14a Compare November 20, 2025 14:04
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch from 9d9c14a to 6e15be2 Compare November 24, 2025 12:07
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch 4 times, most recently from 7407ba1 to 1a8cfd2 Compare December 3, 2025 13:05
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch 7 times, most recently from 0c8e3ce to 243823e Compare December 6, 2025 19:03
Purpose
=======
Because we cannot close the popup in which the user login like before,
we now show the rainbow man when we have received the access token
during the login flow.

Task-4727609
Purpose
=======
Before the subject, email from, etc were added in the body of the
email when we log it in a record. Now, those values are properly written
in the fields of the `mail.message`, and so we need to send them to the
Odoo endpoint.

Parse all the contacts in the email TO, CC,... to prepare the
following commit.

Before, if we wait some time before logging the email on a record,
an error could be raised because the token we received to get the
information expired. To solve that issue, we parse and save then in
the state when the addin is loaded.

Task-4727609
Purpose
=======
Then enrichment feature of the addon made it slow and hard to use in
practice, so we simplify it, and we keep only the core feature, which
is logging the email on the records and viewing information about the
contact.

If a conversation contains many contacts, before it took the first
one. We can now choose the contact we want to open.

Allow searching any records, not only partners.

We fixed some UI issues than were introduced by
update of the Gmail API.

Task-4727609
Purpose
=======
The current addin is slow, because of how appscript work (Google host
a web server, with our app running, that server restart at each call,
the language itself is synchronous...).

In alternative way of creating addin, is to host the application ourselves.
It's faster because we can keep the server alive, and we can make the
HTTP calls in parallel (to the Gmail API and to the Odoo database).
> https://developers.google.com/workspace/add-ons/guides/alternate-runtimes

We choose to use node with express, because it's asynchronous, and we
will make a lot of request (to the Odoo database, to the Gmail API, etc).

Also, most of the code can be re-used (the core logic).

The main changes compared to appscript are
- we need to store the user settings ourselves (and we use psql for that)
- so the translations and the email logging state is moved to the user
  (it's considered as "User Settings / Information").
- to build the view, our endpoints need to return JSON, so we created
  some helper classes similar to the one use by appscript (no official
  library exists for that at the moment, for typescript)

The application has been kept as similar as the one using appscript as
possible (the execution of action, with the state of the current page
is sent in the response).

Task-4727609
Purpose
=======
Now that all users will share the same process on the server,
we want to prevent the state from being modified by using JWT token.

Task-4727609
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch from e966ed6 to 0c6c040 Compare December 19, 2025 09:17
Purpose
=======
When we used appscript, we didn't have a web server to store the image
(and to do the processing to translate text inside the SVG), and so
we base 64 encoded them. Now that we moved the HTTP addin, we have a
web server, and we can serve the files (and translate them on the fly),
so that the images are cached by the browser, and we don't download
them each time we view a new card.

When Gmail shows images, it doesn't add our URL in the dom, instead
it fetches the image, and store it in `googleusercontent.com`. But,
it won't fetch the images if they come from a ngrok domain name, so
now, we need a "real" domain name for development.

Task-4727609
@std-odoo std-odoo force-pushed the master-mail-plugin-rework-no-iap-std branch from 0c6c040 to dd03979 Compare December 19, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant