Skip to content

Commit ecc3918

Browse files
committed
[IMP] outlook: remove the enrichment feature from the addon
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. Refactoring =========== The library we used is obsolete ("UI Fabric"), and so we took advantage of that task to re-write it using the new library "fluentui". Task-5152391
1 parent ef529cd commit ecc3918

File tree

107 files changed

+14896
-14546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+14896
-14546
lines changed

outlook/.eslintrc.json

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
{
2-
"parser": "@typescript-eslint/parser",
32
"plugins": [
4-
"react",
5-
"@typescript-eslint",
63
"office-addins"
74
],
8-
"parserOptions": {
9-
"ecmaVersion": 6,
10-
"sourceType": "module",
11-
"ecmaFeatures": {
12-
"jsx": true
13-
},
14-
"project": "./tsconfig.json"
15-
},
165
"extends": [
176
"plugin:office-addins/react"
18-
],
19-
"settings": {
20-
"react": {
21-
"version": "detect"
22-
}
23-
}
24-
}
7+
]
8+
}

outlook/.hintrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": [
3+
"development"
4+
],
5+
"hints": {
6+
"typescript-config/strict": "off"
7+
}
8+
}

outlook/README.md

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,16 @@
44

55
The plugin allows integration with various Odoo apps and modules like CRM, project ...
66

7-
The code is based on the [Office Addin API](https://docs.microsoft.com/en-us/office/dev/add-ins/) and
7+
The code is based on the [Office Addin API](https://docs.microsoft.com/en-us/office/dev/add-ins/) and
88
[the react framework](https://reactjs.org/) with typescript.
99

1010

1111
## To be able to serve the add-in locally for development
1212

1313
- cd to the add-in sources directory
1414
- `npm install`
15-
- `npm run-script dev-server`
15+
- `npm run dev-server`
1616

17-
## To be able to use, test and debug the plugin with a linux OS
18-
19-
- cd to the add-in sources directory
20-
- `npm install`
21-
- open the `node_modules/office-addin-dev-certs/lib/verify.js` file
22-
- inside the file, in the switch clause located in the `getVerifyCommand()` function add the following :
23-
24-
```bash
25-
case "linux":
26-
return `[ -f /usr/local/share/ca-certificates/office-addin-dev-certs/${defaults.caCertificateFileName} ] && openssl x509 -in /usr/local/share/ca-certificates/office-addin-dev-certs/${defaults.caCertificateFileName} -checkend 86400 -noout`;
27-
```
28-
29-
- open the `node_modules/office-addin-dev-certs/lib/install.js` file
30-
- inside the file, in the switch clause add the following:
31-
32-
```bash
33-
case "linux":
34-
return `sudo cp ${caCertificatePath} /usr/local/share/ca-certificates && sudo /usr/sbin/update-ca-certificates`;
35-
```
36-
37-
## To be able to serve the add-in
38-
39-
- cd to the addin-in sources directory
40-
- `npm install`
41-
- `npm run-script build -- --env.DOMAIN=127.0.0.1:8080` (replace `127.0.0.1:8080` with the actual domain)
42-
- serve the dist folder
4317

4418
## To add the add-in in outlook for the web
4519

@@ -58,29 +32,26 @@ case "linux":
5832
- Click "Mail" > "Customize actions"
5933
- Under the section "Message surface", check "Odoo for Outlook".
6034

35+
## Build for production
36+
Edit `webpack.config.js` and set the production URL in `urlProd`, then run:
37+
> `npm run build`
38+
6139
## Technical remarks
6240

6341
### About translations
64-
The plugin relies on the Odoo database to fetch translations. These translations are fetched during the login process
42+
The plugin relies on the Odoo database to fetch translations. These translations are fetched during the login process
6543
and then cashed and updated at the plugin's initialization if necessary.
6644

6745
Translations are provided in the `translations_outlook.xml` file located in each of the plugin modules
6846

6947
For more details about translations see: https://github.com/odoo/mail-client-extensions/blob/master/outlook/src/utils/Translator.ts
7048

49+
7150
### Prettier
7251
Before committing, please run prettier to automatically format your code
73-
> `npm run-script prettier`
74-
75-
### Deploy on Github Page
76-
Github provides a service to host static website. It can be used to serve the files of
77-
the add-in and so to serve the add-in for testing.
78-
79-
First build the add-in
80-
> `npm run-script build`
52+
> `npm run prettier`
8153
82-
Then replace the default domain (localhost) of the add-in by the domain of your Github Page
83-
> `./replaceDomain.sh <domain>`
8454

85-
Then publish it
86-
> `npm run-script deploy -- -r <repository> -b <branch>`
55+
### Documentation
56+
- https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/outlook-quickstart-yo
57+
- https://storybooks.fluentui.dev/react/?path=/docs/components-text--docs

outlook/assets/avatar_grey.png

-2.47 KB
Binary file not shown.

outlook/assets/caveat.ttf

47.7 KB
Binary file not shown.

outlook/assets/company_image.png

-21.5 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)