odoo-addon-dms 16.0.1.8.0.5__py3-none-any.whl → 17.0.1.0.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. odoo/addons/dms/README.rst +132 -78
  2. odoo/addons/dms/__manifest__.py +34 -16
  3. odoo/addons/dms/actions/file.xml +1 -3
  4. odoo/addons/dms/controllers/main.py +0 -34
  5. odoo/addons/dms/controllers/portal.py +178 -92
  6. odoo/addons/dms/data/onboarding_data.xml +77 -0
  7. odoo/addons/dms/demo/access_group.xml +3 -9
  8. odoo/addons/dms/i18n/de.po +332 -221
  9. odoo/addons/dms/i18n/dms.pot +137 -174
  10. odoo/addons/dms/i18n/es.po +355 -226
  11. odoo/addons/dms/i18n/fr.po +256 -342
  12. odoo/addons/dms/i18n/he_IL.po +208 -181
  13. odoo/addons/dms/i18n/it.po +369 -248
  14. odoo/addons/dms/i18n/nl.po +140 -168
  15. odoo/addons/dms/i18n/pt.po +352 -223
  16. odoo/addons/dms/i18n/pt_BR.po +358 -256
  17. odoo/addons/dms/i18n/ru.po +138 -172
  18. odoo/addons/dms/models/__init__.py +7 -1
  19. odoo/addons/dms/models/abstract_dms_mixin.py +1 -1
  20. odoo/addons/dms/models/access_groups.py +18 -11
  21. odoo/addons/dms/models/base.py +10 -2
  22. odoo/addons/dms/models/directory.py +46 -75
  23. odoo/addons/dms/models/{category.py → dms_category.py} +10 -42
  24. odoo/addons/dms/models/dms_file.py +125 -147
  25. odoo/addons/dms/models/dms_security_mixin.py +26 -22
  26. odoo/addons/dms/models/ir_attachment.py +0 -1
  27. odoo/addons/dms/models/ir_binary.py +19 -0
  28. odoo/addons/dms/models/mail_thread.py +2 -4
  29. odoo/addons/dms/models/mixins_thumbnail.py +13 -8
  30. odoo/addons/dms/models/onboarding_onboarding.py +16 -0
  31. odoo/addons/dms/models/onboarding_onboarding_step.py +50 -0
  32. odoo/addons/dms/models/res_company.py +22 -47
  33. odoo/addons/dms/models/res_config_settings.py +0 -1
  34. odoo/addons/dms/models/storage.py +4 -24
  35. odoo/addons/dms/models/tag.py +1 -1
  36. odoo/addons/dms/readme/CONFIGURE.md +59 -0
  37. odoo/addons/dms/readme/CONTRIBUTORS.md +14 -0
  38. odoo/addons/dms/readme/CREDITS.md +6 -0
  39. odoo/addons/dms/readme/DESCRIPTION.md +9 -0
  40. odoo/addons/dms/readme/INSTALL.md +4 -0
  41. odoo/addons/dms/readme/ROADMAP.md +19 -0
  42. odoo/addons/dms/readme/USAGE.md +11 -0
  43. odoo/addons/dms/security/security.xml +1 -0
  44. odoo/addons/dms/static/description/icon.png +0 -0
  45. odoo/addons/dms/static/description/icon.svg +4 -1
  46. odoo/addons/dms/static/description/index.html +133 -88
  47. odoo/addons/dms/static/description/portal_icon.svg +12 -0
  48. odoo/addons/dms/static/src/js/fields/{path_owl.esm.js → path_json/path_owl.esm.js} +22 -4
  49. odoo/addons/dms/static/src/js/fields/{path_owl.xml → path_json/path_owl.xml} +7 -4
  50. odoo/addons/dms/static/src/js/fields/preview_binary/preview_record.esm.js +47 -0
  51. odoo/addons/dms/static/src/js/{views/fields/binary → fields/preview_binary}/preview_record.xml +5 -4
  52. odoo/addons/dms/static/src/js/views/dms_file_upload.esm.js +155 -148
  53. odoo/addons/dms/static/src/js/views/file_kanban_controller.xml +0 -1
  54. odoo/addons/dms/static/src/js/views/file_kanban_record.esm.js +26 -27
  55. odoo/addons/dms/static/src/js/views/file_kanban_renderer.esm.js +1 -2
  56. odoo/addons/dms/static/src/js/views/file_kanban_renderer.xml +12 -16
  57. odoo/addons/dms/static/src/js/views/file_kanban_view.esm.js +11 -9
  58. odoo/addons/dms/static/src/js/views/file_list_controller.esm.js +1 -1
  59. odoo/addons/dms/static/src/js/views/file_list_renderer.xml +1 -7
  60. odoo/addons/dms/static/src/js/views/file_list_view.esm.js +11 -9
  61. odoo/addons/dms/static/src/js/views/search_panel.esm.js +9 -10
  62. odoo/addons/dms/static/src/models/attachment.esm.js +83 -82
  63. odoo/addons/dms/static/src/models/attachment_image.esm.js +30 -28
  64. odoo/addons/dms/static/src/models/attachment_viewer_viewable.esm.js +27 -25
  65. odoo/addons/dms/static/src/scss/directory_kanban.scss +28 -73
  66. odoo/addons/dms/static/src/scss/dms_common.scss +69 -0
  67. odoo/addons/dms/static/src/scss/file_kanban.scss +22 -34
  68. odoo/addons/dms/static/src/scss/portal.scss +12 -0
  69. odoo/addons/dms/static/tests/tours/dms_portal_tour.esm.js +46 -0
  70. odoo/addons/dms/{views/dms_portal_templates.xml → template/portal.xml} +13 -3
  71. odoo/addons/dms/tests/common.py +20 -4
  72. odoo/addons/dms/tests/data/mail01.eml +2 -2
  73. odoo/addons/dms/tests/data/mail02.eml +2 -2
  74. odoo/addons/dms/tests/test_benchmark.py +16 -21
  75. odoo/addons/dms/tests/test_directory.py +128 -40
  76. odoo/addons/dms/tests/test_file.py +112 -30
  77. odoo/addons/dms/tests/test_file_database.py +50 -24
  78. odoo/addons/dms/tests/test_portal.py +50 -37
  79. odoo/addons/dms/tests/test_storage_attachment.py +85 -63
  80. odoo/addons/dms/tests/test_storage_database.py +89 -35
  81. odoo/addons/dms/tools/file.py +63 -11
  82. odoo/addons/dms/views/dms_access_groups_views.xml +2 -17
  83. odoo/addons/dms/views/{category.xml → dms_category.xml} +4 -9
  84. odoo/addons/dms/views/{directory.xml → dms_directory.xml} +168 -176
  85. odoo/addons/dms/views/dms_file.xml +170 -191
  86. odoo/addons/dms/views/{tag.xml → dms_tag.xml} +50 -53
  87. odoo/addons/dms/views/menu.xml +52 -21
  88. odoo/addons/dms/views/res_config_settings.xml +31 -82
  89. odoo/addons/dms/views/storage.xml +7 -13
  90. odoo_addon_dms-17.0.1.0.0.3.dist-info/METADATA +257 -0
  91. {odoo_addon_dms-16.0.1.8.0.5.dist-info → odoo_addon_dms-17.0.1.0.0.3.dist-info}/RECORD +93 -95
  92. {odoo_addon_dms-16.0.1.8.0.5.dist-info → odoo_addon_dms-17.0.1.0.0.3.dist-info}/WHEEL +1 -1
  93. odoo_addon_dms-17.0.1.0.0.3.dist-info/top_level.txt +1 -0
  94. odoo/addons/dms/i18n/fa.po +0 -2277
  95. odoo/addons/dms/i18n/fa_IR.po +0 -2277
  96. odoo/addons/dms/readme/CONFIGURE.rst +0 -40
  97. odoo/addons/dms/readme/CONTRIBUTORS.rst +0 -16
  98. odoo/addons/dms/readme/CREDITS.rst +0 -6
  99. odoo/addons/dms/readme/DESCRIPTION.rst +0 -6
  100. odoo/addons/dms/readme/INSTALL.rst +0 -9
  101. odoo/addons/dms/readme/ROADMAP.rst +0 -8
  102. odoo/addons/dms/readme/USAGE.rst +0 -8
  103. odoo/addons/dms/static/src/js/components/path/path.esm.js +0 -0
  104. odoo/addons/dms/static/src/js/dms_portal_tour.js +0 -57
  105. odoo/addons/dms/static/src/js/fields/path.js +0 -81
  106. odoo/addons/dms/static/src/js/views/fields/binary/preview_record.esm.js +0 -35
  107. odoo/addons/dms/static/src/js/views/many_drop_target.js +0 -98
  108. odoo/addons/dms/static/src/scss/variables.scss +0 -9
  109. odoo/addons/dms/static/src/xml/views.xml +0 -72
  110. odoo/addons/dms/template/assets.xml +0 -44
  111. odoo/addons/dms/template/onboarding.xml +0 -97
  112. odoo_addon_dms-16.0.1.8.0.5.dist-info/METADATA +0 -203
  113. odoo_addon_dms-16.0.1.8.0.5.dist-info/top_level.txt +0 -1
