Skip to content

Commit c25f365

Browse files
committed
[MIG] stock_tracking_integrity: Migration to 18.0
1 parent a9f086c commit c25f365

File tree

9 files changed

+52
-42
lines changed

9 files changed

+52
-42
lines changed

stock_tracking_integrity/README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ Credits
4646
Authors
4747
-------
4848

49-
* NuoBiT Solutions
50-
* S.L.
49+
* NuoBiT Solutions SL
5150

5251
Contributors
5352
------------
5453

5554
- `NuoBiT <https://www.nuobit.com>`__:
5655

57-
- Frank Cespedes <fcespedes@nuobit.com>
58-
- Eric Antones <eatones@nuobit.com>
56+
- Frank Cespedes fcespedes@nuobit.com
57+
- Eric Antones eatones@nuobit.com
58+
- Deniz Gallo dgallo@nuobit.com
5959

6060
Maintainers
6161
-----------
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
2-
# Frank Cespedes <fcespedes@nuobit.com>
3-
# Eric Antones <eatones@nuobit.com>
1+
# Copyright NuoBiT Solutions - Frank Cespedes <fcespedes@nuobit.com>
2+
# Copyright NuoBiT Solutions - Eric Antones <eatones@nuobit.com>
3+
# Copyright 2025 NuoBiT Solutions - Deniz Gallo <dgallo@nuobit.com>
44
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
55

66
{
77
"name": "Stock Tracking Integrity",
88
"summary": "This module ensures the integrity of the product according"
99
" to the type of tracking.",
10-
"author": "NuoBiT Solutions, S.L.",
10+
"author": "NuoBiT Solutions SL",
1111
"category": "Warehouse",
12-
"version": "14.0.1.0.0",
12+
"version": "18.0.1.0.0",
1313
"license": "AGPL-3",
1414
"website": "https://github.com/NuoBiT/odoo-addons",
15-
"depends": ["stock"],
15+
"depends": ["stock", "stock_inventory"],
1616
"data": ["views/stock_inventory_views.xml"],
1717
}

stock_tracking_integrity/i18n/es.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 14.0\n"
7+
"Project-Id-Version: Odoo Server 18.0\n"
88
"Report-Msgid-Bugs-To: \n"
99
"POT-Creation-Date: 2024-04-03 14:35+0000\n"
1010
"PO-Revision-Date: 2024-04-03 14:35+0000\n"

stock_tracking_integrity/models/product_template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
2-
# Frank Cespedes <fcespedes@nuobit.com>
3-
# Eric Antones <eatones@nuobit.com>
1+
# Copyright NuoBiT Solutions - Frank Cespedes <fcespedes@nuobit.com>
2+
# Copyright NuoBiT Solutions - Eric Antones <eatones@nuobit.com>
43
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
54

5+
66
from odoo import api, models
77

88

stock_tracking_integrity/models/stock_inventory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
2-
# Frank Cespedes <fcespedes@nuobit.com>
3-
# Eric Antones <eatones@nuobit.com>
1+
# Copyright NuoBiT Solutions - Frank Cespedes <fcespedes@nuobit.com>
2+
# Copyright NuoBiT Solutions - Eric Antones <eatones@nuobit.com>
43
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
54

5+
66
from odoo import api, fields, models
77

88

stock_tracking_integrity/models/stock_move_line.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
2-
# Frank Cespedes <fcespedes@nuobit.com>
3-
# Eric Antones <eatones@nuobit.com>
1+
# Copyright NuoBiT Solutions - Frank Cespedes <fcespedes@nuobit.com>
2+
# Copyright NuoBiT Solutions - Eric Antones <eatones@nuobit.com>
3+
# Copyright 2025 NuoBiT Solutions - Deniz Gallo <dgallo@nuobit.com>
44
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
55

6+
67
from odoo import _, api, models
78
from odoo.exceptions import ValidationError
89

