Skip to content

Commit

Permalink
[MIG] cmis_web_report_write_alf - Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoMaxime committed Oct 4, 2023
1 parent 46597e3 commit c81cdac
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 47 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ exclude: |
^cmis_web_proxy/|
^cmis_web_proxy_alf/|
^cmis_web_report_write/|
^cmis_web_report_write_alf/|
# END NOT INSTALLABLE ADDONS
# Files and folders generated by bots, to avoid loops
^setup/|/static/description/index\.html$|
Expand Down
13 changes: 9 additions & 4 deletions cmis_web_report_write_alf/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@

{
"name": "Cmis Web Report Write Alf",
"description": """
"summary": """
Automatically open generated editable reports into Alfresco""",
"version": "14.0.1.0.1",
"version": "16.0.1.0.1",
"license": "AGPL-3",
"author": "ACSONE SA/NV",
"website": "https://alfodoo.org",
"depends": ["cmis_web_report_write", "cmis_web_bus"],
"data": ["views/cmis_web_report_write_alf.xml"],
"data": [],
"demo": [],
"installable": False,
"assets": {
"web.assets_backend": [
"cmis_web_report_write_alf/static/src/**/*",
],
},
"installable": True,
}
4 changes: 3 additions & 1 deletion cmis_web_report_write_alf/models/ir_actions_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ def _create_cmis_document(self, buffer, record, file_name, cmis_parent_folder):
"action": "open_url",
"user_id": self.env.user.id,
}
bus.sendone("notify_cmis_node", bus_message)
bus._sendone(
self.env.user.partner_id, "cmis_node_notification", bus_message
)
return res
23 changes: 23 additions & 0 deletions cmis_web_report_write_alf/static/src/js/cmis_folder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/** @odoo-module **/

/* ---------------------------------------------------------
+ * Odoo cmis_web_bus
+ * 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.utils";

patch(CmisFolderField.prototype, "cmis_folder_open_url", {
_handleNotify(event) {
this._super(event);
if (this.rootFolderId !== event.detail.cmis_objectid) {
return;
}
if (event.detail.action === "open_url") {
window.open(event.detail.url);
}
},
});
26 changes: 0 additions & 26 deletions cmis_web_report_write_alf/static/src/js/form_widgets.js

This file was deleted.

15 changes: 0 additions & 15 deletions cmis_web_report_write_alf/views/cmis_web_report_write_alf.xml

This file was deleted.

6 changes: 6 additions & 0 deletions setup/cmis_web_report_write_alf/setup.py
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,
)

0 comments on commit c81cdac

Please sign in to comment.