odoo-addon-quality-control-stock-oca 17.0.1.0.0.4__py3-none-any.whl → 17.0.2.0.0__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.
@@ -7,7 +7,7 @@ Quality control - Stock (OCA)
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:31c16627e1481520c4344b7a1508339c42a78253daed82ecb3febaf214a1d52d
10
+ !! source digest: sha256:7e72a7187f36cb3dbc96e453e18edc8849de5c944dc57874ba5488d6a0c91915
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -38,10 +38,21 @@ It also adds some shortcuts on picking and lots to these inspections.
38
38
  .. contents::
39
39
  :local:
40
40
 
41
+ Configuration
42
+ =============
43
+
44
+ To create a quality inspection for each lot/serial number used in a
45
+ stock move you need to:
46
+
47
+ - Go to Quality Control> Configuration > Triggers.
48
+ - Activate the "Inspection Per Lot" option in those triggers which need
49
+ to force a different inspection for each lot/serial number used in a
50
+ stock picking.
51
+
41
52
  Known issues / Roadmap
42
53
  ======================
43
54
 
44
- - Put trigger in all languages.
55
+ - Put trigger in all languages.
45
56
 
46
57
  Bug Tracker
47
58
  ===========
@@ -66,19 +77,23 @@ Authors
66
77
  Contributors
67
78
  ------------
68
79
 
69
- - Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
70
- - Simone Rubino <simone.rubino@agilebg.com>
71
- - Andrii Skrypka <andrijskrypa@ukr.net>
72
- - Ignacio José Alés <ignacio.ales@guadaltech.es>
73
- - Pimolnat Suntian <pimolnats@ecosoft.co.th>
74
- - `Tecnativa <https://www.tecnativa.com>`__:
80
+ - Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
81
+ - Simone Rubino <simone.rubino@agilebg.com>
82
+ - Andrii Skrypka <andrijskrypa@ukr.net>
83
+ - Ignacio José Alés <ignacio.ales@guadaltech.es>
84
+ - Pimolnat Suntian <pimolnats@ecosoft.co.th>
85
+ - `Tecnativa <https://www.tecnativa.com>`__:
86
+
87
+ - Pedro M. Baeza
88
+ - Carlos Roca
89
+
90
+ - `APSL-Nagarro <https://www.apsl.tech>`__:
75
91
 
76
- - Pedro M. Baeza
77
- - Carlos Roca
92
+ - Antoni Marroig <amarroig@apsl.net>
78
93
 
79
- - `APSL-Nagarro <https://www.apsl.tech>`__:
94
+ - `Sygel <https://www.sygel.es>`__:
80
95
 
81
- - Antoni Marroig <amarroig@apsl.net>
96
+ - Manuel Regidor <manuel.regidor@sygel.es>
82
97
 
83
98
  Maintainers
84
99
  -----------
@@ -5,7 +5,7 @@
5
5
 
6
6
  {
7
7
  "name": "Quality control - Stock (OCA)",
8
- "version": "17.0.1.0.0",
8
+ "version": "17.0.2.0.0",
9
9
  "category": "Quality control",
10
10
  "license": "AGPL-3",
11
11
  "author": "Tecnativa, AvanzOSC, "
@@ -13,7 +13,7 @@ msgstr ""
13
13
  "Project-Id-Version: manufacture (8.0)\n"
14
14
  "Report-Msgid-Bugs-To: \n"
15
15
  "POT-Creation-Date: 2021-02-22 07:24+0000\n"
16
- "PO-Revision-Date: 2024-08-22 11:06+0000\n"
16
+ "PO-Revision-Date: 2024-10-17 09:06+0000\n"
17
17
  "Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
18
18
  "Language-Team: Italian (http://www.transifex.com/oca/OCA-manufacture-8-0/"
19
19
  "language/it/)\n"
@@ -94,7 +94,7 @@ msgstr "Tipo prelievo"
94
94
  #. module: quality_control_stock_oca
95
95
  #: model:ir.model,name:quality_control_stock_oca.model_qc_inspection
96
96
  msgid "Quality control inspection"
97
- msgstr "Ispezione controllo di qualità"
97
+ msgstr "Ispezione controllo qualità"
98
98
 
99
99
  #. module: quality_control_stock_oca
100
100
  #: model:ir.model,name:quality_control_stock_oca.model_qc_inspection_line
@@ -25,6 +25,18 @@ msgstr ""
25
25
  msgid "Done inspections"
26
26
  msgstr ""
27
27
 
28
+ #. module: quality_control_stock_oca
29
+ #: model:ir.model.fields,help:quality_control_stock_oca.field_qc_trigger__inspection_per_lot
30
+ msgid ""
31
+ "If checked, an inspection per used lot/serial number will be created in "
32
+ "stock pickings."
33
+ msgstr ""
34
+
35
+ #. module: quality_control_stock_oca
36
+ #: model:ir.model.fields,field_description:quality_control_stock_oca.field_qc_trigger__inspection_per_lot
37
+ msgid "Inspection Per Lot"
38
+ msgstr ""
39
+
28
40
  #. module: quality_control_stock_oca
29
41
  #: model:ir.model.fields,field_description:quality_control_stock_oca.field_stock_lot__qc_inspections_ids
30
42
  #: model:ir.model.fields,field_description:quality_control_stock_oca.field_stock_picking__qc_inspections_ids
@@ -47,8 +47,7 @@ class QcInspection(models.Model):
47
47
  if inspection.object_id._name == "stock.move":
48
48
  inspection.lot_id = first(
49
49
  move_lines.filtered(
50
- lambda x, inspection=inspection: x.move_id
51
- == inspection.object_id
50
+ lambda x, ins=inspection: x.move_id == ins.object_id
52
51
  )
53
52
  ).lot_id
54
53
  elif inspection.object_id._name == "stock.lot":
@@ -11,3 +11,7 @@ class QcTrigger(models.Model):
11
11
  picking_type_id = fields.Many2one(
12
12
  comodel_name="stock.picking.type", ondelete="cascade"
13
13
  )
14
+ inspection_per_lot = fields.Boolean(
15
+ help="If checked, an inspection per used lot/serial number "
16
+ "will be created in stock pickings."
17
+ )
@@ -80,5 +80,20 @@ class StockPicking(models.Model):
80
80
  )
81
81
  )
82
82
  for trigger_line in _filter_trigger_lines(trigger_lines):
83
- inspection_model._make_inspection(operation, trigger_line)
83
+ inspection = inspection_model._make_inspection(operation, trigger_line)
84
+ if operation.product_id.tracking != "none":
85
+ move_line = operation.move_line_ids[0]
86
+ if trigger_line.trigger.inspection_per_lot:
87
+ move_lines = operation.move_line_ids
88
+ for move_line in move_lines:
89
+ inspection.write(
90
+ {
91
+ "lot_id": move_line.lot_id and move_line.lot_id.id,
92
+ "qty": move_line.quantity,
93
+ }
94
+ )
95
+ if move_line != move_lines[-1]:
96
+ inspection = inspection.copy()
97
+ inspection.set_test(trigger_line)
98
+ inspection.action_todo()
84
99
  return res
@@ -0,0 +1,8 @@
1
+ To create a quality inspection for each lot/serial number used in a stock
2
+ move you need to:
3
+
4
+ - Go to Quality Control> Configuration > Triggers.
5
+ - Activate the "Inspection Per Lot" option in those triggers which need
6
+ to force a different inspection for each lot/serial number used in a
7
+ stock picking.
8
+
@@ -7,4 +7,6 @@
7
7
  - Pedro M. Baeza
8
8
  - Carlos Roca
