-
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.
Merge pull request #182 from acsone/16.0-mig_cmis_web_proxy_mfr
[MIG] cmis_web_proxy - Migration to 16.0
- Loading branch information
Showing
12 changed files
with
139 additions
and
151 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
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,41 @@ | ||
/** @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", { | ||
getCmisObjectWrapperParams() { | ||
const params = this._super(...arguments); | ||
params.applyOdooSecurity = this.backend.apply_odoo_security; | ||
return params; | ||
}, | ||
|
||
genCmisSessionToken() { | ||
return JSON.stringify({ | ||
model: this.props.record.resModel, | ||
res_id: this.props.record.resId, | ||
field_name: this.props.name, | ||
}); | ||
}, | ||
|
||
setCmisSessionToken() { | ||
if (this.backend.apply_odoo_security) { | ||
this.cmisSession.setToken(this.genCmisSessionToken()); | ||
} | ||
}, | ||
|
||
async setRootFolderId() { | ||
var self = this; | ||
self.setCmisSessionToken(); | ||
this._super(...arguments); | ||
}, | ||
}); | ||
|
||
CmisFolderField.props.backend[0].shape.apply_odoo_security = Boolean; |
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,25 @@ | ||
/** @odoo-module **/ | ||
|
||
/* --------------------------------------------------------- | ||
+ * Odoo cmis_web | ||
+ * Authors Laurent Mignon 2016, Quentin Groulard 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_url", { | ||
getPreviewUrl() { | ||
var _url = this._super(...arguments); | ||
if (_url) { | ||
var prefix = "&"; | ||
if (_url.indexOf("?") < 0) { | ||
prefix = "?"; | ||
} | ||
return _url + prefix + "renderedObjectId=" + this.objectId; | ||
} | ||
return _url; | ||
}, | ||
}); |
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
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 |
Oops, something went wrong.