odoo-addon-stock-lot-image 18.0.1.0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,97 @@
1
+ .. image:: https://odoo-community.org/readme-banner-image
2
+ :target: https://odoo-community.org/get-involved?utm_source=readme
3
+ :alt: Odoo Community Association
4
+
5
+ ===============
6
+ Stock Lot Image
7
+ ===============
8
+
9
+ ..
10
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11
+ !! This file is generated by oca-gen-addon-readme !!
12
+ !! changes will be overwritten. !!
13
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
+ !! source digest: sha256:ba4cf576230bd0075168576b472a842d9a171bb5395f52e45145d4bf9fa0b679
15
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
+
17
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18
+ :target: https://odoo-community.org/page/development-status
19
+ :alt: Beta
20
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22
+ :alt: License: AGPL-3
23
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
24
+ :target: https://github.com/OCA/stock-logistics-warehouse/tree/18.0/stock_lot_image
25
+ :alt: OCA/stock-logistics-warehouse
26
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27
+ :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-18-0/stock-logistics-warehouse-18-0-stock_lot_image
28
+ :alt: Translate me on Weblate
29
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=18.0
31
+ :alt: Try me on Runboat
32
+
33
+ |badge1| |badge2| |badge3| |badge4| |badge5|
34
+
35
+ This module adds the ability to define images in a lot (similar to what
36
+ happens with website_sale in products).
37
+
38
+ **Table of contents**
39
+
40
+ .. contents::
41
+ :local:
42
+
43
+ Usage
44
+ =====
45
+
46
+ Go to a lot and in the Images tab you can add linked files.
47
+
48
+ Bug Tracker
49
+ ===========
50
+
51
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/issues>`_.
52
+ In case of trouble, please check there if your issue has already been reported.
53
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
54
+ `feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_lot_image%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
55
+
56
+ Do not contact contributors directly about support or help with technical issues.
57
+
58
+ Credits
59
+ =======
60
+
61
+ Authors
62
+ -------
63
+
64
+ * Tecnativa
65
+
66
+ Contributors
67
+ ------------
68
+
69
+ - ``Tecnativa <https://www.tecnativa.com>``\ \_:
70
+
71
+ - Pedro M. Baeza
72
+ - Víctor Martínez
73
+
74
+ Maintainers
75
+ -----------
76
+
77
+ This module is maintained by the OCA.
78
+
79
+ .. image:: https://odoo-community.org/logo.png
80
+ :alt: Odoo Community Association
81
+ :target: https://odoo-community.org
82
+
83
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
84
+ mission is to support the collaborative development of Odoo features and
85
+ promote its widespread use.
86
+
87
+ .. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px
88
+ :target: https://github.com/victoralmau
89
+ :alt: victoralmau
90
+
91
+ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
92
+
93
+ |maintainer-victoralmau|
94
+
95
+ This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/18.0/stock_lot_image>`_ project on GitHub.
96
+
97
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1 @@
1
+ from . import models
@@ -0,0 +1,23 @@
1
+ # Copyright 2025 Tecnativa - Víctor Martínez
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
+ {
4
+ "name": "Stock Lot Image",
5
+ "version": "18.0.1.0.0",
6
+ "category": "Stock",
7
+ "website": "https://github.com/OCA/stock-logistics-warehouse",
8
+ "author": "Tecnativa, Odoo Community Association (OCA)",
9
+ "license": "AGPL-3",
10
+ "installable": True,
11
+ "depends": ["stock"],
12
+ "data": [
13
+ "security/ir.model.access.csv",
14
+ "views/stock_lot_image_views.xml",
15
+ "views/stock_lot_views.xml",
16
+ ],
17
+ "assets": {
18
+ "web.assets_backend": [
19
+ "stock_lot_image/static/src/scss/stock_lot_image_backend.scss",
20
+ ],
21
+ },
22
+ "maintainers": ["victoralmau"],
23
+ }
@@ -0,0 +1,175 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * stock_lot_image
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 18.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "POT-Creation-Date: 2025-11-04 11:25+0000\n"
10
+ "PO-Revision-Date: 2025-11-04 11:25+0000\n"
11
+ "Last-Translator: \n"
12
+ "Language-Team: \n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: \n"
16
+ "Plural-Forms: \n"
17
+
18
+ #. module: stock_lot_image
19
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_kanban
20
+ msgid "#{record.name.value}"
21
+ msgstr ""
22
+
23
+ #. module: stock_lot_image
24
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_form
25
+ msgid "<span>Video Preview</span>"
26
+ msgstr "<span>Vista previa en vídeo</span>"
27
+
28
+ #. module: stock_lot_image
29
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_kanban
30
+ msgid "Acceptable file size"
31
+ msgstr "Tamaño de archivo aceptable"
32
+
33
+ #. module: stock_lot_image
34
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.view_production_lot_form
35
+ msgid "Add Media"
36
+ msgstr "Añadir medios"
37
+
38
+ #. module: stock_lot_image
39
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__can_image_1024_be_zoomed
40
+ msgid "Can Image 1024 be zoomed"
41
+ msgstr "¿Se puede ampliar la imagen 1024?"
42
+
43
+ #. module: stock_lot_image
44
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__create_uid
45
+ msgid "Created by"
46
+ msgstr "Creado por"
47
+
48
+ #. module: stock_lot_image
49
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__create_date
50
+ msgid "Created on"
51
+ msgstr "Creado el"
52
+
53
+ #. module: stock_lot_image
54
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__display_name
55
+ msgid "Display Name"
56
+ msgstr "Nombre para mostrar"
57
+
58
+ #. module: stock_lot_image
59
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__embed_code
60
+ msgid "Embed Code"
61
+ msgstr "Incrustar código"
62
+
63
+ #. module: stock_lot_image
64
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_kanban
65
+ msgid "Huge file size. The image should be optimized/reduced."
66
+ msgstr "Tamaño de archivo excesivo. Optimice o reduzca la imagen."
67
+
68
+ #. module: stock_lot_image
69
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__id
70
+ msgid "ID"
71
+ msgstr ""
72
+
73
+ #. module: stock_lot_image
74
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_1920
75
+ msgid "Image"
76
+ msgstr "Imagen"
77
+
78
+ #. module: stock_lot_image
79
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_1024
80
+ msgid "Image 1024"
81
+ msgstr "Imagen 1024"
82
+
83
+ #. module: stock_lot_image
84
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_128
85
+ msgid "Image 128"
86
+ msgstr "Imagen 128"
87
+
88
+ #. module: stock_lot_image
89
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_256
90
+ msgid "Image 256"
91
+ msgstr "Imagen 256"
92
+
93
+ #. module: stock_lot_image
94
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_512
95
+ msgid "Image 512"
96
+ msgstr "Imagen 512"
97
+
98
+ #. module: stock_lot_image
99
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_form
100
+ msgid "Image Name"
101
+ msgstr "Nombre de la imagen"
102
+
103
+ #. module: stock_lot_image
104
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot__image_ids
105
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.view_production_lot_form
106
+ msgid "Images"
107
+ msgstr "Imágenes"
108
+
109
+ #. module: stock_lot_image
110
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__write_uid
111
+ msgid "Last Updated by"
112
+ msgstr "Última actualización por"
113
+
114
+ #. module: stock_lot_image
115
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__write_date
116
+ msgid "Last Updated on"
117
+ msgstr "Última actualización el"
118
+
119
+ #. module: stock_lot_image
120
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__lot_id
121
+ msgid "Lot"
122
+ msgstr "Lote"
123
+
124
+ #. module: stock_lot_image
125
+ #: model:ir.model,name:stock_lot_image.model_stock_lot
126
+ msgid "Lot/Serial"
127
+ msgstr "Lote/serie "
128
+
129
+ #. module: stock_lot_image
130
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__name
131
+ msgid "Name"
132
+ msgstr "Nombre"
133
+
134
+ #. module: stock_lot_image
135
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_kanban
136
+ msgid ""
137
+ "Optimization required! Reduce the image size or increase your compression "
138
+ "settings."
139
+ msgstr ""
140
+ "¡Optimización requerida! Reduzca el tamaño de la imagen o incremente su "
141
+ "compresión."
142
+
143
+ #. module: stock_lot_image
144
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_form
145
+ msgid "Please enter a valid Video URL."
146
+ msgstr "Introduzca un URL de vídeo válido."
147
+
148
+ #. module: stock_lot_image
149
+ #. odoo-python
150
+ #: code:addons/stock_lot_image/models/stock_lot_image.py:0
151
+ msgid ""
152
+ "Provided video URL for '%s' is not valid. Please enter a valid video URL."
153
+ msgstr ""
154
+ "URL de vídeo proporcionado para '%s' no es válido. Introduzca uno válido."
155
+
156
+ #. module: stock_lot_image
157
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__sequence
158
+ msgid "Sequence"
159
+ msgstr "Secuencia"
160
+
161
+ #. module: stock_lot_image
162
+ #: model:ir.model,name:stock_lot_image.model_stock_lot_image
163
+ msgid "Stock Lot Image"
164
+ msgstr "Imagen de lote"
165
+
166
+ #. module: stock_lot_image
167
+ #: model:ir.model.fields,help:stock_lot_image.field_stock_lot_image__video_url
168
+ msgid "URL of a video for showcasing your lot."
169
+ msgstr "URL de un vídeo para promocionar su lote."
170
+
171
+ #. module: stock_lot_image
172
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__video_url
173
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_form
174
+ msgid "Video URL"
175
+ msgstr "URL del vídeo"
@@ -0,0 +1,170 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * stock_lot_image
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 18.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: \n"
14
+ "Plural-Forms: \n"
15
+
16
+ #. module: stock_lot_image
17
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_kanban
18
+ msgid "#{record.name.value}"
19
+ msgstr ""
20
+
21
+ #. module: stock_lot_image
22
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_form
23
+ msgid "<span>Video Preview</span>"
24
+ msgstr ""
25
+
26
+ #. module: stock_lot_image
27
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_kanban
28
+ msgid "Acceptable file size"
29
+ msgstr ""
30
+
31
+ #. module: stock_lot_image
32
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.view_production_lot_form
33
+ msgid "Add Media"
34
+ msgstr ""
35
+
36
+ #. module: stock_lot_image
37
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__can_image_1024_be_zoomed
38
+ msgid "Can Image 1024 be zoomed"
39
+ msgstr ""
40
+
41
+ #. module: stock_lot_image
42
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__create_uid
43
+ msgid "Created by"
44
+ msgstr ""
45
+
46
+ #. module: stock_lot_image
47
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__create_date
48
+ msgid "Created on"
49
+ msgstr ""
50
+
51
+ #. module: stock_lot_image
52
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__display_name
53
+ msgid "Display Name"
54
+ msgstr ""
55
+
56
+ #. module: stock_lot_image
57
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__embed_code
58
+ msgid "Embed Code"
59
+ msgstr ""
60
+
61
+ #. module: stock_lot_image
62
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_kanban
63
+ msgid "Huge file size. The image should be optimized/reduced."
64
+ msgstr ""
65
+
66
+ #. module: stock_lot_image
67
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__id
68
+ msgid "ID"
69
+ msgstr ""
70
+
71
+ #. module: stock_lot_image
72
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_1920
73
+ msgid "Image"
74
+ msgstr ""
75
+
76
+ #. module: stock_lot_image
77
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_1024
78
+ msgid "Image 1024"
79
+ msgstr ""
80
+
81
+ #. module: stock_lot_image
82
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_128
83
+ msgid "Image 128"
84
+ msgstr ""
85
+
86
+ #. module: stock_lot_image
87
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_256
88
+ msgid "Image 256"
89
+ msgstr ""
90
+
91
+ #. module: stock_lot_image
92
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__image_512
93
+ msgid "Image 512"
94
+ msgstr ""
95
+
96
+ #. module: stock_lot_image
97
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_form
98
+ msgid "Image Name"
99
+ msgstr ""
100
+
101
+ #. module: stock_lot_image
102
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot__image_ids
103
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.view_production_lot_form
104
+ msgid "Images"
105
+ msgstr ""
106
+
107
+ #. module: stock_lot_image
108
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__write_uid
109
+ msgid "Last Updated by"
110
+ msgstr ""
111
+
112
+ #. module: stock_lot_image
113
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__write_date
114
+ msgid "Last Updated on"
115
+ msgstr ""
116
+
117
+ #. module: stock_lot_image
118
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__lot_id
119
+ msgid "Lot"
120
+ msgstr ""
121
+
122
+ #. module: stock_lot_image
123
+ #: model:ir.model,name:stock_lot_image.model_stock_lot
124
+ msgid "Lot/Serial"
125
+ msgstr ""
126
+
127
+ #. module: stock_lot_image
128
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__name
129
+ msgid "Name"
130
+ msgstr ""
131
+
132
+ #. module: stock_lot_image
133
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_kanban
134
+ msgid ""
135
+ "Optimization required! Reduce the image size or increase your compression "
136
+ "settings."
137
+ msgstr ""
138
+
139
+ #. module: stock_lot_image
140
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_form
141
+ msgid "Please enter a valid Video URL."
142
+ msgstr ""
143
+
144
+ #. module: stock_lot_image
145
+ #. odoo-python
146
+ #: code:addons/stock_lot_image/models/stock_lot_image.py:0
147
+ msgid ""
148
+ "Provided video URL for '%s' is not valid. Please enter a valid video URL."
149
+ msgstr ""
150
+
151
+ #. module: stock_lot_image
152
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__sequence
153
+ msgid "Sequence"
154
+ msgstr ""
155
+
156
+ #. module: stock_lot_image
157
+ #: model:ir.model,name:stock_lot_image.model_stock_lot_image
158
+ msgid "Stock Lot Image"
159
+ msgstr ""
160
+
161
+ #. module: stock_lot_image
162
+ #: model:ir.model.fields,help:stock_lot_image.field_stock_lot_image__video_url
163
+ msgid "URL of a video for showcasing your lot."
164
+ msgstr ""
165
+
166
+ #. module: stock_lot_image
167
+ #: model:ir.model.fields,field_description:stock_lot_image.field_stock_lot_image__video_url
168
+ #: model_terms:ir.ui.view,arch_db:stock_lot_image.stock_lot_image_view_form
169
+ msgid "Video URL"
170
+ msgstr ""
@@ -0,0 +1,2 @@
1
+ from . import stock_lot
2
+ from . import stock_lot_image
@@ -0,0 +1,13 @@
1
+ # Copyright 2025 Tecnativa - Víctor Martínez
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
+ from odoo import fields, models
4
+
5
+
6
+ class StockLot(models.Model):
7
+ _inherit = "stock.lot"
8
+
9
+ image_ids = fields.One2many(
10
+ string="Images",
11
+ comodel_name="stock.lot.image",
12
+ inverse_name="lot_id",
13
+ )
@@ -0,0 +1,66 @@
1
+ # Copyright 2025 Tecnativa - Víctor Martínez
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
+
4
+ import base64
5
+
6
+ from odoo import api, fields, models
7
+ from odoo.exceptions import ValidationError
8
+ from odoo.tools.image import is_image_size_above
9
+
10
+ from odoo.addons.web_editor.tools import get_video_embed_code, get_video_thumbnail
11
+
12
+
13
+ class StockLotImage(models.Model):
14
+ _name = "stock.lot.image"
15
+ _description = "Stock Lot Image"
16
+ _inherit = ["image.mixin"]
17
+ _order = "sequence, id"
18
+
19
+ name = fields.Char(required=True)
20
+ sequence = fields.Integer(default=10)
21
+ lot_id = fields.Many2one(
22
+ comodel_name="stock.lot",
23
+ string="Lot",
24
+ ondelete="cascade",
25
+ index=True,
26
+ )
27
+ video_url = fields.Char(
28
+ string="Video URL",
29
+ help="URL of a video for showcasing your lot.",
30
+ )
31
+ embed_code = fields.Html(compute="_compute_embed_code", sanitize=False)
32
+ can_image_1024_be_zoomed = fields.Boolean(
33
+ string="Can Image 1024 be zoomed",
34
+ compute="_compute_can_image_1024_be_zoomed",
35
+ store=True,
36
+ )
37
+
38
+ @api.depends("image_1920", "image_1024")
39
+ def _compute_can_image_1024_be_zoomed(self):
40
+ for image in self:
41
+ image.can_image_1024_be_zoomed = image.image_1920 and is_image_size_above(
42
+ image.image_1920, image.image_1024
43
+ )
44
+
45
+ @api.depends("video_url")
46
+ def _compute_embed_code(self):
47
+ for image in self:
48
+ image.embed_code = get_video_embed_code(image.video_url) or False
49
+
50
+ @api.onchange("video_url")
51
+ def _onchange_video_url(self):
52
+ if not self.image_1920:
53
+ thumbnail = get_video_thumbnail(self.video_url)
54
+ self.image_1920 = thumbnail and base64.b64encode(thumbnail) or False
55
+
56
+ @api.constrains("video_url")
57
+ def _check_valid_video_url(self):
58
+ for image in self:
59
+ if image.video_url and not image.embed_code:
60
+ raise ValidationError(
61
+ self.env._(
62
+ "Provided video URL for '%s' is not valid. Please enter a "
63
+ "valid video URL.",
64
+ image.name,
65
+ )
66
+ )
@@ -0,0 +1,4 @@
1
+ * `Tecnativa <https://www.tecnativa.com>`_:
2
+
3
+ * Pedro M. Baeza
4
+ * Víctor Martínez
@@ -0,0 +1 @@
1
+ This module adds the ability to define images in a lot (similar to what happens with website_sale in products).
@@ -0,0 +1 @@
1
+ Go to a lot and in the Images tab you can add linked files.
@@ -0,0 +1,3 @@
1
+ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2
+ access_stock_lot_image_user,access_stock_lot_image_user,model_stock_lot_image,base.group_user,1,0,0,0
3
+ access_stock_lot_image_admin,access_stock_lot_image_admin,model_stock_lot_image,stock.group_production_lot,1,1,1,1