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

[18.0][MIG] storage_thumbnail: Migration to 18.0 #435

Open
wants to merge 74 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
26aa982
[REF] start refactoring storage_image, split storage_image in two mod…
sebastienbeau Apr 9, 2018
f785242
[REF] rename method store and retrieve by more explicit method add/ge…
sebastienbeau Apr 11, 2018
03a2b2e
[REF] rename thumbnail.owner to thumbnail.mixin
sebastienbeau Apr 12, 2018
0bdd2eb
[FIX] fix issue when generating thumbnail with the context bin_size=True
sebastienbeau Apr 12, 2018
595cf97
[IMP] add support of deletation of storage.file, storage.image and st…
sebastienbeau Apr 13, 2018
1978392
[REF] review access right add special group for images, make method f…
sebastienbeau Apr 17, 2018
9cbeaec
[FIX] fixed cache issue when generating the thumbnail, no need to cle…
sebastienbeau Apr 17, 2018
a64d790
[REF] refactor store medium, small url and generate thumbnail when cr…
sebastienbeau Apr 19, 2018
2fe422d
Add alt name of thumbnail + update openerp into odoo
acsonefho Apr 26, 2018
549fd96
[REF] rename alt_name in url_key as this will be only used for the ur…
sebastienbeau May 2, 2018
0ea96fc
[IMP] storage_thumbnail: Improve performance by avoiding 1 search for…
lmignon Jan 30, 2019
e90749c
[FIX] storage_thumbnail: Thumbnail must be created using the relation…
lmignon Jan 30, 2019
3492af5
[FIX] fix missing noupdate
sebastienbeau Feb 15, 2019
6ede35f
[FIX] clean with pre-commit and pep 8
bguillot Apr 10, 2019
424ccfe
[IMP] add tests and support pilbox for thumbnail
bguillot Apr 12, 2019
9a331ac
[IMP] tests
bguillot Apr 12, 2019
7af7eec
[FIX] clean code
bguillot Apr 12, 2019
99ca8bc
[FIX] always send the extension
bguillot Apr 12, 2019
7c376e8
[12.0] storage*: Make installable False
rousseldenis Jun 7, 2019
e004a56
[12.0][MIG] storage_thumbnail
rousseldenis Jun 11, 2019
bfbc138
[UPD] README.rst
OCA-git-bot Sep 15, 2019
552ea2e
[ADD] icon.png
OCA-git-bot Sep 15, 2019
c51d74f
[FIX] __manifest__: Uses github repo url as website and add OCA into …
lmignon Sep 24, 2019
3cfbe08
storage_thumbnail 12.0.1.0.1
OCA-git-bot Sep 24, 2019
a725900
pre-commit, black, isort
sbidoul Oct 1, 2019
8866f7e
[UPD] Update storage_thumbnail.pot
oca-travis Oct 18, 2019
56075e9
13.0: Create branche
lmignon Oct 21, 2019
222235b
[MIG] storage_thumbnail: Migration to 13.0
Oct 22, 2019
dac64ec
[MIG] storage_thumbnail: Finalize migrration to 13.0
lmignon Nov 5, 2019
5527ccc
[UPD] Update storage_thumbnail.pot
oca-travis Nov 6, 2019
815ea12
[UPD] README.rst
OCA-git-bot Nov 6, 2019
4d8445e
Add server_env support
simahawk Nov 22, 2019
28d66a8
storage_thumbnail 12.0.2.0.0
OCA-git-bot Nov 25, 2019
8f3dd48
pre-commit update
OCA-git-bot Mar 14, 2020
2bcf750
[UPD] README.rst
OCA-git-bot Jul 13, 2020
f7edb36
[UPD] README.rst
OCA-git-bot Jul 14, 2020
cf0828d
[FIX] fix wrong key in manisfest'
sebastienbeau Nov 20, 2020
b3fa222
[UPD] README.rst
OCA-git-bot Nov 20, 2020
bea501b
storage_thumbnail 13.0.1.0.1
OCA-git-bot Nov 20, 2020
bff8a7d
[ADD] add new V14 config
sebastienbeau Dec 6, 2020
5f40f8c
[IMP] all: black, isort, prettier
sebastienbeau Dec 6, 2020
c1a59d4
[MIG] batch migration of modules
sebastienbeau Dec 6, 2020
f411ea6
[UPD] README.rst
OCA-git-bot Mar 1, 2021
4a8ea31
storage_thumbnail 14.0.1.0.1
OCA-git-bot Mar 1, 2021
e10a3d6
[UPD] Update storage_thumbnail.pot
oca-travis Jun 9, 2021
6308644
[UPD] Update storage_thumbnail.pot
oca-travis Aug 2, 2021
22c488c
[CHG] storage: Use more permissive licence: AGPL-> LGPL
etobella Mar 10, 2021
3130920
[UPD] README.rst
OCA-git-bot Aug 2, 2021
b7f20bb
storage_thumbnail 14.0.2.0.0
OCA-git-bot Aug 2, 2021
a535023
storage_thumbnail: use FakeModelLoader for tests
simahawk Mar 31, 2021
3b731c4
storage_thumb: do not store url
simahawk Mar 30, 2021
7705a05
[FIX] storage_thumbnail: assertEquals -> assertEqual (deprecation war…
ivantodorovich Aug 2, 2021
f554bcd
[FIX] storage_thumbnail: odoo_test_helper warning
ivantodorovich Aug 2, 2021
5ac5ff1
[UPD] Update storage_thumbnail.pot
oca-travis Aug 3, 2021
554ddb9
storage_thumbnail 14.0.2.2.0
OCA-git-bot Aug 3, 2021
17d412b
[14.0] storage_thumbnail: refactor to ease override
Oct 4, 2021
ff9ac26
[FIX] function _compute_main_thumbs
Oct 6, 2021
bd2db51
storage_thumbnail 14.0.2.2.1
OCA-git-bot Oct 6, 2021
fc96143
storage_thumbnail 14.0.2.2.2
OCA-git-bot Oct 6, 2021
675e73b
storage_thumbnail: use internal url when needed
simahawk May 27, 2022
f0b2678
storage_thumbnail: compute relations w/ sudo
simahawk May 27, 2022
97bd381
[UPD] Update storage_thumbnail.pot
oca-travis May 27, 2022
1bd3c35
storage_thumbnail 14.0.2.3.0
OCA-git-bot May 27, 2022
35ad6e5
[MIG] storage_thumbnail: Migration to 15.0
JasminSForgeFlow Jun 10, 2022
bc53c5e
[UPD] Update storage_thumbnail.pot
Oct 17, 2022
4a9a547
[UPD] README.rst
OCA-git-bot Oct 17, 2022
e74bdad
[UPD] README.rst
OCA-git-bot Sep 3, 2023
05a9665
[IMP] storage_thumbnail: pre-commit auto fixes
thienvh332 Nov 19, 2024
75aeed3
storage_thumbnail: add method get_existing_thumbnail
sebastienbeau Jul 20, 2023
0b54c2d
storage_thumbnail: fix, always use slugified url_key
sebalix Jul 9, 2024
fa9b18d
oca-port: blacklist PR(s) , 78, 106, 108, 298 for storage_thumbnail
thienvh332 Nov 19, 2024
474a634
[MIG] storage_thumbnail: Migration to 18.0
thienvh332 Nov 20, 2024
5d0843f
[ADD] add odoo_test_helper
thienvh332 Nov 22, 2024
7dfbb1e
[DON'T MERGE] Add test-requirements.txt
thienvh332 Nov 20, 2024
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
9 changes: 9 additions & 0 deletions .oca/oca-port/blacklist/storage_thumbnail.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"pull_requests": {
"orphaned_commits": "False positive",
"78": "False positive",
"106": "False positive",
"108": "False positive",
"298": "False positive"
}
}
85 changes: 85 additions & 0 deletions storage_thumbnail/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
=================
Storage Thumbnail
=================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7d819b9736618f58fefefb6b5f00415e401b70d5d855c86e5ded82606a0d770a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/18.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-18-0/storage-18-0-storage_thumbnail
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/storage&target_branch=18.0
:alt: Try me on Runboat

|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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/storage/issues/new?body=module:%20storage_thumbnail%0Aversion:%2018.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]>
- Vo Hong Thien <[email protected]>

Other credits
-------------

The migration of this module from 15.0 to 18.0 was financially supported
by Camptocamp

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/18.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": "18.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