Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] mail_client_extension #44936

Closed
wants to merge 1 commit into from

Conversation

Florimond
Copy link
Contributor

@Florimond Florimond commented Feb 10, 2020

This module provide routes to manage people, companies, and
leads from the outlook add-on, but could eventually be accessed by
add-ons for other mail clients.

Task ID: 2128295

@C3POdoo C3POdoo added the RD research & development, internal work label Feb 10, 2020
@Florimond
Copy link
Contributor Author

@odony
So crm_addons/controllers/main.py:_authorize(request) is called at the beginning of every controller method.
See also web_login and exchange_with_token. In the latter, I kept the JWT generation even though it's not something useful for outlook. According to @qmo-odoo it's going to be useful for the gmail addon.

So basically the flow is as follow:

  1. Browser opens a dialog showing the odoo login page (/crm/addons/login), passing in the url a redirect url that redirects to the outlook addon (the react web app).
  2. The user enters its credentials on the login page.
  3. The credentials are POSTED by the browser to /crm/addons/login
  4. /crm/addons/login sends back a redirect to https://myReactApp/?success=1&response_type=code&code=THE_CODE
  5. The browser does the redirect to the react app
  6. The react app does a POST to exchange that token received in URL

You'll find the code of the outlook "add in" under web_outlook.

@Florimond
Copy link
Contributor Author

@odony Any comment about this?

Copy link
Contributor

@mart-e mart-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first review, will continue later

addons/crm_addons/web_outlook/src/taskpane/api.js Outdated Show resolved Hide resolved
addons/crm_addons/__manifest__.py Outdated Show resolved Hide resolved
addons/crm_addons/controllers/main.py Outdated Show resolved Hide resolved
addons/crm_addons/controllers/main.py Outdated Show resolved Hide resolved
addons/crm_addons/controllers/main.py Outdated Show resolved Hide resolved
addons/crm_addons/controllers/main.py Outdated Show resolved Hide resolved
addons/crm_addons/web_outlook/src/taskpane/api.js Outdated Show resolved Hide resolved
addons/crm_addons/controllers/main.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@xmo-odoo xmo-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a React web app.

Why?

addons/crm_addons/controllers/main.py Outdated Show resolved Hide resolved
addons/crm_addons/controllers/main.py Outdated Show resolved Hide resolved
@Florimond Florimond force-pushed the master-crm-outlook-2-fhu branch 3 times, most recently from 4b63f69 to 19d7c26 Compare April 8, 2020 07:03
@Florimond Florimond force-pushed the master-crm-outlook-2-fhu branch 2 times, most recently from 8d778a7 to 0f93080 Compare April 15, 2020 18:04
@Florimond Florimond requested review from a team as code owners April 29, 2020 15:38
@awa-odoo
Copy link
Contributor

awa-odoo commented May 8, 2020

Hello @Florimond

When you have some time, there are still some interesting comments on the PR from XMO and MAT that are left unanswered.

Also, may I ask you to rework the PR like the following:

  • One commit with the "Odoo" code, models/controllers/...
  • One commit with all the Outlook specific code (basically the React stuff)
  • One commit only for the package.lock (if possible, because it ruins the diff a little)

That will allow me to review everything more easily.

Thank you :)

Side note: the code is conflicting with master so you might want to rebase too.

@Florimond Florimond force-pushed the master-crm-outlook-2-fhu branch 3 times, most recently from 5d19c2f to 51190c4 Compare May 15, 2020 07:18
@Florimond Florimond force-pushed the master-crm-outlook-2-fhu branch 2 times, most recently from 6f09f06 to 33d0163 Compare May 28, 2020 16:05
@Florimond Florimond force-pushed the master-crm-outlook-2-fhu branch 2 times, most recently from eb4effc to c5d880c Compare August 3, 2020 07:15
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses ☑ ci/runbot labels Aug 21, 2020
@robodoo robodoo added ☐ ci/runbot and removed CI 🤖 Robodoo has seen passing statuses ☑ ci/runbot labels Aug 21, 2020
This module provide routes to manage people, companies, and
leads from the outlook add-on. It could eventually be accessed by
add-ons for other mail clients.
@robodoo robodoo added ☑ legal/cla CI 🤖 Robodoo has seen passing statuses and removed ☐ legal/cla labels Aug 21, 2020
@xmo-odoo
Copy link
Collaborator

@robodoo r+

joker-here-we-go

robodoo pushed a commit that referenced this pull request Aug 21, 2020
This module provide routes to manage people, companies, and
leads from the outlook add-on. It could eventually be accessed by
add-ons for other mail clients.

closes #44936

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
@robodoo robodoo closed this Aug 21, 2020
@robodoo robodoo temporarily deployed to merge August 21, 2020 16:35 Inactive
@fw-bot fw-bot deleted the master-crm-outlook-2-fhu branch September 4, 2020 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants