odoo-addon-stock-lot-condition 18.0.1.0.0.3__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,20 @@
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 api, fields, models
4
+
5
+
6
+ class StockLot(models.Model):
7
+ _inherit = "stock.lot"
8
+
9
+ condition_id = fields.Many2one(
10
+ comodel_name="stock.lot.condition", string="Condition"
11
+ )
12
+ condition_required_note = fields.Boolean(compute="_compute_condition_required_note")
13
+ condition_note = fields.Text()
14
+
15
+ @api.depends("condition_id")
16
+ def _compute_condition_required_note(self):
17
+ for item in self:
18
+ item.condition_required_note = (
19
+ item.condition_id.required_note if item.condition_id else False
20
+ )
@@ -0,0 +1,20 @@
1
+ # Copyright 2025 Tecnativa - Víctor Martínez
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
+
4
+ from odoo import fields, models
5
+
6
+
7
+ class StockLotCondition(models.Model):
8
+ _name = "stock.lot.condition"
9
+ _description = "Stock Lot Condition"
10
+ _order = "sequence, id"
11
+
12
+ sequence = fields.Integer()
13
+ name = fields.Char(required=True, translate=True)
14
+ active = fields.Boolean(default=True)
15
+ description = fields.Char(translate=True)
16
+ required_note = fields.Boolean(
17
+ string="Required note?",
18
+ help="If this box is checked, it will be mandatory to indicate a text for "
19
+ "this condition in lots.",
20
+ )
@@ -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 concept of "Condition" to lot so that this information can be indicated (for example: Good or Defects).
@@ -0,0 +1,24 @@
1
+ You can define the conditions in the Inventory > Configuration > Products > Lot conditions menu.
2
+
3
+ Default conditions are not defined because they depend on the type of company:
4
+
5
+ 1. Classification by Grade (A, B, C)
6
+ This system is common in refurbished products (electronics) and second-hand clothing.
7
+
8
+ - Grade A (Excellent/Like new): The item is in perfect working condition. It may have very slight signs of use or none at all. In the case of clothing, there are no noticeable stains or damage.
9
+ - Grade B (Good/Very Good/Fair): The item functions perfectly, but shows visible signs of normal use, such as minor scratches, slight dents, or cosmetic wear.
10
+ - Grade C (Acceptable/Sufficient): The item is fully functional but has more obvious cosmetic flaws, such as dents, deep scratches, or significant wear. Clothing may have stains or loose stitching.
11
+
12
+ 2. Condition Descriptions (Sales Platforms)
13
+ Platforms such as Amazon use a descriptive system so that buyers have clear expectations:
14
+
15
+ - As new: The item is intact and works perfectly, but the packaging may be damaged.
16
+ - Very good: Minimal use, with minor cosmetic signs.
17
+ - Good: Works perfectly, but with visible wear from normal use.
18
+ - Acceptable: May have cosmetic imperfections, scratches, dents, etc., but is still functional.
19
+
20
+ 3. For Specific Parts (e.g. Automotive)
21
+ In the spare parts sector, classification is often based on origin and warranty:
22
+
23
+ - Used part: Removed from another vehicle as is, its condition may vary and usually requires the customer's approval of its condition.
24
+ - Refurbished/remanufactured part: The part has been restored to its original specifications or to a condition very close to new, offering guarantees similar to a new part.
@@ -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_condition_user,access_stock_lot_condition_user,model_stock_lot_condition,base.group_user,1,0,0,0
3
+ access_stock_lot_condition_admin,access_stock_lot_condition_admin,model_stock_lot_condition,stock.group_stock_manager,1,1,1,1
@@ -0,0 +1,482 @@
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="stock-lot-condition">
370
+ <h1>Stock Lot Condition</h1>
371
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372
+ !! This file is generated by oca-gen-addon-readme !!
373
+ !! changes will be overwritten. !!
374
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
+ !! source digest: sha256:ba73b6fd2a461bff8c7dafec1d3ed563cd0bda5fe9b9e6c603b4796cd8fffff0
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/stock-logistics-warehouse/tree/18.0/stock_lot_condition"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-18-0/stock-logistics-warehouse-18-0-stock_lot_condition"><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/stock-logistics-warehouse&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
+ <p>This module adds the concept of “Condition” to lot so that this
379
+ information can be indicated (for example: Good or Defects).</p>
380
+ <p><strong>Table of contents</strong></p>
381
+ <div class="contents local topic" id="contents">
382
+ <ul class="simple">
383
+ <li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
384
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
385
+ <li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
386
+ <li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
387
+ <li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
388
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
389
+ </ul>
390
+ </li>
391
+ </ul>
392
+ </div>
393
+ <div class="section" id="usage">
394
+ <h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
395
+ <p>You can define the conditions in the Inventory &gt; Configuration &gt;
396
+ Products &gt; Lot conditions menu.</p>
397
+ <p>Default conditions are not defined because they depend on the type of
398
+ company:</p>
399
+ <ol class="arabic simple">
400
+ <li>Classification by Grade (A, B, C) This system is common in
401
+ refurbished products (electronics) and second-hand clothing.</li>
402
+ </ol>
403
+ <ul class="simple">
404
+ <li>Grade A (Excellent/Like new): The item is in perfect working
405
+ condition. It may have very slight signs of use or none at all. In the
406
+ case of clothing, there are no noticeable stains or damage.</li>
407
+ <li>Grade B (Good/Very Good/Fair): The item functions perfectly, but shows
408
+ visible signs of normal use, such as minor scratches, slight dents, or
409
+ cosmetic wear.</li>
410
+ <li>Grade C (Acceptable/Sufficient): The item is fully functional but has
411
+ more obvious cosmetic flaws, such as dents, deep scratches, or
412
+ significant wear. Clothing may have stains or loose stitching.</li>
413
+ </ul>
414
+ <ol class="arabic simple" start="2">
415
+ <li>Condition Descriptions (Sales Platforms) Platforms such as Amazon use
416
+ a descriptive system so that buyers have clear expectations:</li>
417
+ </ol>
418
+ <ul class="simple">
419
+ <li>As new: The item is intact and works perfectly, but the packaging may
420
+ be damaged.</li>
421
+ <li>Very good: Minimal use, with minor cosmetic signs.</li>
422
+ <li>Good: Works perfectly, but with visible wear from normal use.</li>
423
+ <li>Acceptable: May have cosmetic imperfections, scratches, dents, etc.,
424
+ but is still functional.</li>
425
+ </ul>
426
+ <ol class="arabic simple" start="3">
427
+ <li>For Specific Parts (e.g. Automotive) In the spare parts sector,
428
+ classification is often based on origin and warranty:</li>
429
+ </ol>
430
+ <ul class="simple">
431
+ <li>Used part: Removed from another vehicle as is, its condition may vary
432
+ and usually requires the customer’s approval of its condition.</li>
433
+ <li>Refurbished/remanufactured part: The part has been restored to its
434
+ original specifications or to a condition very close to new, offering
435
+ guarantees similar to a new part.</li>
436
+ </ul>
437
+ </div>
438
+ <div class="section" id="bug-tracker">
439
+ <h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
440
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
441
+ In case of trouble, please check there if your issue has already been reported.
442
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
443
+ <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_lot_condition%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
444
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
445
+ </div>
446
+ <div class="section" id="credits">
447
+ <h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
448
+ <div class="section" id="authors">
449
+ <h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
450
+ <ul class="simple">
451
+ <li>Tecnativa</li>
452
+ </ul>
453
+ </div>
454
+ <div class="section" id="contributors">
455
+ <h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
456
+ <ul class="simple">
457
+ <li><tt class="docutils literal">Tecnativa <span class="pre">&lt;https://www.tecnativa.com&gt;</span></tt>_:<ul>
458
+ <li>Pedro M. Baeza</li>
459
+ <li>Víctor Martínez</li>
460
+ </ul>
461
+ </li>
462
+ </ul>
463
+ </div>
464
+ <div class="section" id="maintainers">
465
+ <h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
466
+ <p>This module is maintained by the OCA.</p>
467
+ <a class="reference external image-reference" href="https://odoo-community.org">
468
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
469
+ </a>
470
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
471
+ mission is to support the collaborative development of Odoo features and
472
+ promote its widespread use.</p>
473
+ <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
474
+ <p><a class="reference external image-reference" href="https://github.com/victoralmau"><img alt="victoralmau" src="https://github.com/victoralmau.png?size=40px" /></a></p>
475
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/18.0/stock_lot_condition">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
476
+ <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>
477
+ </div>
478
+ </div>
479
+ </div>
480
+ </div>
481
+ </body>
482
+ </html>
@@ -0,0 +1,69 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <odoo>
3
+ <record id="stock_lot_condition_view_form" model="ir.ui.view">
4
+ <field name="name">stock.lot.condition.form</field>
5
+ <field name="model">stock.lot.condition</field>
6
+ <field name="arch" type="xml">
7
+ <form>
8
+ <sheet>
9
+ <widget
10
+ name="web_ribbon"
11
+ title="Archived"
12
+ bg_color="bg-danger"
13
+ invisible="active"
14
+ />
15
+ <div class="oe_title">
16
+ <label for="name" class="oe_edit_only" />
17
+ <h1>
18
+ <field name="name" />
19
+ </h1>
20
+ </div>
21
+ <group>
22
+ <field name="required_note" />
23
+ </group>
24
+ <group name="group_description">
25
+ <field name="description" />
26
+ </group>
27
+ </sheet>
28
+ </form>
29
+ </field>
30
+ </record>
31
+ <record id="stock_lot_condition_view_tree" model="ir.ui.view">
32
+ <field name="name">stock.lot.condition.tree</field>
33
+ <field name="model">stock.lot.condition</field>
34
+ <field name="arch" type="xml">
35
+ <list editable="bottom">
36
+ <field name="sequence" widget="handle" />
37
+ <field name="name" />
38
+ <field name="description" optional="hide" />
39
+ </list>
40
+ </field>
41
+ </record>
42
+ <record id="stock_lot_condition_view_search" model="ir.ui.view">
43
+ <field name="name">stock.lot.condition.search</field>
44
+ <field name="model">stock.lot.condition</field>
45
+ <field name="arch" type="xml">
46
+ <search>
47
+ <field name="name" />
48
+ <separator />
49
+ <filter
50
+ string="Archived"
51
+ name="inactive"
52
+ domain="[('active', '=', False)]"
53
+ />
54
+ </search>
55
+ </field>
56
+ </record>
57
+ <record id="stock_lot_condition_action" model="ir.actions.act_window">
58
+ <field name="name">Conditions</field>
59
+ <field name="res_model">stock.lot.condition</field>
60
+ <field name="view_mode">list</field>
61
+ </record>
62
+ <menuitem
63
+ id="menu_stock_lot_condition"
64
+ name="Lot conditions"
65
+ action="stock_lot_condition_action"
66
+ parent="stock.menu_product_in_config_stock"
67
+ sequence="10"
68
+ />
69
+ </odoo>
@@ -0,0 +1,42 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <odoo>
3
+ <record id="view_production_lot_form" model="ir.ui.view">
4
+ <field name="model">stock.lot</field>
5
+ <field name="inherit_id" ref="stock.view_production_lot_form" />
6
+ <field name="arch" type="xml">
7
+ <field name="product_id" position="after">
8
+ <field name="condition_id" widget="selection" />
9
+ <field
10
+ name="condition_note"
11
+ invisible="not condition_required_note"
12
+ required="condition_required_note"
13
+ />
14
+ </field>
15
+ </field>
16
+ </record>
17
+ <record id="view_production_lot_tree" model="ir.ui.view">
18
+ <field name="model">stock.lot</field>
19
+ <field name="inherit_id" ref="stock.view_production_lot_tree" />
20
+ <field name="arch" type="xml">
21
+ <field name="product_id" position="after">
22
+ <field name="condition_id" optional="show" />
23
+ </field>
24
+ </field>
25
+ </record>
26
+ <record id="search_product_lot_filter" model="ir.ui.view">
27
+ <field name="model">stock.lot</field>
28
+ <field name="inherit_id" ref="stock.search_product_lot_filter" />
29
+ <field name="arch" type="xml">
30
+ <field name="product_id" position="after">
31
+ <field name="condition_id" />
32
+ </field>
33
+ <filter name="group_by_product" position="after">
34
+ <filter
35
+ string="Condition"
36
+ name="condition_id"
37
+ context="{'group_by': 'condition_id'}"
38
+ />
39
+ </filter>
40
+ </field>
41
+ </record>
42
+ </odoo>