Skip to content

Commit 7db1a31

Browse files
std-odootde-banana-odoo
authored andcommitted
[FIX] gmail: fix the addon not reloading after the authentication
Purpose ======= After the Odoo authentication, the addon is supposed to reload. For some reason, `RELOAD_ADD_ON` is not documented anymore and stop working. It seems that we should use `RELOAD` now. The auto-close of the page stop working too, so we removed the code for it. > https://developers.google.com/apps-script/reference/card-service/on-close Task-5072916
1 parent ef529cd commit 7db1a31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gmail/src/services/odoo_auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function odooAuthCallback(callbackRequest: any) {
7070

7171
userProperties.setProperty("ODOO_ACCESS_TOKEN", accessToken);
7272

73-
return HtmlService.createHtmlOutput("Success ! <script>top.window.close()</script>");
73+
return HtmlService.createHtmlOutput("Success !");
7474
}
7575

7676
/**

gmail/src/views/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function onNextLogin(event) {
3232
CardService.newOpenLink()
3333
.setUrl(State.odooLoginUrl)
3434
.setOpenAs(CardService.OpenAs.OVERLAY)
35-
.setOnClose(CardService.OnClose.RELOAD_ADD_ON),
35+
.setOnClose(CardService.OnClose.RELOAD),
3636
)
3737
.build();
3838
}

0 commit comments

Comments
 (0)