From 5dc55b6a5454ccf58cda21655990cb31c79a1fde Mon Sep 17 00:00:00 2001
From: kutyel
Date: Fri, 22 Jul 2016 17:24:47 +0200
Subject: [PATCH 01/44] [MIG] web_widget_image_download
---
web_widget_image_download/README.rst | 60 ++++++++++++++++++
web_widget_image_download/__init__.py | 3 +
web_widget_image_download/__openerp__.py | 23 +++++++
.../static/description/icon.png | Bin 0 -> 17095 bytes
.../src/css/web_widget_image_download.css | 6 ++
.../src/js/web_widget_image_download.js | 39 ++++++++++++
.../src/xml/web_widget_image_download.xml | 13 ++++
web_widget_image_download/views/assets.xml | 16 +++++
8 files changed, 160 insertions(+)
create mode 100644 web_widget_image_download/README.rst
create mode 100644 web_widget_image_download/__init__.py
create mode 100644 web_widget_image_download/__openerp__.py
create mode 100644 web_widget_image_download/static/description/icon.png
create mode 100644 web_widget_image_download/static/src/css/web_widget_image_download.css
create mode 100644 web_widget_image_download/static/src/js/web_widget_image_download.js
create mode 100644 web_widget_image_download/static/src/xml/web_widget_image_download.xml
create mode 100644 web_widget_image_download/views/assets.xml
diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst
new file mode 100644
index 000000000000..cc5f37824da5
--- /dev/null
+++ b/web_widget_image_download/README.rst
@@ -0,0 +1,60 @@
+.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
+ :alt: License: LGPL-3
+
+===========================
+Web Widget - Image Download
+===========================
+
+This module was written to extend the functionality of the image widget and allows to download it.
+
+Usage
+=====
+
+To use this module, you need to:
+
+#. Go to the section `Contacts`.
+#. Click on a contact.
+#. Edit the contact.
+#. Click the `Download` button (between `Edit` and `Clear`).
+
+.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
+ :alt: Try me on Runbot
+ :target: https://runbot.odoo-community.org/runbot/162/8.0
+
+Known Issues / Roadmap
+======================
+
+* In order to work correctly, this widget has to detect image type, the server should include this information in the `Content-Type` header. Right now, odoo is not doing so, but a fix has been `proposed `_.
+* For some unknown reason, the widget does not work in the `Preferences` view, because odoo is not rendering the **QWeb** template.
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smashing it by providing a detailed and welcomed feedback.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Flavio Corpa
+
+Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+This module is maintained by the OCA.
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
+To contribute to this module, please visit https://odoo-community.org.
diff --git a/web_widget_image_download/__init__.py b/web_widget_image_download/__init__.py
new file mode 100644
index 000000000000..c222227a9d41
--- /dev/null
+++ b/web_widget_image_download/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+# Copyright 2016 Flavio Corpa
+# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
diff --git a/web_widget_image_download/__openerp__.py b/web_widget_image_download/__openerp__.py
new file mode 100644
index 000000000000..afc6d2f95d72
--- /dev/null
+++ b/web_widget_image_download/__openerp__.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+# Copyright 2016 Flavio Corpa
+# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
+{
+ "name": "Web Widget - Image Download",
+ "summary": "Allows to download any image from its widget",
+ "version": "9.0.1.0.0",
+ "category": "web",
+ "website": "https://www.tecnativa.com",
+ "author": "Tecnativa, Odoo Community Association (OCA)",
+ "license": "LGPL-3",
+ "application": False,
+ "installable": True,
+ "data": [
+ "views/assets.xml",
+ ],
+ "depends": [
+ "web",
+ ],
+ "qweb": [
+ "static/src/xml/web_widget_image_download.xml",
+ ]
+}
diff --git a/web_widget_image_download/static/description/icon.png b/web_widget_image_download/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..65dabfc969bb36290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download {
+ color: #eee;
+}
diff --git a/web_widget_image_download/static/src/js/web_widget_image_download.js b/web_widget_image_download/static/src/js/web_widget_image_download.js
new file mode 100644
index 000000000000..6f204d1365cb
--- /dev/null
+++ b/web_widget_image_download/static/src/js/web_widget_image_download.js
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2016 Flavio Corpa
+ * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
+ */
+odoo.define('web_widget_image_download', function (require) {
+ 'use strict';
+
+ var common = require('web.form_common');
+
+ common.FieldBinaryImage.include({
+ render_value: function () {
+ this._super();
+
+ var $widget = this.$el.find('.oe_form_binary_file_download');
+
+ this.imgSrc = this.$el.find('img[name="image"]').attr('src');
+
+ $.ajax({
+ type: 'HEAD',
+ url: this.imgSrc,
+ complete: function (xhr) {
+ // retrieve image type from server ("Content-Type" header)
+ $widget.attr('download', xhr.getResponseHeader("Content-Type").replace('/', '.'));
+ }
+ });
+
+ // use jquery instead of `replace` with qweb (to avoid breaking inheritance)
+ if (this.has_custom_image()) {
+ this.$el.find('.oe_form_binary_file_clear').removeClass('col-md-offset-5');
+ }
+
+ $widget.attr('href', this.imgSrc);
+ },
+ has_custom_image: function () {
+ // check if the image of the widget is different from the default placeholder
+ return this.imgSrc && !this.imgSrc.includes('/placeholder.png');
+ }
+ });
+});
diff --git a/web_widget_image_download/static/src/xml/web_widget_image_download.xml b/web_widget_image_download/static/src/xml/web_widget_image_download.xml
new file mode 100644
index 000000000000..096d3256a030
--- /dev/null
+++ b/web_widget_image_download/static/src/xml/web_widget_image_download.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web_widget_image_download/views/assets.xml b/web_widget_image_download/views/assets.xml
new file mode 100644
index 000000000000..56fb53851d34
--- /dev/null
+++ b/web_widget_image_download/views/assets.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
From a8d2ad8097d00812072843271336be9931846928 Mon Sep 17 00:00:00 2001
From: Jairo Llopis
Date: Fri, 5 Aug 2016 12:00:18 +0200
Subject: [PATCH 02/44] [MIG] web_widget_image_download: Update for v9.
---
web_widget_image_download/README.rst | 2 +-
web_widget_image_download/__init__.py | 3 --
.../src/css/web_widget_image_download.css | 6 ++-
.../src/js/web_widget_image_download.js | 39 ++++++++++---------
4 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst
index cc5f37824da5..675e61b0253a 100644
--- a/web_widget_image_download/README.rst
+++ b/web_widget_image_download/README.rst
@@ -26,7 +26,6 @@ Known Issues / Roadmap
======================
* In order to work correctly, this widget has to detect image type, the server should include this information in the `Content-Type` header. Right now, odoo is not doing so, but a fix has been `proposed `_.
-* For some unknown reason, the widget does not work in the `Preferences` view, because odoo is not rendering the **QWeb** template.
Bug Tracker
===========
@@ -43,6 +42,7 @@ Contributors
------------
* Flavio Corpa
+* Jairo Llopis
Maintainer
----------
diff --git a/web_widget_image_download/__init__.py b/web_widget_image_download/__init__.py
index c222227a9d41..e69de29bb2d1 100644
--- a/web_widget_image_download/__init__.py
+++ b/web_widget_image_download/__init__.py
@@ -1,3 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Flavio Corpa
-# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
diff --git a/web_widget_image_download/static/src/css/web_widget_image_download.css b/web_widget_image_download/static/src/css/web_widget_image_download.css
index 7b1a6a982ca6..a436cd42271b 100644
--- a/web_widget_image_download/static/src/css/web_widget_image_download.css
+++ b/web_widget_image_download/static/src/css/web_widget_image_download.css
@@ -1,6 +1,8 @@
/* Copyright 2016 Flavio Corpa
+ * Copyright 2016 Jairo Llopis
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
-.openerp .oe_application a.oe_form_binary_file_download {
- color: #eee;
+.openerp .oe_form .oe_form_field_image .oe_form_field_image_controls
+.oe_form_binary_file_download {
+ color: inherit;
}
diff --git a/web_widget_image_download/static/src/js/web_widget_image_download.js b/web_widget_image_download/static/src/js/web_widget_image_download.js
index 6f204d1365cb..b8556f6dffb4 100644
--- a/web_widget_image_download/static/src/js/web_widget_image_download.js
+++ b/web_widget_image_download/static/src/js/web_widget_image_download.js
@@ -1,39 +1,42 @@
-/*
- * Copyright 2016 Flavio Corpa
- * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
- */
-odoo.define('web_widget_image_download', function (require) {
+/* Copyright 2016 Flavio Corpa
+ * Copyright 2016 Jairo Llopis
+ * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
+odoo.define('web_widget_image_download.widget', function (require) {
'use strict';
- var common = require('web.form_common');
+ var core = require('web.core');
+ var $ = require('$');
- common.FieldBinaryImage.include({
+ core.form_widget_registry.get("image").include({
render_value: function () {
this._super();
-
var $widget = this.$el.find('.oe_form_binary_file_download');
-
- this.imgSrc = this.$el.find('img[name="image"]').attr('src');
+ this.imgSrc = this.$el.find('img[name="' + this.name + '"]')
+ .attr('src');
$.ajax({
- type: 'HEAD',
+ type: 'HEAD', // Avoid downloading full image, just headers
url: this.imgSrc,
complete: function (xhr) {
- // retrieve image type from server ("Content-Type" header)
- $widget.attr('download', xhr.getResponseHeader("Content-Type").replace('/', '.'));
+ $widget.attr(
+ 'download',
+ xhr.getResponseHeader("Content-Type")
+ .replace('/', '.')
+ );
}
});
- // use jquery instead of `replace` with qweb (to avoid breaking inheritance)
+ // Replace with jQuery to keep inheritance intact
if (this.has_custom_image()) {
- this.$el.find('.oe_form_binary_file_clear').removeClass('col-md-offset-5');
+ this.$el.find('.oe_form_binary_file_clear')
+ .removeClass('col-md-offset-5');
}
$widget.attr('href', this.imgSrc);
},
+
has_custom_image: function () {
- // check if the image of the widget is different from the default placeholder
- return this.imgSrc && !this.imgSrc.includes('/placeholder.png');
- }
+ return this.imgSrc != this.placeholder;
+ },
});
});
From 1a7b9a5c0ce629ed853ff218f16b9d12d52a9e52 Mon Sep 17 00:00:00 2001
From: smurf-U
Date: Sat, 24 Jun 2017 00:14:06 +0530
Subject: [PATCH 03/44] [10.0][MIG]migrate web_widget_image_download
---
web_widget_image_download/README.rst | 3 ++-
.../{__openerp__.py => __manifest__.py} | 6 +++---
.../static/src/css/web_widget_image_download.css | 6 +++---
.../static/src/js/web_widget_image_download.js | 5 ++---
.../static/src/xml/web_widget_image_download.xml | 5 +++--
5 files changed, 13 insertions(+), 12 deletions(-)
rename web_widget_image_download/{__openerp__.py => __manifest__.py} (80%)
diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst
index 675e61b0253a..70acecc8d3aa 100644
--- a/web_widget_image_download/README.rst
+++ b/web_widget_image_download/README.rst
@@ -20,7 +20,7 @@ To use this module, you need to:
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/162/8.0
+ :target: https://runbot.odoo-community.org/runbot/162/10.0
Known Issues / Roadmap
======================
@@ -43,6 +43,7 @@ Contributors
* Flavio Corpa
* Jairo Llopis
+* Kaushal Prajapati
Maintainer
----------
diff --git a/web_widget_image_download/__openerp__.py b/web_widget_image_download/__manifest__.py
similarity index 80%
rename from web_widget_image_download/__openerp__.py
rename to web_widget_image_download/__manifest__.py
index afc6d2f95d72..3a708e659ae4 100644
--- a/web_widget_image_download/__openerp__.py
+++ b/web_widget_image_download/__manifest__.py
@@ -4,13 +4,13 @@
{
"name": "Web Widget - Image Download",
"summary": "Allows to download any image from its widget",
- "version": "9.0.1.0.0",
+ "version": "10.0.1.0.0",
"category": "web",
"website": "https://www.tecnativa.com",
- "author": "Tecnativa, Odoo Community Association (OCA)",
+ "author": "Tecnativa, Odoo Community Association (OCA), Kaushal Prajapati",
"license": "LGPL-3",
"application": False,
- "installable": True,
+ 'installable': True,
"data": [
"views/assets.xml",
],
diff --git a/web_widget_image_download/static/src/css/web_widget_image_download.css b/web_widget_image_download/static/src/css/web_widget_image_download.css
index a436cd42271b..34b9a591357d 100644
--- a/web_widget_image_download/static/src/css/web_widget_image_download.css
+++ b/web_widget_image_download/static/src/css/web_widget_image_download.css
@@ -2,7 +2,7 @@
* Copyright 2016 Jairo Llopis
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
-.openerp .oe_form .oe_form_field_image .oe_form_field_image_controls
-.oe_form_binary_file_download {
- color: inherit;
+.o_form_field_image .o_form_image_controls
+.o_form_binary_file_download {
+ color: #fff;
}
diff --git a/web_widget_image_download/static/src/js/web_widget_image_download.js b/web_widget_image_download/static/src/js/web_widget_image_download.js
index b8556f6dffb4..688ea1c74a85 100644
--- a/web_widget_image_download/static/src/js/web_widget_image_download.js
+++ b/web_widget_image_download/static/src/js/web_widget_image_download.js
@@ -5,12 +5,11 @@ odoo.define('web_widget_image_download.widget', function (require) {
'use strict';
var core = require('web.core');
- var $ = require('$');
core.form_widget_registry.get("image").include({
render_value: function () {
this._super();
- var $widget = this.$el.find('.oe_form_binary_file_download');
+ var $widget = this.$el.find('.o_form_binary_file_download');
this.imgSrc = this.$el.find('img[name="' + this.name + '"]')
.attr('src');
@@ -28,7 +27,7 @@ odoo.define('web_widget_image_download.widget', function (require) {
// Replace with jQuery to keep inheritance intact
if (this.has_custom_image()) {
- this.$el.find('.oe_form_binary_file_clear')
+ this.$el.find('.o_clear_file_button')
.removeClass('col-md-offset-5');
}
diff --git a/web_widget_image_download/static/src/xml/web_widget_image_download.xml b/web_widget_image_download/static/src/xml/web_widget_image_download.xml
index 096d3256a030..ef25f9e05f1d 100644
--- a/web_widget_image_download/static/src/xml/web_widget_image_download.xml
+++ b/web_widget_image_download/static/src/xml/web_widget_image_download.xml
@@ -4,9 +4,10 @@
-
+
-
+
From 125075a12d214a2a77011f75fb018070b34c37a5 Mon Sep 17 00:00:00 2001
From: OCA Transbot
Date: Sat, 1 Jul 2017 12:43:17 +0200
Subject: [PATCH 04/44] OCA Transbot updated translations from Transifex
---
web_widget_image_download/i18n/hr.po | 26 +++++++++++++++++++++++++
web_widget_image_download/i18n/lt.po | 26 +++++++++++++++++++++++++
web_widget_image_download/i18n/nl_NL.po | 26 +++++++++++++++++++++++++
3 files changed, 78 insertions(+)
create mode 100644 web_widget_image_download/i18n/hr.po
create mode 100644 web_widget_image_download/i18n/lt.po
create mode 100644 web_widget_image_download/i18n/nl_NL.po
diff --git a/web_widget_image_download/i18n/hr.po b/web_widget_image_download/i18n/hr.po
new file mode 100644
index 000000000000..4e123cbc0dd8
--- /dev/null
+++ b/web_widget_image_download/i18n/hr.po
@@ -0,0 +1,26 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_widget_image_download
+#
+# Translators:
+# Bole , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-07-13 16:07+0000\n"
+"PO-Revision-Date: 2017-07-13 16:07+0000\n"
+"Last-Translator: Bole , 2017\n"
+"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: hr\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#. module: web_widget_image_download
+#. openerp-web
+#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:10
+#, python-format
+msgid "Download"
+msgstr "Preuzimanje"
diff --git a/web_widget_image_download/i18n/lt.po b/web_widget_image_download/i18n/lt.po
new file mode 100644
index 000000000000..f9d1a3d4d3f8
--- /dev/null
+++ b/web_widget_image_download/i18n/lt.po
@@ -0,0 +1,26 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_widget_image_download
+#
+# Translators:
+# Viktoras Norkus , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-01-25 01:58+0000\n"
+"PO-Revision-Date: 2018-01-25 01:58+0000\n"
+"Last-Translator: Viktoras Norkus , 2018\n"
+"Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: lt\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. module: web_widget_image_download
+#. openerp-web
+#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:10
+#, python-format
+msgid "Download"
+msgstr "Atsisiūsti"
diff --git a/web_widget_image_download/i18n/nl_NL.po b/web_widget_image_download/i18n/nl_NL.po
new file mode 100644
index 000000000000..1917073b2293
--- /dev/null
+++ b/web_widget_image_download/i18n/nl_NL.po
@@ -0,0 +1,26 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_widget_image_download
+#
+# Translators:
+# Peter Hageman , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-07-01 03:35+0000\n"
+"PO-Revision-Date: 2017-07-01 03:35+0000\n"
+"Last-Translator: Peter Hageman , 2017\n"
+"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: nl_NL\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_widget_image_download
+#. openerp-web
+#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:10
+#, python-format
+msgid "Download"
+msgstr "Download"
From 07a2cef9883b23e035fe46dd238443050266b2c9 Mon Sep 17 00:00:00 2001
From: ernesto
Date: Mon, 28 May 2018 00:01:05 -0400
Subject: [PATCH 05/44] [MIG] web_widget_image_download: Migration to 11.0
---
web_widget_image_download/README.rst | 2 +-
web_widget_image_download/__manifest__.py | 3 +--
.../src/css/web_widget_image_download.css | 2 +-
.../static/src/js/web_widget_image_download.js | 18 ++++--------------
.../src/xml/web_widget_image_download.xml | 2 +-
5 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst
index 70acecc8d3aa..31d8940d551d 100644
--- a/web_widget_image_download/README.rst
+++ b/web_widget_image_download/README.rst
@@ -20,7 +20,7 @@ To use this module, you need to:
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/162/10.0
+ :target: https://runbot.odoo-community.org/runbot/162/11.0
Known Issues / Roadmap
======================
diff --git a/web_widget_image_download/__manifest__.py b/web_widget_image_download/__manifest__.py
index 3a708e659ae4..ad9e3d5efac3 100644
--- a/web_widget_image_download/__manifest__.py
+++ b/web_widget_image_download/__manifest__.py
@@ -1,10 +1,9 @@
-# -*- coding: utf-8 -*-
# Copyright 2016 Flavio Corpa
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Web Widget - Image Download",
"summary": "Allows to download any image from its widget",
- "version": "10.0.1.0.0",
+ "version": "11.0.1.0.0",
"category": "web",
"website": "https://www.tecnativa.com",
"author": "Tecnativa, Odoo Community Association (OCA), Kaushal Prajapati",
diff --git a/web_widget_image_download/static/src/css/web_widget_image_download.css b/web_widget_image_download/static/src/css/web_widget_image_download.css
index 34b9a591357d..05b9f2264b8a 100644
--- a/web_widget_image_download/static/src/css/web_widget_image_download.css
+++ b/web_widget_image_download/static/src/css/web_widget_image_download.css
@@ -2,7 +2,7 @@
* Copyright 2016 Jairo Llopis
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
-.o_form_field_image .o_form_image_controls
+.o_field_image .o_form_image_controls
.o_form_binary_file_download {
color: #fff;
}
diff --git a/web_widget_image_download/static/src/js/web_widget_image_download.js b/web_widget_image_download/static/src/js/web_widget_image_download.js
index 688ea1c74a85..075a33cb0aae 100644
--- a/web_widget_image_download/static/src/js/web_widget_image_download.js
+++ b/web_widget_image_download/static/src/js/web_widget_image_download.js
@@ -4,10 +4,10 @@
odoo.define('web_widget_image_download.widget', function (require) {
'use strict';
- var core = require('web.core');
+ var FieldBinaryImage = require('web.basic_fields').FieldBinaryImage;
- core.form_widget_registry.get("image").include({
- render_value: function () {
+ FieldBinaryImage.include({
+ _render: function () {
this._super();
var $widget = this.$el.find('.o_form_binary_file_download');
this.imgSrc = this.$el.find('img[name="' + this.name + '"]')
@@ -25,17 +25,7 @@ odoo.define('web_widget_image_download.widget', function (require) {
}
});
- // Replace with jQuery to keep inheritance intact
- if (this.has_custom_image()) {
- this.$el.find('.o_clear_file_button')
- .removeClass('col-md-offset-5');
- }
-
$widget.attr('href', this.imgSrc);
- },
-
- has_custom_image: function () {
- return this.imgSrc != this.placeholder;
- },
+ }
});
});
diff --git a/web_widget_image_download/static/src/xml/web_widget_image_download.xml b/web_widget_image_download/static/src/xml/web_widget_image_download.xml
index ef25f9e05f1d..40cd28d02447 100644
--- a/web_widget_image_download/static/src/xml/web_widget_image_download.xml
+++ b/web_widget_image_download/static/src/xml/web_widget_image_download.xml
@@ -5,7 +5,7 @@
-
+
From 95edeae0d90b06a2c7baf9adc19c2e097b7bb8cc Mon Sep 17 00:00:00 2001
From: "Pedro M. Baeza"
Date: Tue, 5 Jun 2018 20:24:04 +0200
Subject: [PATCH 06/44] [IMP] README by fragments + manifest
---
web_widget_image_download/README.rst | 62 +------------------
web_widget_image_download/__manifest__.py | 2 +-
.../readme/CONTRIBUTORS.rst | 8 +++
.../readme/DESCRIPTION.rst | 2 +
web_widget_image_download/readme/USAGE.rst | 6 ++
5 files changed, 18 insertions(+), 62 deletions(-)
create mode 100644 web_widget_image_download/readme/CONTRIBUTORS.rst
create mode 100644 web_widget_image_download/readme/DESCRIPTION.rst
create mode 100644 web_widget_image_download/readme/USAGE.rst
diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst
index 31d8940d551d..3f6262529632 100644
--- a/web_widget_image_download/README.rst
+++ b/web_widget_image_download/README.rst
@@ -1,61 +1 @@
-.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
- :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
- :alt: License: LGPL-3
-
-===========================
-Web Widget - Image Download
-===========================
-
-This module was written to extend the functionality of the image widget and allows to download it.
-
-Usage
-=====
-
-To use this module, you need to:
-
-#. Go to the section `Contacts`.
-#. Click on a contact.
-#. Edit the contact.
-#. Click the `Download` button (between `Edit` and `Clear`).
-
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/162/11.0
-
-Known Issues / Roadmap
-======================
-
-* In order to work correctly, this widget has to detect image type, the server should include this information in the `Content-Type` header. Right now, odoo is not doing so, but a fix has been `proposed `_.
-
-Bug Tracker
-===========
-
-Bugs are tracked on `GitHub Issues
-`_. In case of trouble, please
-check there if your issue has already been reported. If you spotted it first,
-help us smashing it by providing a detailed and welcomed feedback.
-
-Credits
-=======
-
-Contributors
-------------
-
-* Flavio Corpa
-* Jairo Llopis
-* Kaushal Prajapati
-
-Maintainer
-----------
-
-.. image:: https://odoo-community.org/logo.png
- :alt: Odoo Community Association
- :target: https://odoo-community.org
-
-This module is maintained by the OCA.
-
-OCA, or the Odoo Community Association, is a nonprofit organization whose
-mission is to support the collaborative development of Odoo features and
-promote its widespread use.
-
-To contribute to this module, please visit https://odoo-community.org.
+**This file is going to be generated by oca-gen-addon-readme.**
diff --git a/web_widget_image_download/__manifest__.py b/web_widget_image_download/__manifest__.py
index ad9e3d5efac3..5870da234535 100644
--- a/web_widget_image_download/__manifest__.py
+++ b/web_widget_image_download/__manifest__.py
@@ -5,7 +5,7 @@
"summary": "Allows to download any image from its widget",
"version": "11.0.1.0.0",
"category": "web",
- "website": "https://www.tecnativa.com",
+ "website": "https://github.com/OCA/web",
"author": "Tecnativa, Odoo Community Association (OCA), Kaushal Prajapati",
"license": "LGPL-3",
"application": False,
diff --git a/web_widget_image_download/readme/CONTRIBUTORS.rst b/web_widget_image_download/readme/CONTRIBUTORS.rst
new file mode 100644
index 000000000000..afeb1d51e5ec
--- /dev/null
+++ b/web_widget_image_download/readme/CONTRIBUTORS.rst
@@ -0,0 +1,8 @@
+* `Tecnativa `_:
+
+ * Flavio Corpa
+ * Jairo Llopis
+ * Pedro M. Baeza
+ * Ernesto Tejeda
+
+* Kaushal Prajapati
diff --git a/web_widget_image_download/readme/DESCRIPTION.rst b/web_widget_image_download/readme/DESCRIPTION.rst
new file mode 100644
index 000000000000..c4b36dd5c414
--- /dev/null
+++ b/web_widget_image_download/readme/DESCRIPTION.rst
@@ -0,0 +1,2 @@
+This module was written to extend the functionality of the image widget and
+allows to download it.
diff --git a/web_widget_image_download/readme/USAGE.rst b/web_widget_image_download/readme/USAGE.rst
new file mode 100644
index 000000000000..f1685b6a0fe8
--- /dev/null
+++ b/web_widget_image_download/readme/USAGE.rst
@@ -0,0 +1,6 @@
+To use this module, an example path is:
+
+#. Go to the section `Contacts`.
+#. Click on a contact.
+#. Edit the contact.
+#. Click the `Download` button (between `Edit` and `Clear`).
From e86ae936e595197064f10b2d4af7ad06d587389b Mon Sep 17 00:00:00 2001
From: OCA Git Bot
Date: Thu, 7 Jun 2018 05:42:01 +0200
Subject: [PATCH 07/44] [UPD] README.rst
---
web_widget_image_download/README.rst | 93 +++-
.../static/description/index.html | 439 ++++++++++++++++++
2 files changed, 531 insertions(+), 1 deletion(-)
create mode 100644 web_widget_image_download/static/description/index.html
diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst
index 3f6262529632..176321bbc036 100644
--- a/web_widget_image_download/README.rst
+++ b/web_widget_image_download/README.rst
@@ -1 +1,92 @@
-**This file is going to be generated by oca-gen-addon-readme.**
+===========================
+Web Widget - Image Download
+===========================
+
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
+ :target: https://odoo-community.org/page/development-status
+ :alt: Beta
+.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
+ :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
+ :alt: License: LGPL-3
+.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
+ :target: https://github.com/OCA/web/tree/11.0/web_widget_image_download
+ :alt: OCA/web
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_widget_image_download
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/162/11.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
+This module was written to extend the functionality of the image widget and
+allows to download it.
+
+**Table of contents**
+
+.. contents::
+ :local:
+
+Usage
+=====
+
+To use this module, an example path is:
+
+#. Go to the section `Contacts`.
+#. Click on a contact.
+#. Edit the contact.
+#. Click the `Download` button (between `Edit` and `Clear`).
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+`feedback `_.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* Tecnativa
+* Kaushal Prajapati
+
+Contributors
+~~~~~~~~~~~~
+
+* `Tecnativa `_:
+
+ * Flavio Corpa
+ * Jairo Llopis
+ * Pedro M. Baeza
+ * Ernesto Tejeda
+
+* Kaushal Prajapati
+
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
+This module is part of the `OCA/web `_ project on GitHub.
+
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/web_widget_image_download/static/description/index.html b/web_widget_image_download/static/description/index.html
new file mode 100644
index 000000000000..651115ee3bfa
--- /dev/null
+++ b/web_widget_image_download/static/description/index.html
@@ -0,0 +1,439 @@
+
+
+
+
+
+
+Web Widget - Image Download
+
+
+
+
+
+
From 42d49ff39caccaa2ded305a89206eb5bbd3025eb Mon Sep 17 00:00:00 2001
From: oca-travis
Date: Sun, 24 Jun 2018 10:28:18 +0000
Subject: [PATCH 08/44] [UPD] Update web_widget_image_download.pot
---
web_widget_image_download/i18n/hr.po | 7 +++---
web_widget_image_download/i18n/lt.po | 7 +++---
web_widget_image_download/i18n/nl_NL.po | 7 +++---
.../i18n/web_widget_image_download.pot | 22 +++++++++++++++++++
4 files changed, 34 insertions(+), 9 deletions(-)
create mode 100644 web_widget_image_download/i18n/web_widget_image_download.pot
diff --git a/web_widget_image_download/i18n/hr.po b/web_widget_image_download/i18n/hr.po
index 4e123cbc0dd8..edb04e1c188e 100644
--- a/web_widget_image_download/i18n/hr.po
+++ b/web_widget_image_download/i18n/hr.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_image_download
-#
+#
# Translators:
# Bole , 2017
msgid ""
@@ -12,11 +12,12 @@ msgstr ""
"PO-Revision-Date: 2017-07-13 16:07+0000\n"
"Last-Translator: Bole , 2017\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
+"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: hr\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: web_widget_image_download
#. openerp-web
diff --git a/web_widget_image_download/i18n/lt.po b/web_widget_image_download/i18n/lt.po
index f9d1a3d4d3f8..798cb550961c 100644
--- a/web_widget_image_download/i18n/lt.po
+++ b/web_widget_image_download/i18n/lt.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_image_download
-#
+#
# Translators:
# Viktoras Norkus , 2018
msgid ""
@@ -12,11 +12,12 @@ msgstr ""
"PO-Revision-Date: 2018-01-25 01:58+0000\n"
"Last-Translator: Viktoras Norkus , 2018\n"
"Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n"
+"Language: lt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: lt\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
+"%100<10 || n%100>=20) ? 1 : 2);\n"
#. module: web_widget_image_download
#. openerp-web
diff --git a/web_widget_image_download/i18n/nl_NL.po b/web_widget_image_download/i18n/nl_NL.po
index 1917073b2293..1be78a5866a7 100644
--- a/web_widget_image_download/i18n/nl_NL.po
+++ b/web_widget_image_download/i18n/nl_NL.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_image_download
-#
+#
# Translators:
# Peter Hageman , 2017
msgid ""
@@ -11,11 +11,12 @@ msgstr ""
"POT-Creation-Date: 2017-07-01 03:35+0000\n"
"PO-Revision-Date: 2017-07-01 03:35+0000\n"
"Last-Translator: Peter Hageman , 2017\n"
-"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n"
+"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/"
+"teams/23907/nl_NL/)\n"
+"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: nl_NL\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_widget_image_download
diff --git a/web_widget_image_download/i18n/web_widget_image_download.pot b/web_widget_image_download/i18n/web_widget_image_download.pot
new file mode 100644
index 000000000000..df4ad1b263bd
--- /dev/null
+++ b/web_widget_image_download/i18n/web_widget_image_download.pot
@@ -0,0 +1,22 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_widget_image_download
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: web_widget_image_download
+#. openerp-web
+#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:10
+#, python-format
+msgid "Download"
+msgstr ""
+
From 343d79ec5851d73863151d7b76d6e0f0b176cb16 Mon Sep 17 00:00:00 2001
From: ernesto
Date: Wed, 21 Nov 2018 09:30:22 -0500
Subject: [PATCH 09/44] [MIG] web_widget_image_download: Migration to 12.0
---
web_widget_image_download/README.rst | 10 ++---
web_widget_image_download/__manifest__.py | 2 +-
.../static/description/index.html | 6 +--
.../src/css/web_widget_image_download.css | 8 ----
.../src/scss/web_widget_image_download.scss | 38 +++++++++++++++++++
.../src/xml/web_widget_image_download.xml | 5 ++-
web_widget_image_download/views/assets.xml | 2 +-
7 files changed, 51 insertions(+), 20 deletions(-)
delete mode 100644 web_widget_image_download/static/src/css/web_widget_image_download.css
create mode 100644 web_widget_image_download/static/src/scss/web_widget_image_download.scss
diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst
index 176321bbc036..ce5b0932ad43 100644
--- a/web_widget_image_download/README.rst
+++ b/web_widget_image_download/README.rst
@@ -14,13 +14,13 @@ Web Widget - Image Download
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
- :target: https://github.com/OCA/web/tree/11.0/web_widget_image_download
+ :target: https://github.com/OCA/web/tree/12.0/web_widget_image_download
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_widget_image_download
+ :target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_image_download
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/162/11.0
+ :target: https://runbot.odoo-community.org/runbot/162/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -49,7 +49,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -87,6 +87,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/web `_ project on GitHub.
+This module is part of the `OCA/web `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/web_widget_image_download/__manifest__.py b/web_widget_image_download/__manifest__.py
index 5870da234535..bc96cd234d63 100644
--- a/web_widget_image_download/__manifest__.py
+++ b/web_widget_image_download/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Web Widget - Image Download",
"summary": "Allows to download any image from its widget",
- "version": "11.0.1.0.0",
+ "version": "12.0.1.0.0",
"category": "web",
"website": "https://github.com/OCA/web",
"author": "Tecnativa, Odoo Community Association (OCA), Kaushal Prajapati",
diff --git a/web_widget_image_download/static/description/index.html b/web_widget_image_download/static/description/index.html
index 651115ee3bfa..a75233006893 100644
--- a/web_widget_image_download/static/description/index.html
+++ b/web_widget_image_download/static/description/index.html
@@ -367,7 +367,7 @@ Web Widget - Image Download
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module was written to extend the functionality of the image widget and
allows to download it.
Table of contents
@@ -398,7 +398,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -430,7 +430,7 @@
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
This module is part of the OCA/web project on GitHub.
+
This module is part of the OCA/web project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/web_widget_image_download/static/src/css/web_widget_image_download.css b/web_widget_image_download/static/src/css/web_widget_image_download.css
deleted file mode 100644
index 05b9f2264b8a..000000000000
--- a/web_widget_image_download/static/src/css/web_widget_image_download.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Copyright 2016 Flavio Corpa
- * Copyright 2016 Jairo Llopis
- * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
-
-.o_field_image .o_form_image_controls
-.o_form_binary_file_download {
- color: #fff;
-}
diff --git a/web_widget_image_download/static/src/scss/web_widget_image_download.scss b/web_widget_image_download/static/src/scss/web_widget_image_download.scss
new file mode 100644
index 000000000000..c5691a97199e
--- /dev/null
+++ b/web_widget_image_download/static/src/scss/web_widget_image_download.scss
@@ -0,0 +1,38 @@
+
+.o_field_widget {
+ &.o_field_image {
+ .o_form_image_controls {
+ > .fa, .o_form_binary_file_download {
+ margin: 5px 0;
+ padding: 1px 0;
+ width: 33.333333%;
+ }
+ .o_form_binary_file_download {
+ border: none;
+ background-color: transparent;
+ line-height: 0px;
+
+ > button.fa {
+ width: 100%;
+ height: 100%;
+ margin: 0px;
+ border: none;
+ background-color: transparent;
+ cursor: pointer;
+ }
+ }
+ }
+ @include media-breakpoint-down(xs, $o-extra-grid-breakpoints) {
+ .o_form_image_controls{
+ .o_form_binary_file_download {
+ display: none;
+ }
+ > .fa{
+ width: 50%;
+ padding: 6px;
+ margin: 0px;
+ }
+ }
+ }
+ }
+}
diff --git a/web_widget_image_download/static/src/xml/web_widget_image_download.xml b/web_widget_image_download/static/src/xml/web_widget_image_download.xml
index 40cd28d02447..c459e1321297 100644
--- a/web_widget_image_download/static/src/xml/web_widget_image_download.xml
+++ b/web_widget_image_download/static/src/xml/web_widget_image_download.xml
@@ -6,8 +6,9 @@
-
+
+
+
diff --git a/web_widget_image_download/views/assets.xml b/web_widget_image_download/views/assets.xml
index 56fb53851d34..98bcca29f5f0 100644
--- a/web_widget_image_download/views/assets.xml
+++ b/web_widget_image_download/views/assets.xml
@@ -7,7 +7,7 @@
+ href="/web_widget_image_download/static/src/scss/web_widget_image_download.scss"/>
From 1bdd9aaaad27b29f99b1535176f5ef71283681b4 Mon Sep 17 00:00:00 2001
From: oca-travis
Date: Mon, 26 Nov 2018 18:10:54 +0000
Subject: [PATCH 10/44] [UPD] Update web_widget_image_download.pot
---
web_widget_image_download/i18n/web_widget_image_download.pot | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web_widget_image_download/i18n/web_widget_image_download.pot b/web_widget_image_download/i18n/web_widget_image_download.pot
index df4ad1b263bd..f150faac6071 100644
--- a/web_widget_image_download/i18n/web_widget_image_download.pot
+++ b/web_widget_image_download/i18n/web_widget_image_download.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 11.0\n"
+"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -15,7 +15,7 @@ msgstr ""
#. module: web_widget_image_download
#. openerp-web
-#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:10
+#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:9
#, python-format
msgid "Download"
msgstr ""
From ae26c24270e4f866ed4b77e400adabe6d574778b Mon Sep 17 00:00:00 2001
From: OCA Transbot
Date: Sun, 9 Dec 2018 13:37:42 +0000
Subject: [PATCH 11/44] Update translation files
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
---
web_widget_image_download/i18n/hr.po | 2 +-
web_widget_image_download/i18n/lt.po | 2 +-
web_widget_image_download/i18n/nl_NL.po | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/web_widget_image_download/i18n/hr.po b/web_widget_image_download/i18n/hr.po
index edb04e1c188e..fcf7e032b2cc 100644
--- a/web_widget_image_download/i18n/hr.po
+++ b/web_widget_image_download/i18n/hr.po
@@ -21,7 +21,7 @@ msgstr ""
#. module: web_widget_image_download
#. openerp-web
-#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:10
+#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:9
#, python-format
msgid "Download"
msgstr "Preuzimanje"
diff --git a/web_widget_image_download/i18n/lt.po b/web_widget_image_download/i18n/lt.po
index 798cb550961c..9e58ade9a35b 100644
--- a/web_widget_image_download/i18n/lt.po
+++ b/web_widget_image_download/i18n/lt.po
@@ -21,7 +21,7 @@ msgstr ""
#. module: web_widget_image_download
#. openerp-web
-#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:10
+#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:9
#, python-format
msgid "Download"
msgstr "Atsisiūsti"
diff --git a/web_widget_image_download/i18n/nl_NL.po b/web_widget_image_download/i18n/nl_NL.po
index 1be78a5866a7..94fe303a3098 100644
--- a/web_widget_image_download/i18n/nl_NL.po
+++ b/web_widget_image_download/i18n/nl_NL.po
@@ -21,7 +21,7 @@ msgstr ""
#. module: web_widget_image_download
#. openerp-web
-#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:10
+#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:9
#, python-format
msgid "Download"
msgstr "Download"
From 5fcf2209bbd5185a7ab2fc511bfdc6522c330081 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Mon, 29 Jul 2019 03:49:00 +0000
Subject: [PATCH 12/44] [UPD] README.rst
---
web_widget_image_download/static/description/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web_widget_image_download/static/description/index.html b/web_widget_image_download/static/description/index.html
index a75233006893..6e1a06d6a11d 100644
--- a/web_widget_image_download/static/description/index.html
+++ b/web_widget_image_download/static/description/index.html
@@ -3,7 +3,7 @@
-
+
Web Widget - Image Download