3
0
Fork 0

[MIG]web_widget_image_download: Migration to 17.0

17.0
manu 2024-08-02 08:28:18 +02:00
parent 679fe16aa1
commit 6889933054
3 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,7 @@
{ {
"name": "Web Widget - Image Download", "name": "Web Widget - Image Download",
"summary": "Allows to download any image from its widget", "summary": "Allows to download any image from its widget",
"version": "16.0.1.0.0", "version": "17.0.1.0.0",
"category": "web", "category": "web",
"website": "https://github.com/OCA/web", "website": "https://github.com/OCA/web",
"author": "Tecnativa, Odoo Community Association (OCA), Kaushal Prajapati", "author": "Tecnativa, Odoo Community Association (OCA), Kaushal Prajapati",

View File

@ -8,7 +8,7 @@
import {patch} from "@web/core/utils/patch"; import {patch} from "@web/core/utils/patch";
import {ImageField} from "@web/views/fields/image/image_field"; import {ImageField} from "@web/views/fields/image/image_field";
patch(ImageField.prototype, "web_widget_image_download", { patch(ImageField.prototype, {
download() { download() {
const downloadLink = document.createElement("a"); const downloadLink = document.createElement("a");
downloadLink.setAttribute("href", this.getUrl(this.props.name)); downloadLink.setAttribute("href", this.getUrl(this.props.name));

View File

@ -6,7 +6,6 @@
t-name="web_widget_image_download.ImageField" t-name="web_widget_image_download.ImageField"
t-inherit="web.ImageField" t-inherit="web.ImageField"
t-inherit-mode="extension" t-inherit-mode="extension"
owl="1"
> >
<xpath expr="//FileUploader/../.." position="after"> <xpath expr="//FileUploader/../.." position="after">
<div <div
@ -15,7 +14,7 @@
t-att-style="sizeStyle" t-att-style="sizeStyle"
> >
<button <button
t-if="props.value and state.isValid" t-if="props.record.data[props.name] and state.isValid"
class="o_form_binary_file_download btn btn-light border-0 rounded-circle m-1 p-1" class="o_form_binary_file_download btn btn-light border-0 rounded-circle m-1 p-1"
data-tooltip="Download" data-tooltip="Download"
aria-label="Download" aria-label="Download"