9
9
  - [APSL-Nagarro](https://www.apsl.tech):
10
- - Antoni Marroig \<<amarroig@apsl.net>\>
10
+ - Antoni Marroig \<<amarroig@apsl.net>\>
11
+ - [Sygel](https://www.sygel.es):
12
+ - Manuel Regidor \<<manuel.regidor@sygel.es>\>
@@ -8,10 +8,11 @@
8
8
 
9
9
  /*
10
10
  :Author: David Goodger (goodger@python.org)
11
- :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
12
12
  :Copyright: This stylesheet has been placed in the public domain.
13
13
 
14
14
  Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
15
16
 
16
17
  See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
17
18
  customize this style sheet.
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
274
275
  margin-left: 2em ;
275
276
  margin-right: 2em }
276
277
 
277
- pre.code .ln { color: grey; } /* line numbers */
278
+ pre.code .ln { color: gray; } /* line numbers */
278
279
  pre.code, code { background-color: #eeeeee }
279
280
  pre.code .comment, code .comment { color: #5C6576 }
280
281
  pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@ span.option {
300
301
  span.pre {
301
302
  white-space: pre }
302
303
 
303
- span.problematic {
304
+ span.problematic, pre.problematic {
304
305
  color: red }
305
306
 
306
307
  span.section-subtitle {
@@ -366,7 +367,7 @@ ul.auto-toc {
366
367
  !! This file is generated by oca-gen-addon-readme !!
367
368
  !! changes will be overwritten. !!
368
369
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369
- !! source digest: sha256:31c16627e1481520c4344b7a1508339c42a78253daed82ecb3febaf214a1d52d
370
+ !! source digest: sha256:7e72a7187f36cb3dbc96e453e18edc8849de5c944dc57874ba5488d6a0c91915
370
371
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371
372
  <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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/manufacture/tree/17.0/quality_control_stock_oca"><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-17-0/manufacture-17-0-quality_control_stock_oca"><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=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372
373
  <p>This module defines triggers that creates inspections when stock moves
@@ -375,24 +376,36 @@ are done.</p>
375
376
  <p><strong>Table of contents</strong></p>
376
377
  <div class="contents local topic" id="contents">
377
378
  <ul class="simple">
378
- <li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-1">Known issues / Roadmap</a></li>
379
- <li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
380
- <li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
381
- <li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
382
- <li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
383
- <li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
379
+ <li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
380
+ <li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
381
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
382
+ <li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
383
+ <li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
384
+ <li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
385
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
384
386
  </ul>
385
387
  </li>
386
388
  </ul>
387
389
  </div>
390
+ <div class="section" id="configuration">
391
+ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
392
+ <p>To create a quality inspection for each lot/serial number used in a
393
+ stock move you need to:</p>
394
+ <ul class="simple">
395
+ <li>Go to Quality Control&gt; Configuration &gt; Triggers.</li>
396
+ <li>Activate the “Inspection Per Lot” option in those triggers which need
397
+ to force a different inspection for each lot/serial number used in a
398
+ stock picking.</li>
399
+ </ul>
400
+ </div>
388
401
  <div class="section" id="known-issues-roadmap">
389
- <h1><a class="toc-backref" href="#toc-entry-1">Known issues / Roadmap</a></h1>
402
+ <h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
390
403
  <ul class="simple">
391
404
  <li>Put trigger in all languages.</li>
392
405
  </ul>
393
406
  </div>
394
407
  <div class="section" id="bug-tracker">
395
- <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
408
+ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
396
409
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture/issues">GitHub Issues</a>.
397
410
  In case of trouble, please check there if your issue has already been reported.
398
411
  If you spotted it first, help us to smash it by providing a detailed and welcomed
@@ -400,9 +413,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
400
413
  <p>Do not contact contributors directly about support or help with technical issues.</p>
401
414
  </div>
402
415
  <div class="section" id="credits">
403
- <h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
416
+ <h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
404
417
  <div class="section" id="authors">
405
- <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
418
+ <h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
406
419
  <ul class="simple">
407
420
  <li>Tecnativa</li>
408
421
  <li>AvanzOSC</li>
@@ -410,7 +423,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
410
423
  </ul>
411
424
  </div>
412
425
  <div class="section" id="contributors">
413
- <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
426
+ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
414
427
  <ul class="simple">
415
428
  <li>Oihane Crucelaegui &lt;<a class="reference external" href="mailto:oihanecrucelaegi&#64;avanzosc.es">oihanecrucelaegi&#64;avanzosc.es</a>&gt;</li>
416
429
  <li>Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino&#64;agilebg.com">simone.rubino&#64;agilebg.com</a>&gt;</li>
@@ -426,12 +439,18 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
426
439
  <li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
427
440
  </ul>
428
441
  </li>
442
+ <li><a class="reference external" href="https://www.sygel.es">Sygel</a>:<ul>
443
+ <li>Manuel Regidor &lt;<a class="reference external" href="mailto:manuel.regidor&#64;sygel.es">manuel.regidor&#64;sygel.es</a>&gt;</li>
444
+ </ul>
445
+ </li>
429
446
  </ul>
430
447
  </div>
431
448
  <div class="section" id="maintainers">
432
- <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
449
+ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
433
450
  <p>This module is maintained by the OCA.</p>
434
- <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
451
+ <a class="reference external image-reference" href="https://odoo-community.org">
452
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
453
+ </a>
435
454
  <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
436
455
  mission is to support the collaborative development of Odoo features and
437
456
  promote its widespread use.</p>
@@ -23,9 +23,15 @@ class TestQualityControlStockOca(TestQualityControlOcaBase):
23
23
  cls.trigger = cls.qc_trigger_model.search(
24
24
  [("picking_type_id", "=", cls.picking_type.id)]
25
25
  )
26
- cls.lot = cls.env["stock.lot"].create(
26
+ cls.lot1 = cls.env["stock.lot"].create(
27
27
  {
28
- "name": "Lot for tests",
28
+ "name": "Lot for tests-1",
29
+ "product_id": cls.product.id,
30
+ }
31
+ )
32
+ cls.lot2 = cls.env["stock.lot"].create(
33
+ {
34
+ "name": "Lot for tests-2",
29
35
  "product_id": cls.product.id,
30
36
  }
31
37
  )
@@ -35,7 +41,7 @@ class TestQualityControlStockOca(TestQualityControlOcaBase):
35
41
  "product_id": cls.product.id,
36
42
  "location_id": cls.location.id,
37
43
  "quantity": 1,
38
- "lot_id": cls.lot.id,
44
+ "lot_id": cls.lot1.id,
39
45
  }
40
46
  )
41
47
  cls.user = new_test_user(
@@ -236,6 +242,7 @@ class TestQualityControlStockOca(TestQualityControlOcaBase):
236
242
  self.product.categ_id.qc_triggers = [
237
243
  (0, 0, {"trigger": self.trigger.id, "test": self.test.id})
238
244
  ]
245
+ self.product.tracking = "lot"
239
246
  self.picking1._action_done()
240
247
  self.assertEqual(
241
248
  self.picking1.created_inspections, 1, "Only one inspection must be created"
@@ -246,10 +253,10 @@ class TestQualityControlStockOca(TestQualityControlOcaBase):
246
253
  "Wrong test picked when creating inspection.",
247
254
  )
248
255
  self.assertEqual(
249
- self.lot.created_inspections, 1, "Only one inspection must be created"
256
+ self.lot1.created_inspections, 1, "Only one inspection must be created"
250
257
  )
251
258
  self.assertEqual(
252
- self.lot.qc_inspections_ids[:1].test,
259
+ self.lot1.qc_inspections_ids[:1].test,
253
260
  self.test,
254
261
  "Wrong test picked when creating inspection.",
255
262
  )
@@ -298,7 +305,6 @@ class TestQualityControlStockOca(TestQualityControlOcaBase):
298
305
  )
299
306
  self.inspection1.onchange_object_id()
300
307
  self.assertEqual(self.inspection1.picking_id, self.picking1)
301
- self.assertEqual(self.inspection1.lot_id, self.lot)
302
308
  self.assertEqual(
303
309
  self.inspection1.product_id, self.picking1.move_ids[:1].product_id
304
310
  )
@@ -306,13 +312,75 @@ class TestQualityControlStockOca(TestQualityControlOcaBase):
306
312
  self.inspection1.qty, self.picking1.move_ids[:1].product_uom_qty
307
313
  )
308
314
 
309
- def test_qc_inspection_lot(self):
310
- self.inspection1.write(
311
- {
312
- "name": self.picking1.move_ids[:1]._name + "inspection",
313
- "object_id": "%s,%d" % (self.lot._name, self.lot.id),
314
- }
315
+ def test_qc_inspection_lot_single(self):
316
+ self.trigger.inspection_per_lot = False
317
+ self.product.qc_triggers = [
318
+ (0, 0, {"trigger": self.trigger.id, "test": self.test.id})
319
+ ]
320
+ self.product.tracking = "lot"
321
+ self.picking1.move_line_ids[0].copy()
322
+ self.picking1.move_line_ids[0].write({"quantity": 1, "lot_id": self.lot1.id})
323
+ self.picking1.move_line_ids[1].write({"quantity": 1, "lot_id": self.lot2.id})
324
+ self.picking1._action_done()
325
+ self.assertEqual(
326
+ self.picking1.created_inspections, 1, "One inspections must be created"
327
+ )
328
+ lot1_inspection = self.picking1.qc_inspections_ids.filtered(
329
+ lambda inspection: inspection.lot_id == self.lot1
330
+ )
331
+ self.assertTrue(lot1_inspection, "An inspection with lot1 must be created")
332
+ self.assertEqual(
333
+ lot1_inspection.qty, 2, "Quantity for lot1 must be equal to 2."
334
+ )
335
+ self.assertEqual(
336
+ self.lot1.created_inspections,
337
+ 1,
338
+ "Created inspections for lot1 must be equal to 1.",
339
+ )
340
+ lot2_inspection = self.picking1.qc_inspections_ids.filtered(
341
+ lambda inspection: inspection.lot_id == self.lot2
342
+ )
343
+ self.assertFalse(lot2_inspection, "No inspections with lot2 must be created")
344
+ self.assertEqual(
345
+ self.lot2.created_inspections,
346
+ 0,
347
+ "Created inspections for lot2 must be equal to 0.",
348
+ )
349
+
350
+ def test_qc_inspection_lot_multiple(self):
351
+ self.trigger.inspection_per_lot = True
352
+ self.product.qc_triggers = [
353
+ (0, 0, {"trigger": self.trigger.id, "test": self.test.id})
354
+ ]
355
+ self.product.tracking = "lot"
356
+ self.picking1.move_line_ids[0].copy()
357
+ self.picking1.move_line_ids[0].write({"quantity": 1, "lot_id": self.lot1.id})
358
+ self.picking1.move_line_ids[1].write({"quantity": 2, "lot_id": self.lot2.id})
359
+ self.picking1._action_done()
360
+ self.assertEqual(
361
+ self.picking1.created_inspections, 2, "Two inspections must be created"
362
+ )
363
+ lot1_inspection = self.picking1.qc_inspections_ids.filtered(
364
+ lambda inspection: inspection.lot_id == self.lot1
365
+ )
366
+ self.assertTrue(lot1_inspection, "An inspection with lot1 must be created")
367
+ self.assertEqual(
368
+ lot1_inspection.qty, 1, "Quantity for lot1 must be equal to 1."
369
+ )
370
+ self.assertEqual(
371
+ self.lot1.created_inspections,
372
+ 1,
373
+ "Created inspections for lot1 must be equal to 1.",
374
+ )
375
+ lot2_inspection = self.picking1.qc_inspections_ids.filtered(
376
+ lambda inspection: inspection.lot_id == self.lot2
377
+ )
378
+ self.assertTrue(lot2_inspection, "An inspection with lot2 must be created")
379
+ self.assertEqual(
380
+ lot2_inspection.qty, 2, "Quantity for lot1 must be equal to 2."
381
+ )
382
+ self.assertEqual(
383
+ self.lot2.created_inspections,
384
+ 1,
385
+ "Created inspections for lot2 must be equal to 1.",
315
386
  )
316
- self.inspection1.onchange_object_id()
317
- self.assertEqual(self.inspection1.lot_id, self.lot)
318
- self.assertEqual(self.inspection1.product_id, self.lot.product_id)
@@ -7,6 +7,18 @@
7
7
  <field name="arch" type="xml">
8
8
  <xpath expr="//field[@name='partner_selectable']" position="after">
9
9
  <field name="picking_type_id" readonly="1" />
10
+ <field name="inspection_per_lot" invisible="not picking_type_id" />
11
+ </xpath>
12
+ </field>
13
+ </record>
14
+ <record model="ir.ui.view" id="qc_trigger_tree_view">
15
+ <field name="name">qc.trigger.form</field>
16
+ <field name="model">qc.trigger</field>
17
+ <field name='inherit_id' ref='quality_control_oca.qc_trigger_tree_view' />
18
+ <field name="arch" type="xml">
19
+ <xpath expr="//field[@name='partner_selectable']" position="after">
20
+ <field name="picking_type_id" column_invisible="True" />
21
+ <field name="inspection_per_lot" invisible="not picking_type_id" />
10
22
  </xpath>
11
23
  </field>
12
24
  </record>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-quality_control_stock_oca
3
- Version: 17.0.1.0.0.4
3
+ Version: 17.0.2.0.0
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo-addon-quality_control_oca>=17.0dev,<17.1dev
6
6
  Requires-Dist: odoo>=17.0a,<17.1dev
@@ -23,7 +23,7 @@ Quality control - Stock (OCA)
23
23
  !! This file is generated by oca-gen-addon-readme !!
24
24
  !! changes will be overwritten. !!
25
25
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26
- !! source digest: sha256:31c16627e1481520c4344b7a1508339c42a78253daed82ecb3febaf214a1d52d
26
+ !! source digest: sha256:7e72a7187f36cb3dbc96e453e18edc8849de5c944dc57874ba5488d6a0c91915
27
27
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
28
 
29
29
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -54,10 +54,21 @@ It also adds some shortcuts on picking and lots to these inspections.
54
54
  .. contents::
55
55
  :local:
56
56
 
57
+ Configuration
58
+ =============
59
+
60
+ To create a quality inspection for each lot/serial number used in a
61
+ stock move you need to:
62
+
63
+ - Go to Quality Control> Configuration > Triggers.
64
+ - Activate the "Inspection Per Lot" option in those triggers which need
65
+ to force a different inspection for each lot/serial number used in a
66
+ stock picking.
67
+
57
68
  Known issues / Roadmap
58
69
  ======================
59
70
 
60
- - Put trigger in all languages.
71
+ - Put trigger in all languages.
61
72
 
62
73
  Bug Tracker
63
74
  ===========
@@ -82,19 +93,23 @@ Authors
82
93
  Contributors
83
94
  ------------
84
95
 
85
- - Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
86
- - Simone Rubino <simone.rubino@agilebg.com>
87
- - Andrii Skrypka <andrijskrypa@ukr.net>
88
- - Ignacio José Alés <ignacio.ales@guadaltech.es>
89
- - Pimolnat Suntian <pimolnats@ecosoft.co.th>
90
- - `Tecnativa <https://www.tecnativa.com>`__:
96
+ - Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
97
+ - Simone Rubino <simone.rubino@agilebg.com>
98
+ - Andrii Skrypka <andrijskrypa@ukr.net>
99
+ - Ignacio José Alés <ignacio.ales@guadaltech.es>
100
+ - Pimolnat Suntian <pimolnats@ecosoft.co.th>
101
+ - `Tecnativa <https://www.tecnativa.com>`__:
102
+
103
+ - Pedro M. Baeza
104
+ - Carlos Roca
105
+
106
+ - `APSL-Nagarro <https://www.apsl.tech>`__:
91
107
 
92
- - Pedro M. Baeza
93
- - Carlos Roca
108
+ - Antoni Marroig <amarroig@apsl.net>
94
109
 
95
- - `APSL-Nagarro <https://www.apsl.tech>`__:
110
+ - `Sygel <https://www.sygel.es>`__:
96
111
 
97
- - Antoni Marroig <amarroig@apsl.net>
112
+ - Manuel Regidor <manuel.regidor@sygel.es>
98
113
 
99
114
  Maintainers
100
115
  -----------
@@ -1,6 +1,6 @@
1
- odoo/addons/quality_control_stock_oca/README.rst,sha256=5RUq0kHMF3cJlBZNH7rTLMcH-P-7inmHKKr5FsIQfyc,3461
1
+ odoo/addons/quality_control_stock_oca/README.rst,sha256=XpwY-NCJSGrx9B2q34F2uJqDLLsXUJh41RCk6jfqrMQ,3864
2
2
  odoo/addons/quality_control_stock_oca/__init__.py,sha256=OaVwWLIUpN7Tg7E4DqRdP6JlP8h0JOxg524Zi7-TFYw,412
3
- odoo/addons/quality_control_stock_oca/__manifest__.py,sha256=WK633usM_m9uhi2-EC5x0fMuF35XUNyxzAvdH-XK4LQ,838
3
+ odoo/addons/quality_control_stock_oca/__manifest__.py,sha256=HyaL5pfNn1ai92w4SVHrs9Ljr6a-_u8ybcYYB7iV9Dk,838
4
4
  odoo/addons/quality_control_stock_oca/i18n/ca.po,sha256=R1s7jJCe0Gh8E39pmdr1nfVFkw7IBLQI5DZpRtsLIH8,6084
5
5
  odoo/addons/quality_control_stock_oca/i18n/de.po,sha256=NPN2YapKjudiSK4fejhh78ybJyjjtuqQ0xeY-Tzmz2E,6972
6
6
  odoo/addons/quality_control_stock_oca/i18n/el_GR.po,sha256=elsAV-RfZ4F-VB_FrvihwG0X-7Wb2GGeZN9pojHthnE,6097
@@ -16,12 +16,12 @@ odoo/addons/quality_control_stock_oca/i18n/fr_FR.po,sha256=UOQync8ik1-62QHWd7ZZw
16
16
  odoo/addons/quality_control_stock_oca/i18n/gl.po,sha256=UbyzWFfcod2nnjiGrwOY50CM38MW2jHEj3XGlqHs-kQ,6235
17
17
  odoo/addons/quality_control_stock_oca/i18n/hr.po,sha256=Ek50fwJANRmlghq439hFuYxJ1XDxpxAoVWxVXecTItQ,6163
18
18
  odoo/addons/quality_control_stock_oca/i18n/hr_HR.po,sha256=3JNeLDjTJjHoIDhCrrcBUIO2Z-eBqqacuYU3BInpc-c,6176
19
- odoo/addons/quality_control_stock_oca/i18n/it.po,sha256=t0l194ZCM3OQiY_mOeCleQ1tI46mm325TwVVbwSLCEg,6845
19
+ odoo/addons/quality_control_stock_oca/i18n/it.po,sha256=Bx8kIRXJkF0z6iCpD50Cq6FKEUD3s7uJksQGOLJzb0s,6842
20
20
  odoo/addons/quality_control_stock_oca/i18n/nl.po,sha256=S_unY94kLw7FizyNJo3WAK8jVkipOTiE6Mpe4vV_d7Q,6082
21
21
  odoo/addons/quality_control_stock_oca/i18n/nl_NL.po,sha256=2xbvHURI607U-HJLu7ixiLsGxtypSLr3DJc_10YlmpM,6102
22
22
  odoo/addons/quality_control_stock_oca/i18n/pt.po,sha256=cC-88VLrntgDRLlZaajcIFV7HRRcX1I4wZ4xllV6O7w,6087
23
23
  odoo/addons/quality_control_stock_oca/i18n/pt_BR.po,sha256=wdHD4fROh49k1n9WdUHSebeOMwT-R5HB-MbP6qGmN-4,6715
24
- odoo/addons/quality_control_stock_oca/i18n/quality_control_stock_oca.pot,sha256=lGIIfZd4jmHhO-IWzPknRdsZrJJkK4GSedii1mESd6U,5797
24
+ odoo/addons/quality_control_stock_oca/i18n/quality_control_stock_oca.pot,sha256=UXAvve0dDCS8PQ-ZCKiSDvj2oPPkvQUK-vowJHAtH6g,6221
25
25
  odoo/addons/quality_control_stock_oca/i18n/ro.po,sha256=FgZkvUVOetlWLPbRBdhLiBKLo9vUU2CYeqvAR0fWQuI,6129
26
26
  odoo/addons/quality_control_stock_oca/i18n/ru.po,sha256=2EGdPm0NG4v-xQYd8WFDYEcPiRt4igL58hsxfhhBigM,6228
27
27
  odoo/addons/quality_control_stock_oca/i18n/sk.po,sha256=H5v7qLn11WV6iMvB42o0Z1fV2cSOyNs9vt1RJLc2r5M,6110
@@ -31,23 +31,24 @@ odoo/addons/quality_control_stock_oca/i18n/tr_TR.po,sha256=Jti8Ov8YyVZbfe3QjFGuZ
31
31
  odoo/addons/quality_control_stock_oca/i18n/vi_VN.po,sha256=m_GOM_YxHugxZnl1rgTJ_T8BPkR_raQo6t9lHK6u-b4,6280
32
32
  odoo/addons/quality_control_stock_oca/i18n/zh_CN.po,sha256=WO1Il1MLpsZd96XMxru6eLY4G9UCBfOIYP9Q6XEmw98,6091
33
33
  odoo/addons/quality_control_stock_oca/models/__init__.py,sha256=5W6REeWDL4dOmC9jP6Re4A8OjdXBgFl12DYLtxyTvNU,215
34
- odoo/addons/quality_control_stock_oca/models/qc_inspection.py,sha256=pggx5z59frtSH-qBG4-7tlahmUzb7YS6vGkRLq7Okg0,3388
35
- odoo/addons/quality_control_stock_oca/models/qc_trigger.py,sha256=Lw0HDrr00SKC0WMX0o5Dy1_GpHCpUWwVMVgBCeOeeOY,376
36
- odoo/addons/quality_control_stock_oca/models/stock_picking.py,sha256=bVjsKurJU7s2xlxgqyxKgt_APT3KKVs3mKH1Pea3OOY,3236
34
+ odoo/addons/quality_control_stock_oca/models/qc_inspection.py,sha256=yEsg4WLyqGcsu8x9auAbZjhErRI0FH7xi_srJ44GAyM,3350
35
+ odoo/addons/quality_control_stock_oca/models/qc_trigger.py,sha256=gxQM16R2Ao8uQPRPO_2ucA0YeYhbssKfdLDhGxrYGOY,537
36
+ odoo/addons/quality_control_stock_oca/models/stock_picking.py,sha256=gv_GvQ7m_QiXdSI6h7D8dRIA7b070UDXwRZZqBigB1g,4087
37
37
  odoo/addons/quality_control_stock_oca/models/stock_picking_type.py,sha256=A9R0O24GM4hRNv3k-Hi9kHE2kixoyH8vgk8qQytkOeA,1361
38
38
  odoo/addons/quality_control_stock_oca/models/stock_production_lot.py,sha256=wTlHrBL7F2TyTY0CMen-8JW3TYnI5Wup6iEYhEoCe3o,1923
39
- odoo/addons/quality_control_stock_oca/readme/CONTRIBUTORS.md,sha256=j0ND6SUf_UPtxsfxGUx9dGQe408mF91kGp3jwqY2Z5k,412
39
+ odoo/addons/quality_control_stock_oca/readme/CONFIGURE.md,sha256=AVqTRXXnhAikY1c-ps68EuKA5WrzjL1OCPTMmotjFj4,306
40
+ odoo/addons/quality_control_stock_oca/readme/CONTRIBUTORS.md,sha256=Lni_WgrEwIQtCX-t3pKSbCzJOMH3onyweA5o46JCCXs,495
40
41
  odoo/addons/quality_control_stock_oca/readme/DESCRIPTION.md,sha256=Gek4Z0OoPxtZGCFRIhv2LoJgO59u0LrQlr3Il9y2Ulg,152
41
42
  odoo/addons/quality_control_stock_oca/readme/ROADMAP.md,sha256=KT-Cgbhha8U6uoyUao4tY168ueYySubdOfsyrL7F5yU,32
42
43
  odoo/addons/quality_control_stock_oca/static/description/icon.png,sha256=x3L6LkPBxlV3mIf1zIvHJZloOgNUDiOBOaFgqggexoo,9215
43
- odoo/addons/quality_control_stock_oca/static/description/index.html,sha256=_wBcSmeCycbod9z1skRYKU6uEN42jGm9sfNh2tr3Vlg,13501
44
+ odoo/addons/quality_control_stock_oca/static/description/index.html,sha256=KduU7qGEszrNHhA1zakniSAnmEMhovbfdKgbZt3WwtU,14379
44
45
  odoo/addons/quality_control_stock_oca/tests/__init__.py,sha256=DoOTjy4_SOM0tQiBUfjxHikooStDz_NrSluVnfx07bk,107
45
- odoo/addons/quality_control_stock_oca/tests/test_quality_control_stock.py,sha256=Ba2yRZ9ScNg3fj8ZNf0uQDR_NwJ_AtviPWqFvZrtfVA,11543
46
+ odoo/addons/quality_control_stock_oca/tests/test_quality_control_stock.py,sha256=6Q83su6TsAInSVbipItqH66azMtQJRT2pX4mJ8-A5F0,14390
46
47
  odoo/addons/quality_control_stock_oca/views/qc_inspection_view.xml,sha256=zERew9HMxyarqS9m41JjPnPLoadTx-L5fys9iO3ZP4Q,3936
47
- odoo/addons/quality_control_stock_oca/views/qc_trigger_view.xml,sha256=Iva-jto2Yr6qcIsSFnVdugjhUFfERUzPeKwWnpfsJkQ,527
48
+ odoo/addons/quality_control_stock_oca/views/qc_trigger_view.xml,sha256=u-ZgrRDH2N8y9s_NkgKuNJBahVjhwvPt1sa8GAmwIUY,1178
48
49
  odoo/addons/quality_control_stock_oca/views/stock_picking_view.xml,sha256=jXaLi5xFle8cDNWYqmQduu_HNpGWMPAyBO2RW887s5E,4015
49
50
  odoo/addons/quality_control_stock_oca/views/stock_production_lot_view.xml,sha256=LYFOchJ8n89vVy4C840k8uedbXPH3KkqhtjcfwUws6M,3946
50
- odoo_addon_quality_control_stock_oca-17.0.1.0.0.4.dist-info/METADATA,sha256=ZQURH1v3bd1u5neL_XQ-lTOs-GFIutqdEqKpRuE95Pw,4086
51
- odoo_addon_quality_control_stock_oca-17.0.1.0.0.4.dist-info/WHEEL,sha256=8Rd4enx1PCuyDWP4SABqO5Fv8rpaknqp3VzjoFFLa6c,83
52
- odoo_addon_quality_control_stock_oca-17.0.1.0.0.4.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
53
- odoo_addon_quality_control_stock_oca-17.0.1.0.0.4.dist-info/RECORD,,
51
+ odoo_addon_quality_control_stock_oca-17.0.2.0.0.dist-info/METADATA,sha256=Hy_4pbxPc315uUAhW0HX08ZJDFBoJ-knKC7aT0YgpcM,4487
52
+ odoo_addon_quality_control_stock_oca-17.0.2.0.0.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
53
+ odoo_addon_quality_control_stock_oca-17.0.2.0.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
54
+ odoo_addon_quality_control_stock_oca-17.0.2.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: Whool 1.0.1
2
+ Generator: Whool 1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5