@@ -1,40 +0,0 @@
1
- To configure this module, you need to:
2
-
3
- #. Go to *Documents -> Configuration -> Storages*.
4
- #. Create a new document storage. You can choose between two options on `Save Type`:
5
- * `Database`: Store the files on the database as a field
6
- * `Attachment`: Store the files as attachments
7
- #. Next create an administrative access group. Go to *Configuration -> Access Groups*.
8
- * Create a new group, name it appropriately, and turn on all three permissions (Create, Write and Unlink - Read is implied and always enabled).
9
- * Add any other top-level administrative users to the group if needed (your user should already be there).
10
- * You can create other groups in here later for fine grained access control.
11
- #. Afterwards go to *Documents -> Directories*.
12
- #. Create a new directory, mark it as root and select the previously created setting.
13
- * Select the *Groups* tab and add your administrative group created above.
14
- #. On the Directory you can also add other access groups (created above) that will be able to:
15
- * read
16
- * create
17
- * write
18
- * delete
19
-
20
-
21
- Migration
22
- ~~~~~~~~~
23
-
24
- If you need to modify the storage Save Type you might want to migrate the file data.
25
- In order to achieve it you need to:
26
-
27
- #. Go to *Documents -> Configuration -> Storage* and select the storage you want to modify
28
- #. Modify the save type
29
- #. Press the button `Migrate files` if you want to migrate all the files at once
30
- #. Press the button `Manual File Migration` in order to specify files one by one
31
-
32
- You can check all the files that still needs to be migrated from all storages
33
- and migrate them manually on *Documents -> Configuration -> Migration*
34
-
35
-
36
- File Wizard Selection
37
- ~~~~~~~~~~~~~~~~~~~~~
38
-
39
- There is an action called `action_dms_file_wizard_selector` to open a wizard to list files in kanban view.
40
- This can be used (example `dms_attachment_link` module) to add a button in kanban view with the action we need.
@@ -1,16 +0,0 @@
1
- * Mathias Markl <mathias.markl@mukit.at>
2
- * Enric Tobella <etobella@creublanca.es>
3
- * Antoni Romera
4
- * Gelu Boros <gelu.boros@rgbconsulting.com>
5
-
6
- * `Tecnativa <https://www.tecnativa.com>`_:
7
-
8
- * Víctor Martínez
9
- * Pedro M. Baeza
10
- * Jairo Llopis
11
-
12
- * `Elego <https://www.elegosoft.com>`_:
13
-
14
- * Yu Weng <yweng@elegosoft.com>
15
- * Philip Witte <phillip.witte@elegosoft.com>
16
- * Khanh Bui <khanh.bui@mail.elegosoft.com>
@@ -1,6 +0,0 @@
1
- The migration of this module from 15.0 to 16.0 was financially supported by `AgentERP <https://www.agenterp.com>`_
2
-
3
- Some pictures are based on or inspired by:
4
-
5
- * `Roundicons <https://www.flaticon.com/authors/roundicons>`_
6
- * `Smashicons <https://www.flaticon.com/authors/smashicons>`_
@@ -1,6 +0,0 @@
1
- DMS is a module for creating, managing and viewing document files directly
2
- within Odoo.
3
- This module is only the basis for an entire ecosystem of apps that extend and
4
- seamlessly integrate with the document management system.
5
-
6
- This module adds portal functionality for directories and files for allowed users, both portal or internal users. You can get as well a tokenized link from a directory or a file for sharing it with any anonymous user.
@@ -1,9 +0,0 @@
1
- Preview
2
- ~~~~~~~
3
-
4
- ``mail_preview_base`` is required for DMS but it is recommended to install all
5
- the other `mail_preview` modules from `social` OCA repository
6
- in order to improve the preview of files.
7
-
8
- ``python-magic`` library is recommended to be installed for having whole support
9
- to get proper file types and file preview.
@@ -1,8 +0,0 @@
1
- - Files preview in portal
2
- - Allow to download folder in portal and create zip file with all content
3
- - Save in cache own_root directories and update in every create/write/unlink function
4
- - Add a migration procedure for converting an storage to attachment one for populating existing records with attachments as folders
5
- - Add a link from attachment view in chatter to linked documents
6
- - If Inherit permissions from related record (the inherit_access_from_parent_record field from storage) is changed when directories already exist, inconsistencies may occur because groups defined in the directories and subdirectories will still exist, all groups in these directories should be removed before changing.
7
- - Since portal users can read ``dms.storage`` records, if your module extends this model to another storage backend that needs using secrets, remember to forbid access to the secrets fields by other means. It would be nice to be able to remove that rule at some point.
8
- - Searchpanel in files: Highlight items (shading) without records when filtering something (by name for example).
@@ -1,8 +0,0 @@
1
- The best way to manage the documents is to switch to the Documents view.
2
- Existing documents can be managed there and new documents can be created.
3
-
4
- Portal functionality
5
- ~~~~~~~~~~~~~~~~~~~~
6
-
7
- You can add any portal user to DMS access groups, and then allow that group in directories, so they will see in the portal such directories and their files.
8
- Another possibility is to click on "Share" button inside a directory or a file for obtaining a tokenized link for single access to that resource, no matter if logged or not.
File without changes
@@ -1,57 +0,0 @@
1
- odoo.define("dms.tour", function (require) {
2
- "use strict";
3
-
4
- var tour = require("web_tour.tour");
5
-
6
- tour.register(
7
- "dms_portal_mail_tour",
8
- {
9
- test: true,
10
- url: "/my",
11
- },
12
- [
13
- {
14
- content: "Go /my/dms url",
15
- trigger: 'a[href*="/my/dms"]',
16
- },
17
- {
18
- content: "Go to Mails directory",
19
- extra_trigger: "li.breadcrumb-item:contains('Documents')",
20
- trigger: ".tr_dms_directory_link:contains('Mails')",
21
- },
22
- {
23
- content: "Go to Mail_01.eml",
24
- extra_trigger: "li.breadcrumb-item:contains('Mails')",
25
- trigger: ".tr_dms_file_link:contains('Mail_01.eml')",
26
- },
27
- ]
28
- );
29
- tour.register(
30
- "dms_portal_partners_tour",
31
- {
32
- test: true,
33
- url: "/my",
34
- },
35
- [
36
- {
37
- content: "Go /my/dms url",
38
- trigger: 'a[href*="/my/dms"]',
39
- },
40
- {
41
- content: "Go to Partners directory",
42
- extra_trigger: "li.breadcrumb-item:contains('Documents')",
43
- trigger: ".tr_dms_directory_link:contains('Partners')",
44
- },
45
- {
46
- content: "Go to Joel Willis",
47
- extra_trigger: "li.breadcrumb-item:contains('Partners')",
48
- trigger: ".tr_dms_directory_link:contains('Joel Willis')",
49
- },
50
- {
51
- content: "Go to test.txt",
52
- extra_trigger: "li.breadcrumb-item:contains('Joel Willis')",
53
- trigger: ".tr_dms_file_link:contains('test.txt')",
54
- },
55
- ]
56
- );
57
- });
@@ -1,81 +0,0 @@
1
- /** ********************************************************************************
2
- Copyright 2020 Creu Blanca
3
- Copyright 2017-2019 MuK IT GmbH
4
- License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
5
- **********************************************************************************/
6
-
7
- odoo.define("dms.fields_path", function (require) {
8
- "use strict";
9
-
10
- var fields = require("web.basic_fields");
11
- var registry = require("web.field_registry");
12
-
13
- var FieldPathJson = fields.FieldText.extend({
14
- events: _.extend({}, fields.FieldText.prototype.events, {
15
- "click a": "_onNodeClicked",
16
- }),
17
- init: function () {
18
- this._super.apply(this, arguments);
19
- this.max_width = this.nodeOptions.width || 500;
20
- this.seperator = this.nodeOptions.seperator || "/";
21
- this.prefix = this.nodeOptions.prefix || false;
22
- this.suffix = this.nodeOptions.suffix || false;
23
- },
24
- _renderReadonly: function () {
25
- this.$el.empty();
26
- this._renderPath();
27
- },
28
- _renderPath: function () {
29
- var text_width_measure = "";
30
- var path = JSON.parse(this.value || "[]");
31
- $.each(
32
- _.clone(path).reverse(),
33
- function (index, element) {
34
- text_width_measure += element.name + "/";
35
- if (text_width_measure.length >= this.max_width) {
36
- this.$el.prepend($("<span/>").text(".."));
37
- } else if (index === 0) {
38
- if (this.suffix) {
39
- this.$el.prepend($("<span/>").text(this.seperator));
40
- }
41
- this.$el.prepend($("<span/>").text(element.name));
42
- this.$el.prepend($("<span/>").text(this.seperator));
43
- } else {
44
- this.$el.prepend(
45
- $("<a/>", {
46
- class: "oe_form_uri",
47
- "data-model": element.model,
48
- "data-id": element.id,
49
- href: "#",
50
- text: element.name,
51
- })
52
- );
53
- if (index !== path.length - 1) {
54
- this.$el.prepend($("<span/>").text(this.seperator));
55
- } else if (this.prefix) {
56
- this.$el.prepend($("<span/>").text(this.seperator));
57
- }
58
- }
59
- return text_width_measure.length < this.max_width;
60
- }.bind(this)
61
- );
62
- },
63
- _onNodeClicked: function (event) {
64
- event.preventDefault();
65
- this.do_action({
66
- type: "ir.actions.act_window",
67
- res_model: $(event.currentTarget).data("model"),
68
- res_id: $(event.currentTarget).data("id"),
69
- views: [[false, "form"]],
70
- target: "current",
71
- context: {},
72
- });
73
- },
74
- });
75
-
76
- registry.add("path_json", FieldPathJson);
77
-
78
- return {
79
- FieldPathJson: FieldPathJson,
80
- };
81
- });
@@ -1,35 +0,0 @@
1
- /** @odoo-module **/
2
-
3
- import {registry} from "@web/core/registry";
4
- import {BinaryField} from "@web/views/fields/binary/binary_field";
5
- import {useService} from "@web/core/utils/hooks";
6
-
7
- export class PreviewRecordField extends BinaryField {
8
- setup() {
9
- super.setup();
10
- this.messaging = useService("messaging");
11
- this.dialog = useService("dialog");
12
- }
13
-
14
- onFilePreview() {
15
- const self = this;
16
- this.messaging.get().then((messaging) => {
17
- const attachmentList = messaging.models.AttachmentList.insert({
18
- selectedAttachment: messaging.models.Attachment.insert({
19
- id: self.props.record.resId,
20
- filename: self.props.record.data.display_name || "",
21
- name: self.props.record.data.display_name || "",
22
- mimetype: self.props.record.data.mimetype,
23
- model_name: self.props.record.resModel,
24
- }),
25
- });
26
- this.dialog = messaging.models.Dialog.insert({
27
- attachmentListOwnerAsAttachmentView: attachmentList,
28
- });
29
- });
30
- return;
31
- }
32
- }
33
-
34
- PreviewRecordField.template = "dms.FilePreviewField";
35
- registry.category("fields").add("preview_binary", PreviewRecordField);
@@ -1,98 +0,0 @@
1
- /* global base64js*/
2
- /* Copyright 2020 Creu Blanca
3
- * Copyright 2021 Tecnativa - Alexandre D. Díaz
4
- * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
5
- odoo.define("dms.DragDrop", function (require) {
6
- "use strict";
7
-
8
- const DropTargetMixin = require("web_drop_target");
9
- const core = require("web.core");
10
- const _t = core._t;
11
-
12
- return _.extend({}, DropTargetMixin.DropTargetMixin, {
13
- /**
14
- * @override
15
- */
16
- init: function () {
17
- this._super.apply(this, arguments);
18
- this._get_directory_id(
19
- this._searchPanel ? this._searchPanel.getDomain() : []
20
- );
21
- },
22
- _drop_zone_selector: ".o_kanban_view",
23
- /**
24
- * @override
25
- */
26
- _handle_drop_items: function (drop_items) {
27
- _.each(drop_items, this._handle_file_drop_attach, this);
28
- },
29
-
30
- /**
31
- * @override
32
- */
33
- _get_record_id: function () {
34
- // Don't need the record id to work
35
- return true;
36
- },
37
-
38
- /**
39
- * @override
40
- */
41
- _create_attachment: function (file, reader, res_model) {
42
- // Helper to upload an attachment and update the sidebar
43
- const ctx = this.renderer.state.getContext();
44
- console.log(ctx);
45
- if (this.directory_id) {
46
- ctx.default_directory_id = this.directory_id;
47
- }
48
- console.log(ctx);
49
- if (typeof ctx.default_directory_id === "undefined") {
50
- return this.displayNotification({
51
- message: _t("You must select a directory first"),
52
- type: "danger",
53
- });
54
- }
55
- return this._rpc({
56
- model: res_model,
57
- method: "create",
58
- args: [
59
- {
60
- name: file.name,
61
- content: base64js.fromByteArray(new Uint8Array(reader.result)),
62
- },
63
- ],
64
- kwargs: {
65
- context: ctx,
66
- },
67
- }).then(() => this.reload());
68
- },
69
-
70
- /**
71
- * @private
72
- * @param {Array} domain
73
- */
74
- _get_directory_id: function (domain) {
75
- let directory_id = false;
76
- _.each(domain, (leaf) => {
77
- if (
78
- leaf[0] === "directory_id" &&
79
- (leaf[1] === "child_of" || leaf[1] === "=")
80
- ) {
81
- directory_id = leaf[2];
82
- }
83
- });
84
- this.directory_id = directory_id;
85
- },
86
-
87
- /**
88
- * @override
89
- */
90
- _update: function (state, params) {
91
- this._get_directory_id(params.domain);
92
- return this._super.apply(this, arguments).then((result) => {
93
- this._update_overlay();
94
- return result;
95
- });
96
- },
97
- });
98
- });
@@ -1,9 +0,0 @@
1
- /**********************************************************************************
2
- *
3
- * Copyright (c) 2017-2019 MuK IT GmbH.
4
- * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
5
- *
6
- **********************************************************************************/
7
-
8
- $mk-file-kanban-sidebar-width: 200px;
9
- $mk-file-kanban-sidebar-padding: 8px;
@@ -1,72 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <!--
3
-
4
- Copyright 2020 CreuBlanca
5
- License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
6
-
7
- -->
8
- <templates xml:space="preserve">
9
- <t t-name="FieldBinaryPreview.Content" t-extend="DocumentViewer.Content">
10
- <!-- We need to replace in order to change all the called options,
11
- the new item will contain the same elements than the original one
12
- -->
13
- <t t-jquery=".o_viewer_zoomer" t-operation="replace">
14
- <div class="o_viewer_zoomer">
15
- <div
16
- t-if="widget.activeAttachment.fileType == 'image'"
17
- class="o_loading_img text-center"
18
- >
19
- <i
20
- class="fa fa-circle-o-notch fa-spin text-gray-light fa-3x fa-fw"
21
- role="img"
22
- aria-label="Loading"
23
- title="Loading"
24
- />
25
- </div>
26
- <img
27
- t-if="widget.activeAttachment.fileType === 'image'"
28
- class="o_viewer_img"
29
- t-attf-src="/web/image/#{model}/#{widget.activeAttachment.id}/#{widget.fieldName}?unique=1&amp;signature=#{widget.activeAttachment.checksum}&amp;model=#{model}"
30
- alt="Viewer"
31
- />
32
- <iframe
33
- t-if="widget.activeAttachment.fileType == 'application/pdf'"
34
- class="mt32 o_viewer_pdf"
35
- t-attf-src="/web/static/lib/pdfjs/web/viewer.html?file=/web/content/#{model}/#{widget.activeAttachment.id}/#{widget.fieldName}"
36
- />
37
- <iframe
38
- t-if="(widget.activeAttachment.fileType || '').indexOf('text') !== -1"
39
- class="mt32 o_viewer_text"
40
- t-attf-src="/web/content/#{model}/#{widget.activeAttachment.id}/#{widget.fieldName}"
41
- />
42
- <iframe
43
- t-if="widget.activeAttachment.fileType == 'youtu'"
44
- class="mt32 o_viewer_text"
45
- allow="autoplay; encrypted-media"
46
- width="560"
47
- height="315"
48
- t-attf-src="https://www.youtube.com/embed/#{widget.activeAttachment.youtube}"
49
- />
50
- <video
51
- t-if="widget.activeAttachment.fileType == 'video'"
52
- class="o_viewer_video"
53
- controls="controls"
54
- >
55
- <source
56
- t-attf-src="/web/image/#{model}/#{widget.activeAttachment.id}/#{widget.fieldName}"
57
- t-att-data-type="widget.activeAttachment.mimetype"
58
- />
59
- </video>
60
- </div>
61
- </t>
62
- </t>
63
- <t t-name="FieldBinaryPreview" t-extend="DocumentViewer">
64
- <!-- We need to replace in order to change the called options-->
65
- <t t-jquery=".o_document_viewer_content_call" t-operation="replace">
66
- <t
67
- class="o_document_viewer_content_call"
68
- t-call="FieldBinaryPreview.Content"
69
- />
70
- </t>
71
- </t>
72
- </templates>
@@ -1,44 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <!--
3
-
4
- Copyright 2017-2019 MuK IT GmbH
5
- Copyright 2020 CreuBlanca
6
- License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
7
-
8
- -->
9
- <odoo>
10
- <template id="assets_backend" name="dms_assets" inherit_id="web.assets_backend">
11
- <xpath expr="//link[last()]" position="after">
12
- <link rel="stylesheet" href="/dms/static/src/scss/variables.scss" />
13
- <link rel="stylesheet" href="/dms/static/src/scss/file_kanban.scss" />
14
- <link rel="stylesheet" href="/dms/static/src/scss/directory_kanban.scss" />
15
- </xpath>
16
- <xpath expr="//script[last()]" position="after">
17
- <script type="text/javascript" src="/dms/static/src/js/fields/path.js" />
18
- <script
19
- type="text/javascript"
20
- src="/dms/static/src/js/views/many_drop_target.js"
21
- />
22
- <script
23
- type="text/javascript"
24
- src="/dms/static/src/js/views/file_list_controller.js"
25
- />
26
- <script
27
- type="text/javascript"
28
- src="/dms/static/src/js/views/file_list_view.js"
29
- />
30
- <script
31
- type="text/javascript"
32
- src="/dms/static/src/js/views/file_kanban_controller.js"
33
- />
34
- <script
35
- type="text/javascript"
36
- src="/dms/static/src/js/views/file_kanban_renderer.js"
37
- />
38
- <script
39
- type="text/javascript"
40
- src="/dms/static/src/js/views/file_kanban_view.js"
41
- />
42
- </xpath>
43
- </template>
44
- </odoo>
@@ -1,97 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <!--
3
-
4
- Copyright 2017-2019 MuK IT GmbH
5
- License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
6
-
7
- -->
8
- <odoo>
9
- <template id="onboarding_storage_step">
10
- <t t-call="base.onboarding_step">
11
- <t t-set="title">Storage</t>
12
- <t t-set="description">
13
- Create a new Document Storage.
14
- </t>
15
- <t t-set="btn_text">Create Storage</t>
16
- <t t-set="model" t-value="'res.company'" />
17
- <t t-set="method" t-value="'action_open_documents_onboarding_storage'" />
18
- <t
19
- t-set="state"
20
- t-value="state.get('documents_onboarding_storage_state')"
21
- />
22
- </t>
23
- </template>
24
- <template id="onboarding_directory_step">
25
- <t t-call="base.onboarding_step">
26
- <t t-set="title">Directory</t>
27
- <t t-set="description">
28
- Create a new Root Directory.
29
- </t>
30
- <t t-set="btn_text">Create Directory</t>
31
- <t t-set="model" t-value="'res.company'" />
32
- <t t-set="method" t-value="'action_open_documents_onboarding_directory'" />
33
- <t
34
- t-set="state"
35
- t-value="state.get('documents_onboarding_directory_state')"
36
- />
37
- </t>
38
- </template>
39
- <template id="onboarding_file_step">
40
- <t t-call="base.onboarding_step">
41
- <t t-set="title">File</t>
42
- <t t-set="description">
43
- Upload your first File.
44
- </t>
45
- <t t-set="btn_text">Upload File</t>
46
- <t t-set="model" t-value="'res.company'" />
47
- <t t-set="method" t-value="'action_open_documents_onboarding_file'" />
48
- <t t-set="state" t-value="state.get('documents_onboarding_file_state')" />
49
- </t>
50
- </template>
51
- <template id="document_onboarding_directory_panel" name="document_onboarding_panel">
52
- <t t-call="base.onboarding_container">
53
- <t t-set="classes">o_onboarding_orange</t>
54
- <t
55
- t-set="bg_image"
56
- >/dms/static/lib/img/banner/documents_onboarding_directory.png</t>
57
- <t t-set="close_method">action_close_documents_onboarding</t>
58
- <t t-set="close_model">res.company</t>
59
- <t t-set="text_completed">The configuration is done!</t>
60
- <t
61
- t-call="dms.onboarding_storage_step"
62
- name="documents_onboarding_storage_state"
63
- />
64
- <t
65
- t-call="dms.onboarding_directory_step"
66
- name="documents_onboarding_directory_state"
67
- />
68
- <t
69
- t-call="dms.onboarding_file_step"
70
- name="documents_onboarding_file_state"
71
- />
72
- </t>
73
- </template>
74
- <template id="document_onboarding_file_panel" name="document_onboarding_panel">
75
- <t t-call="base.onboarding_container">
76
- <t t-set="classes">o_onboarding_blue</t>
77
- <t
78
- t-set="bg_image"
79
- >/dms/static/lib/img/banner/documents_onboarding_file.png</t>
80
- <t t-set="close_method">action_close_documents_onboarding</t>
81
- <t t-set="close_model">res.company</t>
82
- <t t-set="text_completed">The configuration is done!</t>
83
- <t
84
- t-call="dms.onboarding_storage_step"
85
- name="documents_onboarding_storage_state"
86
- />
87
- <t
88
- t-call="dms.onboarding_directory_step"
89
- name="documents_onboarding_directory_state"
90
- />
91
- <t
92
- t-call="dms.onboarding_file_step"
93
- name="documents_onboarding_file_state"
94
- />
95
- </t>
96
- </template>
97
- </odoo>