@@ -21,16 +22,24 @@ def _check_lot_id_by_tracking(self):
2122
if not rec.lot_id and rec.product_id.tracking != "none":
2223
raise ValidationError(
2324
_(
24-
"The product %s with tracking '%s' only "
25+
"The product %(product_name)s with tracking "
26+
"'%(tracking)s' only "
2527
"can have movements with a lot number."
2628
)
27-
% (rec.product_id.display_name, tracking_label)
29+
% {
30+
"product_name": rec.product_id.display_name,
31+
"tracking": tracking_label,
32+
}
2833
)
2934
if rec.lot_id and rec.product_id.tracking == "none":
3035
raise ValidationError(
3136
_(
32-
"The product %s with tracking '%s' only "
37+
"The product %(product_name)s with tracking "
38+
"'%(tracking)s' only "
3339
"can have movements without a lot number."
3440
)
35-
% (rec.product_id.display_name, tracking_label)
41+
% {
42+
"product_name": rec.product_id.display_name,
43+
"tracking": tracking_label,
44+
}
3645
)
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
- [NuoBiT](https://www.nuobit.com):
2-
- Frank Cespedes \<fcespedes@nuobit.com\>
3-
- Eric Antones \<eatones@nuobit.com\>
2+
- Frank Cespedes <fcespedes@nuobit.com>
3+
- Eric Antones <eatones@nuobit.com>
4+
- Deniz Gallo <dgallo@nuobit.com>

stock_tracking_integrity/static/description/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,16 +397,16 @@ <h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
397397
<div class="section" id="authors">
398398
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
399399
<ul class="simple">
400-
<li>NuoBiT Solutions</li>
401-
<li>S.L.</li>
400+
<li>NuoBiT Solutions SL</li>
402401
</ul>
403402
</div>
404403
<div class="section" id="contributors">
405404
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
406405
<ul class="simple">
407406
<li><a class="reference external" href="https://www.nuobit.com">NuoBiT</a>:<ul>
408-
<li>Frank Cespedes &lt;<a class="reference external" href="mailto:fcespedes&#64;nuobit.com">fcespedes&#64;nuobit.com</a>&gt;</li>
409-
<li>Eric Antones &lt;<a class="reference external" href="mailto:eatones&#64;nuobit.com">eatones&#64;nuobit.com</a>&gt;</li>
407+
<li>Frank Cespedes <a class="reference external" href="mailto:fcespedes&#64;nuobit.com">fcespedes&#64;nuobit.com</a></li>
408+
<li>Eric Antones <a class="reference external" href="mailto:eatones&#64;nuobit.com">eatones&#64;nuobit.com</a></li>
409+
<li>Deniz Gallo <a class="reference external" href="mailto:dgallo&#64;nuobit.com">dgallo&#64;nuobit.com</a></li>
410410
</ul>
411411
</li>
412412
</ul>

stock_tracking_integrity/views/stock_inventory_views.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<!-- Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
3-
Frank Cespedes <fcespedes@nuobit.com>
4-
Eric Antones <eantones@nuobit.com>
2+
<!-- Copyright NuoBiT Solutions - Frank Cespedes <fcespedes@nuobit.com>
3+
Copyright NuoBiT Solutions - Eric Antones <eatones@nuobit.com>
4+
Copyright 2025 NuoBiT Solutions - Deniz Gallo <dgallo@nuobit.com>
55
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -->
66
<odoo>
77
<record id="stock_inventory_line_tree" model="ir.ui.view">
8-
<field name="name">stock.inventory.line.tree</field>
9-
<field name="model">stock.inventory.line</field>
10-
<field name="inherit_id" ref="stock.stock_inventory_line_tree" />
8+
<field name="name">stock.inventory.list</field>
9+
<field name="model">stock.inventory</field>
10+
<field name="inherit_id" ref="stock.view_inventory_group_tree" />
1111
<field name="arch" type="xml">
1212
<xpath expr="//field[@name='prod_lot_id']" position="before">
1313
<field name="is_lot_required" invisible="1" />
1414
</xpath>
1515
<xpath expr="//field[@name='prod_lot_id']" position="attributes">
16-
<attribute name="attrs">{'readonly': ['|', '|',
17-
('product_tracking', '=', 'none'),
18-
('is_editable', '=', False),
19-
('state', '!=', 'confirm')],
20-
'required': [('is_lot_required', '!=', False), ('is_editable', '=', True), ('state', '=', 'confirm')]}
21-
</attribute>
16+
<attribute
17+
name="readonly"
18+
>product_tracking == none or is_editable == False or state != 'confirm'</attribute>
19+
<attribute
20+
name="readonly"
21+
>is_lot_required != False and is_editable == True and state == 'confirm'</attribute>
2222
</xpath>
2323
</field>
2424
</record>

0 commit comments

Comments
 (0)