odoo14-addon-mrp-production-filter-lot 14.0.1.0.1.dev2__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,100 @@
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
+ MRP production filter lot
7
+ =========================
8
+
9
+ ..
10
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11
+ !! This file is generated by oca-gen-addon-readme !!
12
+ !! changes will be overwritten. !!
13
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
+ !! source digest: sha256:0739128945c69fe6de5545f070272c804e1252e21ef817b4c1e98d7f47b7ca7f
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%2Fmanufacture-lightgray.png?logo=github
24
+ :target: https://github.com/OCA/manufacture/tree/14.0/mrp_production_filter_lot
25
+ :alt: OCA/manufacture
26
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27
+ :target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_production_filter_lot
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/manufacture&target_branch=14.0
31
+ :alt: Try me on Runboat
32
+
33
+ |badge1| |badge2| |badge3| |badge4| |badge5|
34
+
35
+ This module extends the functionality of mrp: during a production the user
36
+ can only select the lots of raw materials available in the production order's "Components Location".
37
+
38
+ This behavior can be disabled using the flag "Use only available lots" in the manufacturing picking type.
39
+
40
+ **Table of contents**
41
+
42
+ .. contents::
43
+ :local:
44
+
45
+ Configuration
46
+ =============
47
+
48
+ In the picking type of production orders, disable or enable "Use only available lots" (enabled by default).
49
+
50
+ Usage
51
+ =====
52
+
53
+ To use this module:
54
+
55
+ #. Produce a production order containing raw materials that are tracked by lots.
56
+ #. In the lots popup of each line you will notice that the lots available
57
+ to select are the lots in the source location of the raw materials that have any availability.
58
+
59
+ Bug Tracker
60
+ ===========
61
+
62
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
63
+ In case of trouble, please check there if your issue has already been reported.
64
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
65
+ `feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_production_filter_lot%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
66
+
67
+ Do not contact contributors directly about support or help with technical issues.
68
+
69
+ Credits
70
+ =======
71
+
72
+ Authors
73
+ ~~~~~~~
74
+
75
+ * Takobi
76
+
77
+ Contributors
78
+ ~~~~~~~~~~~~
79
+
80
+ * Simone Rubino <simone.rubino88@gmail.com> (https://takobi.online)
81
+ * `PyTech <https://www.pytech.it>`_:
82
+
83
+ * Simone Rubino <simone.rubino@pytech.it>
84
+
85
+ Maintainers
86
+ ~~~~~~~~~~~
87
+
88
+ This module is maintained by the OCA.
89
+
90
+ .. image:: https://odoo-community.org/logo.png
91
+ :alt: Odoo Community Association
92
+ :target: https://odoo-community.org
93
+
94
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
95
+ mission is to support the collaborative development of Odoo features and
96
+ promote its widespread use.
97
+
98
+ This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/14.0/mrp_production_filter_lot>`_ project on GitHub.
99
+
100
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1,3 @@
1
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2
+
3
+ from . import models
@@ -0,0 +1,22 @@
1
+ # Copyright 2022 Simone Rubino - Takobi
2
+ # Copyright 2025 Simone Rubino - PyTech
3
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
4
+ {
5
+ "name": "MRP production filter lot",
6
+ "summary": "In production order line lots popup, "
7
+ "filter lots based on their location and availability",
8
+ "version": "14.0.1.0.0",
9
+ "category": "Manufacturing",
10
+ "website": "https://github.com/OCA/manufacture"
11
+ "/tree/14.0/mrp_production_filter_lot",
12
+ "author": "Takobi, " "Odoo Community Association (OCA)",
13
+ "license": "AGPL-3",
14
+ "depends": [
15
+ "mrp",
16
+ "stock_picking_filter_lot",
17
+ ],
18
+ "auto_install": True,
19
+ "data": [
20
+ "views/stock_picking_type_views.xml",
21
+ ],
22
+ }
@@ -0,0 +1,33 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * mrp_production_filter_lot
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 12.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "POT-Creation-Date: 2022-01-01 15:55+0000\n"
10
+ "PO-Revision-Date: 2023-01-09 22:44+0000\n"
11
+ "Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
12
+ "Language-Team: \n"
13
+ "Language: it\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: \n"
17
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
18
+ "X-Generator: Weblate 4.14.1\n"
19
+
20
+ #. module: mrp_production_filter_lot
21
+ #: model:ir.model.fields,help:mrp_production_filter_lot.field_mrp_product_produce_line__production_src_location_id
22
+ msgid "Location where the system will look for components."
23
+ msgstr "Ubicazione dove il sistema cercherà i componenti."
24
+
25
+ #. module: mrp_production_filter_lot
26
+ #: model:ir.model.fields,field_description:mrp_production_filter_lot.field_mrp_product_produce_line__production_src_location_id
27
+ msgid "Production source location"
28
+ msgstr "Ubicazione di origine dell'ordine di produzione"
29
+
30
+ #. module: mrp_production_filter_lot
31
+ #: model:ir.model,name:mrp_production_filter_lot.model_mrp_product_produce_line
32
+ msgid "Record Production Line"
33
+ msgstr "Record delle linee di produzione"
@@ -0,0 +1,39 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * mrp_production_filter_lot
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 14.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: mrp_production_filter_lot
17
+ #: model:ir.model.fields,field_description:mrp_production_filter_lot.field_stock_move_line__display_name
18
+ msgid "Display Name"
19
+ msgstr ""
20
+
21
+ #. module: mrp_production_filter_lot
22
+ #: model:ir.model.fields,field_description:mrp_production_filter_lot.field_stock_move_line__id
23
+ msgid "ID"
24
+ msgstr ""
25
+
26
+ #. module: mrp_production_filter_lot
27
+ #: model:ir.model.fields,field_description:mrp_production_filter_lot.field_stock_move_line____last_update
28
+ msgid "Last Modified on"
29
+ msgstr ""
30
+
31
+ #. module: mrp_production_filter_lot
32
+ #: model:ir.model.fields,field_description:mrp_production_filter_lot.field_stock_move_line__picking_type_use_filter_lots
33
+ msgid "Picking Type Use Filter Lots"
34
+ msgstr ""
35
+
36
+ #. module: mrp_production_filter_lot
37
+ #: model:ir.model,name:mrp_production_filter_lot.model_stock_move_line
38
+ msgid "Product Moves (Stock Move Line)"
39
+ msgstr ""
@@ -0,0 +1,3 @@
1
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2
+
3
+ from . import stock_move_line
@@ -0,0 +1,26 @@
1
+ # Copyright 2025 Simone Rubino - PyTech
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
+
4
+ from odoo import api, fields, models
5
+
6
+
7
+ class StockMoveLine(models.Model):
8
+ _inherit = "stock.move.line"
9
+
10
+ picking_type_use_filter_lots = fields.Boolean(
11
+ compute="_compute_picking_type_use_filter_lots",
12
+ # Disable related field that has been set
13
+ # in the dependency `stock_picking_filter_lot`.
14
+ related=None,
15
+ )
16
+
17
+ @api.depends(
18
+ "picking_id.picking_type_id.use_filter_lots",
19
+ "production_id.picking_type_id.use_filter_lots",
20
+ )
21
+ def _compute_picking_type_use_filter_lots(self):
22
+ for line in self:
23
+ picking_type = (
24
+ line.picking_id.picking_type_id or line.production_id.picking_type_id
25
+ )
26
+ line.picking_type_use_filter_lots = picking_type.use_filter_lots
@@ -0,0 +1 @@
1
+ In the picking type of production orders, disable or enable "Use only available lots" (enabled by default).
@@ -0,0 +1,4 @@
1
+ * Simone Rubino <simone.rubino88@gmail.com> (https://takobi.online)
2
+ * `PyTech <https://www.pytech.it>`_:
3
+
4
+ * Simone Rubino <simone.rubino@pytech.it>
@@ -0,0 +1,4 @@
1
+ This module extends the functionality of mrp: during a production the user
2
+ can only select the lots of raw materials available in the production order's "Components Location".
3
+
4
+ This behavior can be disabled using the flag "Use only available lots" in the manufacturing picking type.
@@ -0,0 +1,5 @@
1
+ To use this module:
2
+
3
+ #. Produce a production order containing raw materials that are tracked by lots.
4
+ #. In the lots popup of each line you will notice that the lots available
5
+ to select are the lots in the source location of the raw materials that have any availability.
@@ -0,0 +1,450 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
+ <title>README.rst</title>
7
+ <style type="text/css">
8
+
9
+ /*
10
+ :Author: David Goodger (goodger@python.org)
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
12
+ :Copyright: This stylesheet has been placed in the public domain.
13
+
14
+ Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
16
+
17
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
18
+ customize this style sheet.
19
+ */
20
+
21
+ /* used to remove borders from tables and images */
22
+ .borderless, table.borderless td, table.borderless th {
23
+ border: 0 }
24
+
25
+ table.borderless td, table.borderless th {
26
+ /* Override padding for "table.docutils td" with "! important".
27
+ The right padding separates the table cells. */
28
+ padding: 0 0.5em 0 0 ! important }
29
+
30
+ .first {
31
+ /* Override more specific margin styles with "! important". */
32
+ margin-top: 0 ! important }
33
+
34
+ .last, .with-subtitle {
35
+ margin-bottom: 0 ! important }
36
+
37
+ .hidden {
38
+ display: none }
39
+
40
+ .subscript {
41
+ vertical-align: sub;
42
+ font-size: smaller }
43
+
44
+ .superscript {
45
+ vertical-align: super;
46
+ font-size: smaller }
47
+
48
+ a.toc-backref {
49
+ text-decoration: none ;
50
+ color: black }
51
+
52
+ blockquote.epigraph {
53
+ margin: 2em 5em ; }
54
+
55
+ dl.docutils dd {
56
+ margin-bottom: 0.5em }
57
+
58
+ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
59
+ overflow: hidden;
60
+ }
61
+
62
+ /* Uncomment (and remove this text!) to get bold-faced definition list terms
63
+ dl.docutils dt {
64
+ font-weight: bold }
65
+ */
66
+
67
+ div.abstract {
68
+ margin: 2em 5em }
69
+
70
+ div.abstract p.topic-title {
71
+ font-weight: bold ;
72
+ text-align: center }
73
+
74
+ div.admonition, div.attention, div.caution, div.danger, div.error,
75
+ div.hint, div.important, div.note, div.tip, div.warning {
76
+ margin: 2em ;
77
+ border: medium outset ;
78
+ padding: 1em }
79
+
80
+ div.admonition p.admonition-title, div.hint p.admonition-title,
81
+ div.important p.admonition-title, div.note p.admonition-title,
82
+ div.tip p.admonition-title {
83
+ font-weight: bold ;
84
+ font-family: sans-serif }
85
+
86
+ div.attention p.admonition-title, div.caution p.admonition-title,
87
+ div.danger p.admonition-title, div.error p.admonition-title,
88
+ div.warning p.admonition-title, .code .error {
89
+ color: red ;
90
+ font-weight: bold ;
91
+ font-family: sans-serif }
92
+
93
+ /* Uncomment (and remove this text!) to get reduced vertical space in
94
+ compound paragraphs.
95
+ div.compound .compound-first, div.compound .compound-middle {
96
+ margin-bottom: 0.5em }
97
+
98
+ div.compound .compound-last, div.compound .compound-middle {
99
+ margin-top: 0.5em }
100
+ */
101
+
102
+ div.dedication {
103
+ margin: 2em 5em ;
104
+ text-align: center ;
105
+ font-style: italic }
106
+
107
+ div.dedication p.topic-title {
108
+ font-weight: bold ;
109
+ font-style: normal }
110
+
111
+ div.figure {
112
+ margin-left: 2em ;
113
+ margin-right: 2em }
114
+
115
+ div.footer, div.header {
116
+ clear: both;
117
+ font-size: smaller }
118
+
119
+ div.line-block {
120
+ display: block ;
121
+ margin-top: 1em ;
122
+ margin-bottom: 1em }
123
+
124
+ div.line-block div.line-block {
125
+ margin-top: 0 ;
126
+ margin-bottom: 0 ;
127
+ margin-left: 1.5em }
128
+
129
+ div.sidebar {
130
+ margin: 0 0 0.5em 1em ;
131
+ border: medium outset ;
132
+ padding: 1em ;
133
+ background-color: #ffffee ;
134
+ width: 40% ;
135
+ float: right ;
136
+ clear: right }
137
+
138
+ div.sidebar p.rubric {
139
+ font-family: sans-serif ;
140
+ font-size: medium }
141
+
142
+ div.system-messages {
143
+ margin: 5em }
144
+
145
+ div.system-messages h1 {
146
+ color: red }
147
+
148
+ div.system-message {
149
+ border: medium outset ;
150
+ padding: 1em }
151
+
152
+ div.system-message p.system-message-title {
153
+ color: red ;
154
+ font-weight: bold }
155
+
156
+ div.topic {
157
+ margin: 2em }
158
+
159
+ h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
160
+ h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
161
+ margin-top: 0.4em }
162
+
163
+ h1.title {
164
+ text-align: center }
165
+
166
+ h2.subtitle {
167
+ text-align: center }
168
+
169
+ hr.docutils {
170
+ width: 75% }
171
+
172
+ img.align-left, .figure.align-left, object.align-left, table.align-left {
173
+ clear: left ;
174
+ float: left ;
175
+ margin-right: 1em }
176
+
177
+ img.align-right, .figure.align-right, object.align-right, table.align-right {
178
+ clear: right ;
179
+ float: right ;
180
+ margin-left: 1em }
181
+
182
+ img.align-center, .figure.align-center, object.align-center {
183
+ display: block;
184
+ margin-left: auto;
185
+ margin-right: auto;
186
+ }
187
+
188
+ table.align-center {
189
+ margin-left: auto;
190
+ margin-right: auto;
191
+ }
192
+
193
+ .align-left {
194
+ text-align: left }
195
+
196
+ .align-center {
197
+ clear: both ;
198
+ text-align: center }
199
+
200
+ .align-right {
201
+ text-align: right }
202
+
203
+ /* reset inner alignment in figures */
204
+ div.align-right {
205
+ text-align: inherit }
206
+
207
+ /* div.align-center * { */
208
+ /* text-align: left } */
209
+
210
+ .align-top {
211
+ vertical-align: top }
212
+
213
+ .align-middle {
214
+ vertical-align: middle }
215
+
216
+ .align-bottom {
217
+ vertical-align: bottom }
218
+
219
+ ol.simple, ul.simple {
220
+ margin-bottom: 1em }
221
+
222
+ ol.arabic {
223
+ list-style: decimal }
224
+
225
+ ol.loweralpha {
226
+ list-style: lower-alpha }
227
+
228
+ ol.upperalpha {
229
+ list-style: upper-alpha }
230
+
231
+ ol.lowerroman {
232
+ list-style: lower-roman }
233
+
234
+ ol.upperroman {
235
+ list-style: upper-roman }
236
+
237
+ p.attribution {
238
+ text-align: right ;
239
+ margin-left: 50% }
240
+
241
+ p.caption {
242
+ font-style: italic }
243
+
244
+ p.credits {
245
+ font-style: italic ;
246
+ font-size: smaller }
247
+
248
+ p.label {
249
+ white-space: nowrap }
250
+
251
+ p.rubric {
252
+ font-weight: bold ;
253
+ font-size: larger ;
254
+ color: maroon ;
255
+ text-align: center }
256
+
257
+ p.sidebar-title {
258
+ font-family: sans-serif ;
259
+ font-weight: bold ;
260
+ font-size: larger }
261
+
262
+ p.sidebar-subtitle {
263
+ font-family: sans-serif ;
264
+ font-weight: bold }
265
+
266
+ p.topic-title {
267
+ font-weight: bold }
268
+
269
+ pre.address {
270
+ margin-bottom: 0 ;
271
+ margin-top: 0 ;
272
+ font: inherit }
273
+
274
+ pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
+ margin-left: 2em ;
276
+ margin-right: 2em }
277
+
278
+ pre.code .ln { color: gray; } /* line numbers */
279
+ pre.code, code { background-color: #eeeeee }
280
+ pre.code .comment, code .comment { color: #5C6576 }
281
+ pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
282
+ pre.code .literal.string, code .literal.string { color: #0C5404 }
283
+ pre.code .name.builtin, code .name.builtin { color: #352B84 }
284
+ pre.code .deleted, code .deleted { background-color: #DEB0A1}
285
+ pre.code .inserted, code .inserted { background-color: #A3D289}
286
+
287
+ span.classifier {
288
+ font-family: sans-serif ;
289
+ font-style: oblique }
290
+
291
+ span.classifier-delimiter {
292
+ font-family: sans-serif ;
293
+ font-weight: bold }
294
+
295
+ span.interpreted {
296
+ font-family: sans-serif }
297
+
298
+ span.option {
299
+ white-space: nowrap }
300
+
301
+ span.pre {
302
+ white-space: pre }
303
+
304
+ span.problematic, pre.problematic {
305
+ color: red }
306
+
307
+ span.section-subtitle {
308
+ /* font-size relative to parent (h1..h6 element) */
309
+ font-size: 80% }
310
+
311
+ table.citation {
312
+ border-left: solid 1px gray;
313
+ margin-left: 1px }
314
+
315
+ table.docinfo {
316
+ margin: 2em 4em }
317
+
318
+ table.docutils {
319
+ margin-top: 0.5em ;
320
+ margin-bottom: 0.5em }
321
+
322
+ table.footnote {
323
+ border-left: solid 1px black;
324
+ margin-left: 1px }
325
+
326
+ table.docutils td, table.docutils th,
327
+ table.docinfo td, table.docinfo th {
328
+ padding-left: 0.5em ;
329
+ padding-right: 0.5em ;
330
+ vertical-align: top }
331
+
332
+ table.docutils th.field-name, table.docinfo th.docinfo-name {
333
+ font-weight: bold ;
334
+ text-align: left ;
335
+ white-space: nowrap ;
336
+ padding-left: 0 }
337
+
338
+ /* "booktabs" style (no vertical lines) */
339
+ table.docutils.booktabs {
340
+ border: 0px;
341
+ border-top: 2px solid;
342
+ border-bottom: 2px solid;
343
+ border-collapse: collapse;
344
+ }
345
+ table.docutils.booktabs * {
346
+ border: 0px;
347
+ }
348
+ table.docutils.booktabs th {
349
+ border-bottom: thin solid;
350
+ text-align: left;
351
+ }
352
+
353
+ h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
354
+ h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
355
+ font-size: 100% }
356
+
357
+ ul.auto-toc {
358
+ list-style-type: none }
359
+
360
+ </style>
361
+ </head>
362
+ <body>
363
+ <div class="document">
364
+
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="mrp-production-filter-lot">
370
+ <h1>MRP production filter lot</h1>
371
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372
+ !! This file is generated by oca-gen-addon-readme !!
373
+ !! changes will be overwritten. !!
374
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
+ !! source digest: sha256:0739128945c69fe6de5545f070272c804e1252e21ef817b4c1e98d7f47b7ca7f
376
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/manufacture/tree/14.0/mrp_production_filter_lot"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_production_filter_lot"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/manufacture&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
+ <p>This module extends the functionality of mrp: during a production the user
379
+ can only select the lots of raw materials available in the production order’s “Components Location”.</p>
380
+ <p>This behavior can be disabled using the flag “Use only available lots” in the manufacturing picking type.</p>
381
+ <p><strong>Table of contents</strong></p>
382
+ <div class="contents local topic" id="contents">
383
+ <ul class="simple">
384
+ <li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
385
+ <li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
386
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
387
+ <li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
388
+ <li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
389
+ <li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
390
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
391
+ </ul>
392
+ </li>
393
+ </ul>
394
+ </div>
395
+ <div class="section" id="configuration">
396
+ <h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
397
+ <p>In the picking type of production orders, disable or enable “Use only available lots” (enabled by default).</p>
398
+ </div>
399
+ <div class="section" id="usage">
400
+ <h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
401
+ <p>To use this module:</p>
402
+ <ol class="arabic simple">
403
+ <li>Produce a production order containing raw materials that are tracked by lots.</li>
404
+ <li>In the lots popup of each line you will notice that the lots available
405
+ to select are the lots in the source location of the raw materials that have any availability.</li>
406
+ </ol>
407
+ </div>
408
+ <div class="section" id="bug-tracker">
409
+ <h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
410
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture/issues">GitHub Issues</a>.
411
+ In case of trouble, please check there if your issue has already been reported.
412
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
413
+ <a class="reference external" href="https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_production_filter_lot%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
414
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
415
+ </div>
416
+ <div class="section" id="credits">
417
+ <h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
418
+ <div class="section" id="authors">
419
+ <h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
420
+ <ul class="simple">
421
+ <li>Takobi</li>
422
+ </ul>
423
+ </div>
424
+ <div class="section" id="contributors">
425
+ <h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
426
+ <ul class="simple">
427
+ <li>Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino88&#64;gmail.com">simone.rubino88&#64;gmail.com</a>&gt; (<a class="reference external" href="https://takobi.online">https://takobi.online</a>)</li>
428
+ <li><a class="reference external" href="https://www.pytech.it">PyTech</a>:<ul>
429
+ <li>Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino&#64;pytech.it">simone.rubino&#64;pytech.it</a>&gt;</li>
430
+ </ul>
431
+ </li>
432
+ </ul>
433
+ </div>
434
+ <div class="section" id="maintainers">
435
+ <h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
436
+ <p>This module is maintained by the OCA.</p>
437
+ <a class="reference external image-reference" href="https://odoo-community.org">
438
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
439
+ </a>
440
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
441
+ mission is to support the collaborative development of Odoo features and
442
+ promote its widespread use.</p>
443
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/14.0/mrp_production_filter_lot">OCA/manufacture</a> project on GitHub.</p>
444
+ <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
445
+ </div>
446
+ </div>
447
+ </div>
448
+ </div>
449
+ </body>
450
+ </html>
@@ -0,0 +1,3 @@
1
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2
+
3
+ from . import test_production
@@ -0,0 +1,150 @@
1
+ # Copyright 2025 Simone Rubino - PyTech
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
+
4
+ from odoo import tests
5
+ from odoo.tools.safe_eval import safe_eval
6
+
7
+ from odoo.addons.mrp.tests.common import TestMrpCommon
8
+
9
+
10
+ @tests.tagged("post_install", "-at_install")
11
+ class TestProduction(TestMrpCommon):
12
+ @classmethod
13
+ def setUpClass(cls):
14
+ super().setUpClass()
15
+ cls.stock_location = cls.env.ref("stock.stock_location_stock")
16
+ cls.other_stock_location = cls.stock_location.copy(
17
+ default={
18
+ "name": "Test other stock",
19
+ },
20
+ )
21
+ cls.product, cls.component = cls.env["product.product"].create(
22
+ [
23
+ {
24
+ "name": "Test Product",
25
+ },
26
+ {
27
+ "name": "Test Component",
28
+ "tracking": "lot",
29
+ "type": "product",
30
+ },
31
+ ]
32
+ )
33
+ cls.component_stock_lot, cls.component_other_stock_lot = cls.env[
34
+ "stock.production.lot"
35
+ ].create(
36
+ [
37
+ {
38
+ "name": "Test Lot in Stock",
39
+ "product_id": cls.component.id,
40
+ },
41
+ {
42
+ "name": "Test Lot in Other Stock",
43
+ "product_id": cls.component.id,
44
+ },
45
+ ]
46
+ )
47
+ cls.env["stock.quant"]._update_available_quantity(
48
+ cls.component,
49
+ cls.stock_location,
50
+ 100,
51
+ lot_id=cls.component_stock_lot,
52
+ )
53
+ cls.env["stock.quant"]._update_available_quantity(
54
+ cls.component,
55
+ cls.other_stock_location,
56
+ 100,
57
+ lot_id=cls.component_other_stock_lot,
58
+ )
59
+
60
+ production_form = tests.Form(cls.env["mrp.production"])
61
+ production_form.product_id = cls.product
62
+ production_form.bom_id = cls.make_bom(cls.product, cls.component)
63
+ cls.production = production_form.save()
64
+ cls.production.action_confirm()
65
+ cls.production.action_assign()
66
+
67
+ @classmethod
68
+ def _get_lots_domain(cls, move_line):
69
+ """Get the domain for lots in `move_line`."""
70
+ move = move_line.move_id
71
+ move_line_index = move.move_line_ids.ids.index(move_line.id)
72
+ with tests.Form(
73
+ move, view="stock.view_stock_move_operations"
74
+ ) as move_form, move_form.move_line_ids.edit(move_line_index) as move_line_form:
75
+ lot_field = move_line_form._view["tree"].xpath("//field[@name='lot_id']")[0]
76
+ lot_domain_str = lot_field.get("domain")
77
+ return safe_eval(
78
+ lot_domain_str,
79
+ globals_dict=move_line_form._proxy._records[0],
80
+ nocopy=True,
81
+ )
82
+
83
+ def test_raw_filter_lot(self):
84
+ """
85
+ When "Use only available lots" is enabled
86
+ in the production's picking type,
87
+ the domain for the lot in raw move line
88
+ only allows to select lots in the Components Location.
89
+ """
90
+ # Arrange
91
+ production = self.production
92
+ raw_location = production.location_src_id
93
+ raw_location_lot = self.component_stock_lot
94
+ no_raw_location_lot = self.component_other_stock_lot
95
+ raw_move_line = production.move_raw_ids.move_line_ids
96
+ # pre-condition
97
+ self.assertTrue(production.picking_type_id.use_filter_lots)
98
+ self.assertRecordValues(
99
+ raw_move_line,
100
+ [
101
+ {
102
+ "picking_type_use_filter_lots": True,
103
+ },
104
+ ],
105
+ )
106
+ self.assertEqual(raw_location_lot.product_id, raw_move_line.product_id)
107
+ self.assertEqual(raw_location_lot.quant_ids.location_id, raw_location)
108
+ self.assertEqual(no_raw_location_lot.product_id, raw_move_line.product_id)
109
+ self.assertNotEqual(no_raw_location_lot.quant_ids.location_id, raw_location)
110
+
111
+ # Assert
112
+ lot_domain = self._get_lots_domain(raw_move_line)
113
+ available_lots = self.env["stock.production.lot"].search(lot_domain)
114
+ self.assertIn(self.component_stock_lot, available_lots)
115
+ self.assertNotIn(self.component_other_stock_lot, available_lots)
116
+
117
+ def test_raw_no_filter_lot(self):
118
+ """
119
+ When "Use only available lots" is disabled
120
+ in the production's picking type,
121
+ the domain for the lot in raw move line
122
+ allows to select any lot.
123
+ """
124
+ # Arrange
125
+ production = self.production
126
+ production.picking_type_id.use_filter_lots = False
127
+ raw_location = production.location_src_id
128
+ raw_location_lot = self.component_stock_lot
129
+ no_raw_location_lot = self.component_other_stock_lot
130
+ raw_move_line = production.move_raw_ids.move_line_ids
131
+ # pre-condition
132
+ self.assertFalse(production.picking_type_id.use_filter_lots)
133
+ self.assertRecordValues(
134
+ raw_move_line,
135
+ [
136
+ {
137
+ "picking_type_use_filter_lots": False,
138
+ },
139
+ ],
140
+ )
141
+ self.assertEqual(raw_location_lot.product_id, raw_move_line.product_id)
142
+ self.assertEqual(raw_location_lot.quant_ids.location_id, raw_location)
143
+ self.assertEqual(no_raw_location_lot.product_id, raw_move_line.product_id)
144
+ self.assertNotEqual(no_raw_location_lot.quant_ids.location_id, raw_location)
145
+
146
+ # Assert
147
+ lot_domain = self._get_lots_domain(raw_move_line)
148
+ available_lots = self.env["stock.production.lot"].search(lot_domain)
149
+ self.assertIn(self.component_stock_lot, available_lots)
150
+ self.assertIn(self.component_other_stock_lot, available_lots)
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!--
3
+ ~ Copyright 2025 Simone Rubino - PyTech
4
+ ~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
5
+ -->
6
+ <odoo>
7
+ <record id="view_picking_type_form_inherit_mrp" model="ir.ui.view">
8
+ <field name="name">Show lot filter in MO picking type</field>
9
+ <field name="model">stock.picking.type</field>
10
+ <field name="inherit_id" ref="mrp.view_picking_type_form_inherit_mrp" />
11
+ <field name="arch" type="xml">
12
+ <field name="use_create_components_lots" position="after">
13
+ <field name="use_filter_lots" />
14
+ </field>
15
+ </field>
16
+ </record>
17
+ </odoo>
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.1
2
+ Name: odoo14-addon-mrp_production_filter_lot
3
+ Version: 14.0.1.0.1.dev2
4
+ Summary: In production order line lots popup, filter lots based on their location and availability
5
+ Home-page: https://github.com/OCA/manufacture/tree/14.0/mrp_production_filter_lot
6
+ Author: Takobi, Odoo Community Association (OCA)
7
+ Author-email: support@odoo-community.org
8
+ License: AGPL-3
9
+ Classifier: Programming Language :: Python
10
+ Classifier: Framework :: Odoo
11
+ Classifier: Framework :: Odoo :: 14.0
12
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
13
+ Requires-Python: >=3.6
14
+ Requires-Dist: odoo14-addon-stock-picking-filter-lot
15
+ Requires-Dist: odoo<14.1dev,>=14.0a
16
+
17
+ .. image:: https://odoo-community.org/readme-banner-image
18
+ :target: https://odoo-community.org/get-involved?utm_source=readme
19
+ :alt: Odoo Community Association
20
+
21
+ =========================
22
+ MRP production filter lot
23
+ =========================
24
+
25
+ ..
26
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
+ !! This file is generated by oca-gen-addon-readme !!
28
+ !! changes will be overwritten. !!
29
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
+ !! source digest: sha256:0739128945c69fe6de5545f070272c804e1252e21ef817b4c1e98d7f47b7ca7f
31
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32
+
33
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
34
+ :target: https://odoo-community.org/page/development-status
35
+ :alt: Beta
36
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
37
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
38
+ :alt: License: AGPL-3
39
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
40
+ :target: https://github.com/OCA/manufacture/tree/14.0/mrp_production_filter_lot
41
+ :alt: OCA/manufacture
42
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
43
+ :target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_production_filter_lot
44
+ :alt: Translate me on Weblate
45
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
46
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=14.0
47
+ :alt: Try me on Runboat
48
+
49
+ |badge1| |badge2| |badge3| |badge4| |badge5|
50
+
51
+ This module extends the functionality of mrp: during a production the user
52
+ can only select the lots of raw materials available in the production order's "Components Location".
53
+
54
+ This behavior can be disabled using the flag "Use only available lots" in the manufacturing picking type.
55
+
56
+ **Table of contents**
57
+
58
+ .. contents::
59
+ :local:
60
+
61
+ Configuration
62
+ =============
63
+
64
+ In the picking type of production orders, disable or enable "Use only available lots" (enabled by default).
65
+
66
+ Usage
67
+ =====
68
+
69
+ To use this module:
70
+
71
+ #. Produce a production order containing raw materials that are tracked by lots.
72
+ #. In the lots popup of each line you will notice that the lots available
73
+ to select are the lots in the source location of the raw materials that have any availability.
74
+
75
+ Bug Tracker
76
+ ===========
77
+
78
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
79
+ In case of trouble, please check there if your issue has already been reported.
80
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
81
+ `feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_production_filter_lot%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
82
+
83
+ Do not contact contributors directly about support or help with technical issues.
84
+
85
+ Credits
86
+ =======
87
+
88
+ Authors
89
+ ~~~~~~~
90
+
91
+ * Takobi
92
+
93
+ Contributors
94
+ ~~~~~~~~~~~~
95
+
96
+ * Simone Rubino <simone.rubino88@gmail.com> (https://takobi.online)
97
+ * `PyTech <https://www.pytech.it>`_:
98
+
99
+ * Simone Rubino <simone.rubino@pytech.it>
100
+
101
+ Maintainers
102
+ ~~~~~~~~~~~
103
+
104
+ This module is maintained by the OCA.
105
+
106
+ .. image:: https://odoo-community.org/logo.png
107
+ :alt: Odoo Community Association
108
+ :target: https://odoo-community.org
109
+
110
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
111
+ mission is to support the collaborative development of Odoo features and
112
+ promote its widespread use.
113
+
114
+ This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/14.0/mrp_production_filter_lot>`_ project on GitHub.
115
+
116
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1,20 @@
1
+ odoo/addons/mrp_production_filter_lot/README.rst,sha256=Kb7E9G7--WQaOjIjkAdVRR0IQONZq1WEiG7k4jaNWjU,3792
2
+ odoo/addons/mrp_production_filter_lot/__init__.py,sha256=Vy7u65fus3WfU5OkSe5piYt3Li69VlAoj9RFIfvxm3Y,88
3
+ odoo/addons/mrp_production_filter_lot/__manifest__.py,sha256=MHOsLR2MEcJ1eYN_XD7Zl-nyQi6J3Z_g_5Rhq2L9El4,720
4
+ odoo/addons/mrp_production_filter_lot/i18n/it.po,sha256=HOa4K3CRHDBZFbI3O4cYAFUxiLISX8k29HN-E4WAYfo,1294
5
+ odoo/addons/mrp_production_filter_lot/i18n/mrp_production_filter_lot.pot,sha256=Iiiy66tKAOygC5DNjkPSkkzp9gnFGYqeZMk9dSmSJ3I,1244
6
+ odoo/addons/mrp_production_filter_lot/models/__init__.py,sha256=Rf0Bf1LhfrTZtwAFjfQ6zTVNlj_RBsM9nnA5Keq1ZUs,97
7
+ odoo/addons/mrp_production_filter_lot/models/stock_move_line.py,sha256=D_Hh9lCsMwZnKk-g0q2IiyCswItWEJ-LzABqAGDMHjw,877
8
+ odoo/addons/mrp_production_filter_lot/readme/CONFIGURE.rst,sha256=SvRWY14YiqMX1A5O3FbvcQ34hbB3tx3dukuX01LP8OA,108
9
+ odoo/addons/mrp_production_filter_lot/readme/CONTRIBUTORS.rst,sha256=rDHVXOCM3xiVQa6qBf8uWrOnm7RDh02nC7AokJg6RiM,150
10
+ odoo/addons/mrp_production_filter_lot/readme/DESCRIPTION.rst,sha256=oM2UcX7c0VDxp_pZEa4fOJkCgdiYnxwpujHdGI2H6wc,283
11
+ odoo/addons/mrp_production_filter_lot/readme/USAGE.rst,sha256=F96DwAHMWmXoplHb1ZRzLS-VC9ZsnOV1TcmRSdRPh50,274
12
+ odoo/addons/mrp_production_filter_lot/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
13
+ odoo/addons/mrp_production_filter_lot/static/description/index.html,sha256=74YJP4SQ9ehuYuZ1eYZbh-9wTYrmKCX2QVojUnWnyAE,13788
14
+ odoo/addons/mrp_production_filter_lot/tests/__init__.py,sha256=ct5EwSzFSK3hKBNUeynIWHUG4Ca03irvAs6rTBuL4i4,96
15
+ odoo/addons/mrp_production_filter_lot/tests/test_production.py,sha256=oQhpe-WXOBur8NAS2ELyW5JtocpADsctUrmRFVhXXCA,5733
16
+ odoo/addons/mrp_production_filter_lot/views/stock_picking_type_views.xml,sha256=MGjKk1Y2HjF2lImrqXMA0oY2JIwJr53HOzwk0j0Jb0o,666
17
+ odoo14_addon_mrp_production_filter_lot-14.0.1.0.1.dev2.dist-info/METADATA,sha256=LEnHqblIojM-zVSxZDi5LhwqEVFq3cz9YdL4n_vdDH8,4471
18
+ odoo14_addon_mrp_production_filter_lot-14.0.1.0.1.dev2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
19
+ odoo14_addon_mrp_production_filter_lot-14.0.1.0.1.dev2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
20
+ odoo14_addon_mrp_production_filter_lot-14.0.1.0.1.dev2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.45.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+