Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] storage_thumbnail #272

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
67c197e
[REF] start refactoring storage_image, split storage_image in two mod…
sebastienbeau Apr 9, 2018
59b0fc1
[REF] rename method store and retrieve by more explicit method add/ge…
sebastienbeau Apr 11, 2018
4c90caa
[REF] rename thumbnail.owner to thumbnail.mixin
sebastienbeau Apr 12, 2018
7d24dee
[FIX] fix issue when generating thumbnail with the context bin_size=True
sebastienbeau Apr 12, 2018
be74a87
[IMP] add support of deletation of storage.file, storage.image and st…
sebastienbeau Apr 13, 2018
2e5651a
[REF] review access right add special group for images, make method f…
sebastienbeau Apr 17, 2018
05460b3
[FIX] fixed cache issue when generating the thumbnail, no need to cle…
sebastienbeau Apr 17, 2018
d31ec24
[REF] refactor store medium, small url and generate thumbnail when cr…
sebastienbeau Apr 19, 2018
9e827ea
Add alt name of thumbnail + update openerp into odoo
acsonefho Apr 26, 2018
e3ef5d0
[REF] rename alt_name in url_key as this will be only used for the ur…
sebastienbeau May 2, 2018
2bb9d81
[IMP] storage_thumbnail: Improve performance by avoiding 1 search for…
lmignon Jan 30, 2019
5f110c5
[FIX] storage_thumbnail: Thumbnail must be created using the relation…
lmignon Jan 30, 2019
d6c795a
[FIX] fix missing noupdate
sebastienbeau Feb 15, 2019
4417318
[FIX] clean with pre-commit and pep 8
bguillot Apr 10, 2019
fbe5261
[IMP] add tests and support pilbox for thumbnail
bguillot Apr 12, 2019
5a69718
[IMP] tests
bguillot Apr 12, 2019
20fef01
[FIX] clean code
bguillot Apr 12, 2019
2324c34
[FIX] always send the extension
bguillot Apr 12, 2019
8f1f435
[12.0] storage*: Make installable False
rousseldenis Jun 7, 2019
500fc3f
[12.0][MIG] storage_thumbnail
rousseldenis Jun 11, 2019
6c9b917
[UPD] README.rst
OCA-git-bot Sep 15, 2019
7b35528
[ADD] icon.png
OCA-git-bot Sep 15, 2019
013900f
[FIX] __manifest__: Uses github repo url as website and add OCA into …
lmignon Sep 24, 2019
06d1158
storage_thumbnail 12.0.1.0.1
OCA-git-bot Sep 24, 2019
2cc782d
pre-commit, black, isort
sbidoul Oct 1, 2019
c7bbd36
[UPD] Update storage_thumbnail.pot
oca-travis Oct 18, 2019
1496c00
13.0: Create branche
lmignon Oct 21, 2019
e5a8ca8
[MIG] storage_thumbnail: Migration to 13.0
Oct 22, 2019
86a3f2d
[MIG] storage_thumbnail: Finalize migrration to 13.0
lmignon Nov 5, 2019
efe927e
[UPD] Update storage_thumbnail.pot
oca-travis Nov 6, 2019
7c2b3a5
[UPD] README.rst
OCA-git-bot Nov 6, 2019
3d47d97
Add server_env support
simahawk Nov 22, 2019
7db78a2
storage_thumbnail 12.0.2.0.0
OCA-git-bot Nov 25, 2019
a9f282c
pre-commit update
OCA-git-bot Mar 14, 2020
3639c76
[UPD] README.rst
OCA-git-bot Jul 13, 2020
205f6b5
[UPD] README.rst
OCA-git-bot Jul 14, 2020
6b9342b
[FIX] fix wrong key in manisfest'
sebastienbeau Nov 20, 2020
c0769c3
[UPD] README.rst
OCA-git-bot Nov 20, 2020
18fb0e8
storage_thumbnail 13.0.1.0.1
OCA-git-bot Nov 20, 2020
43a49d8
[ADD] add new V14 config
sebastienbeau Dec 6, 2020
8eb9b02
[IMP] all: black, isort, prettier
sebastienbeau Dec 6, 2020
832cf16
[MIG] batch migration of modules
sebastienbeau Dec 6, 2020
773598d
[UPD] README.rst
OCA-git-bot Mar 1, 2021
230ab2e
storage_thumbnail 14.0.1.0.1
OCA-git-bot Mar 1, 2021
e8d3134
[UPD] Update storage_thumbnail.pot
oca-travis Jun 9, 2021
afbbed2
[UPD] Update storage_thumbnail.pot
oca-travis Aug 2, 2021
af858d8
[CHG] storage: Use more permissive licence: AGPL-> LGPL
etobella Mar 10, 2021
0399804
[UPD] README.rst
OCA-git-bot Aug 2, 2021
58a2bee
storage_thumbnail 14.0.2.0.0
OCA-git-bot Aug 2, 2021
ad11db0
storage_thumbnail: use FakeModelLoader for tests
simahawk Mar 31, 2021
d0108b1
storage_thumb: do not store url
simahawk Mar 30, 2021
f54da3c
[FIX] storage_thumbnail: assertEquals -> assertEqual (deprecation war…
ivantodorovich Aug 2, 2021
9795c89
[FIX] storage_thumbnail: odoo_test_helper warning
ivantodorovich Aug 2, 2021
2954806
[UPD] Update storage_thumbnail.pot
oca-travis Aug 3, 2021
b259b3a
storage_thumbnail 14.0.2.2.0
OCA-git-bot Aug 3, 2021
43030cd
[14.0] storage_thumbnail: refactor to ease override
Oct 4, 2021
fc11c93
[FIX] function _compute_main_thumbs
Oct 6, 2021
82a2210
storage_thumbnail 14.0.2.2.1
OCA-git-bot Oct 6, 2021
0a80dfd
storage_thumbnail 14.0.2.2.2
OCA-git-bot Oct 6, 2021
d83f4ad
storage_thumbnail: use internal url when needed
simahawk May 27, 2022
a6ff471
storage_thumbnail: compute relations w/ sudo
simahawk May 27, 2022
f55ee05
[UPD] Update storage_thumbnail.pot
oca-travis May 27, 2022
a05fb57
storage_thumbnail 14.0.2.3.0
OCA-git-bot May 27, 2022
d9e9e8a
[MIG] storage_thumbnail: Migration to 15.0
JasminSForgeFlow Jun 10, 2022
4d07df3
[UPD] Update storage_thumbnail.pot
Oct 17, 2022
74457b2
[UPD] README.rst
OCA-git-bot Oct 17, 2022
f8dd5d0
storage_thumbnail: add method get_existing_thumbnail
sebastienbeau Jul 20, 2023
08c0859
[16.0][MIG] storage_thumbnail
sbejaoui Aug 14, 2023
a8409f5
[DON'T MERGE] add unmerged requirements
sbejaoui Aug 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup/storage_thumbnail/odoo/addons/storage_thumbnail
6 changes: 6 additions & 0 deletions setup/storage_thumbnail/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,
)
75 changes: 75 additions & 0 deletions storage_thumbnail/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
=================
Storage Thumbnail
=================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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%2Fstorage-lightgray.png?logo=github
:target: https://github.com/OCA/storage/tree/15.0/storage_thumbnail
:alt: OCA/storage
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/storage-15-0/storage-15-0-storage_thumbnail
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/275/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

External image thumbnail management depending on Storage File module.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/storage/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 <https://github.com/OCA/storage/issues/new?body=module:%20storage_thumbnail%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Akretion

Contributors
~~~~~~~~~~~~

* Sebastien Beau <[email protected]>
* Raphaël Reverdy <[email protected]>
* Denis Roussel <[email protected]>

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/storage <https://github.com/OCA/storage/tree/15.0/storage_thumbnail>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions storage_thumbnail/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions storage_thumbnail/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2017 Akretion (http://www.akretion.com).
# @author Sébastien BEAU <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{
"name": "Storage Thumbnail",
"summary": "Abstract module that add the possibility to have thumbnail",
"version": "16.0.1.0.0",
"category": "Storage",
"website": "https://github.com/OCA/storage",
"author": " Akretion, Odoo Community Association (OCA)",
"license": "LGPL-3",
"development_status": "Production/Stable",
"installable": True,
"depends": ["storage_file"],
"data": [
"data/ir_parameter.xml",
"views/storage_thumbnail_view.xml",
"security/ir.model.access.csv",
],
}
7 changes: 7 additions & 0 deletions storage_thumbnail/data/ir_parameter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="storage_thumbnail_backend" model="ir.config_parameter">
<field name="key">storage.thumbnail.backend_id</field>
<field name="value" ref="storage_backend.default_storage_backend" />
</record>
</odoo>
241 changes: 241 additions & 0 deletions storage_thumbnail/i18n/storage_thumbnail.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * storage_thumbnail
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__active
msgid "Active"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__checksum
msgid "Checksum/SHA1"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__company_id
msgid "Company"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__create_uid
msgid "Created by"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__create_date
msgid "Created on"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__data
msgid "Data"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,help:storage_thumbnail.field_storage_thumbnail__data
msgid "Datas"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__display_name
msgid "Display Name"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__extension
msgid "Extension"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__file_id
msgid "File"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__file_size
msgid "File Size"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_file__file_type
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__file_type
msgid "File Type"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__filename
msgid "Filename without extension"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,help:storage_thumbnail.field_storage_thumbnail__internal_url
msgid "HTTP URL to load the file directly from storage."
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,help:storage_thumbnail.field_storage_thumbnail__url
msgid "HTTP accessible path to the file"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__human_file_size
msgid "Human File Size"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__id
msgid "ID"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__internal_url
msgid "Internal Url"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail____last_update
msgid "Last Modified on"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__write_uid
msgid "Last Updated by"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__write_date
msgid "Last Updated on"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_thumbnail_mixin__image_medium_url
msgid "Medium thumb URL"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__mimetype
msgid "Mime Type"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__name
msgid "Name"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__relative_path
msgid "Relative Path"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,help:storage_thumbnail.field_storage_thumbnail__relative_path
msgid "Relative location for backend"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__res_id
msgid "Res"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__res_model
msgid "Res Model"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__slug
msgid "Slug"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,help:storage_thumbnail.field_storage_thumbnail__slug
msgid "Slug-ified name with ID for URL"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_thumbnail_mixin__image_small_url
msgid "Small thumb URL"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,help:storage_thumbnail.field_storage_thumbnail__url_key
msgid "Specific URL key for generating the url of the image"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__backend_id
msgid "Storage"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model,name:storage_thumbnail.model_storage_file
msgid "Storage File"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model,name:storage_thumbnail.model_storage_thumbnail
msgid "Storage Thumbnail"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_thumbnail_mixin__thumb_medium_id
msgid "Thumb Medium"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_thumbnail_mixin__thumb_small_id
msgid "Thumb Small"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields.selection,name:storage_thumbnail.selection__storage_file__file_type__thumbnail
#: model_terms:ir.ui.view,arch_db:storage_thumbnail.view_thumbnail_form
msgid "Thumbnail"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model,name:storage_thumbnail.model_thumbnail_mixin
msgid "Thumbnail Mixin add the thumbnail capability"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_thumbnail_mixin__thumbnail_ids
msgid "Thumbnails"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__to_delete
msgid "To Delete"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__url
msgid "Url"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__url_key
msgid "Url Key"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__size_x
msgid "X size"
msgstr ""

#. module: storage_thumbnail
#: model:ir.model.fields,field_description:storage_thumbnail.field_storage_thumbnail__size_y
msgid "Y size"
msgstr ""
3 changes: 3 additions & 0 deletions storage_thumbnail/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import storage_thumbnail
from . import thumbnail_mixin
from . import storage_file
13 changes: 13 additions & 0 deletions storage_thumbnail/models/storage_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2017 Akretion (http://www.akretion.com).
# @author Sébastien BEAU <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import fields, models


class StorageFile(models.Model):
_inherit = "storage.file"

file_type = fields.Selection(
selection_add=[("thumbnail", "Thumbnail")], ondelete={"thumbnail": "set null"}
)
Loading
Loading