Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,37 @@
/** @odoo-module **/
import {registerPatch} from "@mail/model/model_core";
registerPatch({
name: "AttachmentBoxView",
recordMethods: {
_onAddDmsFile() {
this.env.services.action.doAction(
"dms_attachment_link.action_dms_file_wizard_selector_dms_attachment_link",
{
additionalContext: {
active_id: this.chatter.thread.id,
active_ids: [this.chatter.thread.id],
active_model: this.chatter.threadModel,
},
onClose: this._onAddedDmsFile.bind(this),
}
);
},
_onAddedDmsFile() {
this.chatter.refresh();
},
},
});
registerPatch({
name: "Chatter",
recordMethods: {
/**
* Handles click on the attach button.
*/
async onClickButtonAddAttachments() {
await this.onClickButtonToggleAttachments();
},
},
});

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2023 Tecnativa - Víctor Martínez
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<templates id="template" xml:space="preserve">
<t t-inherit="mail.AttachmentBox" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('o_AttachmentBox_content')]" position="attributes">
<attribute name="class" add="d-block text-center" separator=" " />
</xpath>
<xpath expr="//button[hasclass('o_AttachmentBox_buttonAdd')]" position="after">
<button
class="o_add_dms_file_button btn btn-link"
type="button"
t-on-click.stop.prevent="attachmentBoxView._onAddDmsFile"
>
<i class="fa fa-plus-square" />
Add DMS File
</button>
</xpath>
</t>
</templates>