-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] cmis_web_proxy_alf - Migration to 16.0
- Loading branch information
1 parent
2f0cdc8
commit 939762a
Showing
10 changed files
with
76 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** @odoo-module **/ | ||
|
||
/* --------------------------------------------------------- | ||
+ * Odoo cmis_web | ||
+ * Authors Laurent Mignon 2016, Maxime Franco 2023 Acsone SA/NV | ||
+ * License in __openerp__.py at root level of the module | ||
+ *--------------------------------------------------------- | ||
+*/ | ||
|
||
import {CmisFolderField} from "@cmis_web/cmis_folder/cmis_folder"; | ||
import {patch} from "@web/core/utils/patch"; | ||
|
||
patch(CmisFolderField.prototype, "open_with_proxy_alf", { | ||
getCmisObjectWrapperParams() { | ||
const params = this._super(...arguments); | ||
params.alfrescoApiLocation = this.backend.alfresco_api_location; | ||
return params; | ||
}, | ||
}); | ||
|
||
CmisFolderField.props.backend[0].shape.alfresco_api_location = String; |
38 changes: 38 additions & 0 deletions
38
cmis_web_proxy_alf/static/src/cmis_object_wrapper_service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** @odoo-module **/ | ||
|
||
/* --------------------------------------------------------- | ||
+ * Odoo cmis_web | ||
+ * Authors Laurent Mignon 2016, Maxime Franco 2023 Acsone SA/NV | ||
+ * License in __openerp__.py at root level of the module | ||
+ *--------------------------------------------------------- | ||
+*/ | ||
|
||
import {CmisObjectWrapper} from "@cmis_web/cmis_object_wrapper_service"; | ||
import {patch} from "@web/core/utils/patch"; | ||
|
||
patch(CmisObjectWrapper.prototype, "alfresco_proxy_alf_url", { | ||
setup(cmisObject, cmisSession, params) { | ||
this._super(...arguments); | ||
this.alfrescoApiLocation = params.alfrescoApiLocation; | ||
}, | ||
getPreviewUrl() { | ||
var _url = this._super(...arguments); | ||
if (_url) { | ||
return _url; | ||
} | ||
var params = { | ||
c: "force", | ||
lastModified: "pdf%" + new Date().getUTCMilliseconds(), | ||
token: this.token, | ||
objectId: this.objectId, | ||
versionSeriesId: this.versionSeriesId, | ||
}; | ||
return ( | ||
this.alfrescoApiLocation + | ||
"/content/thumbnails/pdf/" + | ||
this.name + | ||
"?" + | ||
$.param(params) | ||
); | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../cmis_web_proxy_alf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |