odoo-addon-stock-request 16.0.1.0.0.4__py3-none-any.whl → 16.0.1.0.1__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.
- odoo/addons/stock_request/README.rst +1 -1
- odoo/addons/stock_request/__manifest__.py +1 -1
- odoo/addons/stock_request/models/stock_request.py +9 -2
- odoo/addons/stock_request/models/stock_request_abstract.py +3 -1
- odoo/addons/stock_request/models/stock_request_allocation.py +3 -1
- odoo/addons/stock_request/static/description/index.html +1 -2
- odoo/addons/stock_request/tests/test_stock_request.py +42 -0
- {odoo_addon_stock_request-16.0.1.0.0.4.dist-info → odoo_addon_stock_request-16.0.1.0.1.dist-info}/METADATA +2 -2
- {odoo_addon_stock_request-16.0.1.0.0.4.dist-info → odoo_addon_stock_request-16.0.1.0.1.dist-info}/RECORD +11 -11
- {odoo_addon_stock_request-16.0.1.0.0.4.dist-info → odoo_addon_stock_request-16.0.1.0.1.dist-info}/WHEEL +0 -0
- {odoo_addon_stock_request-16.0.1.0.0.4.dist-info → odoo_addon_stock_request-16.0.1.0.1.dist-info}/top_level.txt +0 -0
@@ -7,7 +7,7 @@ Stock Request
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
8
8
|
!! changes will be overwritten. !!
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
10
|
-
!! source digest: sha256:
|
10
|
+
!! source digest: sha256:ef1c2d8a89397c0b8ac445dabd1a50295b4422207006ce5186d7e7eb24a7e2b2
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
12
12
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{
|
5
5
|
"name": "Stock Request",
|
6
6
|
"summary": "Internal request for stock",
|
7
|
-
"version": "16.0.1.0.
|
7
|
+
"version": "16.0.1.0.1",
|
8
8
|
"license": "LGPL-3",
|
9
9
|
"website": "https://github.com/OCA/stock-logistics-request",
|
10
10
|
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
@@ -162,9 +162,15 @@ class StockRequest(models.Model):
|
|
162
162
|
done_qty = abs(other_qty - incoming_qty)
|
163
163
|
open_qty = sum(request.allocation_ids.mapped("open_product_qty"))
|
164
164
|
uom = request.product_id.uom_id
|
165
|
-
request.qty_done = uom._compute_quantity(
|
165
|
+
request.qty_done = uom._compute_quantity(
|
166
|
+
done_qty,
|
167
|
+
request.product_uom_id,
|
168
|
+
rounding_method="HALF-UP",
|
169
|
+
)
|
166
170
|
request.qty_in_progress = uom._compute_quantity(
|
167
|
-
open_qty,
|
171
|
+
open_qty,
|
172
|
+
request.product_uom_id,
|
173
|
+
rounding_method="HALF-UP",
|
168
174
|
)
|
169
175
|
request.qty_cancelled = (
|
170
176
|
max(
|
@@ -172,6 +178,7 @@ class StockRequest(models.Model):
|
|
172
178
|
uom._compute_quantity(
|
173
179
|
request.product_qty - done_qty - open_qty,
|
174
180
|
request.product_uom_id,
|
181
|
+
rounding_method="HALF-UP",
|
175
182
|
),
|
176
183
|
)
|
177
184
|
if request.allocation_ids
|
@@ -32,7 +32,9 @@ class StockRequest(models.AbstractModel):
|
|
32
32
|
def _compute_product_qty(self):
|
33
33
|
for rec in self:
|
34
34
|
rec.product_qty = rec.product_uom_id._compute_quantity(
|
35
|
-
rec.product_uom_qty,
|
35
|
+
rec.product_uom_qty,
|
36
|
+
rec.product_id.product_tmpl_id.uom_id,
|
37
|
+
rounding_method="HALF-UP",
|
36
38
|
)
|
37
39
|
|
38
40
|
name = fields.Char(copy=False, required=True, readonly=True, default="/")
|
@@ -69,7 +69,9 @@ class StockRequestAllocation(models.Model):
|
|
69
69
|
def _compute_requested_product_qty(self):
|
70
70
|
for rec in self:
|
71
71
|
rec.requested_product_qty = rec.product_uom_id._compute_quantity(
|
72
|
-
rec.requested_product_uom_qty,
|
72
|
+
rec.requested_product_uom_qty,
|
73
|
+
rec.product_id.uom_id,
|
74
|
+
rounding_method="HALF-UP",
|
73
75
|
)
|
74
76
|
|
75
77
|
@api.depends(
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
2
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
3
|
<head>
|
@@ -367,7 +366,7 @@ ul.auto-toc {
|
|
367
366
|
!! This file is generated by oca-gen-addon-readme !!
|
368
367
|
!! changes will be overwritten. !!
|
369
368
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
370
|
-
!! source digest: sha256:
|
369
|
+
!! source digest: sha256:ef1c2d8a89397c0b8ac445dabd1a50295b4422207006ce5186d7e7eb24a7e2b2
|
371
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
372
371
|
<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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-request/tree/16.0/stock_request"><img alt="OCA/stock-logistics-request" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--request-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-request-16-0/stock-logistics-request-16-0-stock_request"><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-request&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
373
372
|
<p>This module was written to allow users to request products that are
|
@@ -1319,3 +1319,45 @@ class TestStockRequestOrderState(TestStockRequest):
|
|
1319
1319
|
self.assertEqual(self.request_a.state, "cancel")
|
1320
1320
|
self.assertEqual(self.request_b.state, "done")
|
1321
1321
|
self.assertEqual(self.order.state, "done")
|
1322
|
+
|
1323
|
+
def test_rounding_half_up_in_progress_01(self):
|
1324
|
+
product_half_up = self._create_product(
|
1325
|
+
"HALFUP", "HalfUp Product", self.main_company.id
|
1326
|
+
)
|
1327
|
+
product_half_up.uom_id.rounding = 1.0
|
1328
|
+
vals = {
|
1329
|
+
"product_id": product_half_up.id,
|
1330
|
+
"product_uom_id": product_half_up.uom_id.id,
|
1331
|
+
"product_uom_qty": 0.5,
|
1332
|
+
"company_id": self.main_company.id,
|
1333
|
+
"warehouse_id": self.warehouse.id,
|
1334
|
+
"location_id": self.virtual_loc.id,
|
1335
|
+
}
|
1336
|
+
stock_request = self.stock_request.create(vals)
|
1337
|
+
stock_request.action_confirm()
|
1338
|
+
self.assertEqual(
|
1339
|
+
stock_request.qty_in_progress,
|
1340
|
+
1,
|
1341
|
+
"Quantity in progress should be the rounded up quantity after confirmation",
|
1342
|
+
)
|
1343
|
+
|
1344
|
+
def test_rounding_half_up_in_progress_02(self):
|
1345
|
+
product_half_up = self._create_product(
|
1346
|
+
"HALFUP", "HalfUp Product", self.main_company.id
|
1347
|
+
)
|
1348
|
+
product_half_up.uom_id.rounding = 1.0
|
1349
|
+
vals = {
|
1350
|
+
"product_id": product_half_up.id,
|
1351
|
+
"product_uom_id": product_half_up.uom_id.id,
|
1352
|
+
"product_uom_qty": 1.49,
|
1353
|
+
"company_id": self.main_company.id,
|
1354
|
+
"warehouse_id": self.warehouse.id,
|
1355
|
+
"location_id": self.virtual_loc.id,
|
1356
|
+
}
|
1357
|
+
stock_request = self.stock_request.create(vals)
|
1358
|
+
stock_request.action_confirm()
|
1359
|
+
self.assertEqual(
|
1360
|
+
stock_request.qty_in_progress,
|
1361
|
+
1,
|
1362
|
+
"Quantity in progress should be the rounded down quantity after confirmation",
|
1363
|
+
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-stock-request
|
3
|
-
Version: 16.0.1.0.
|
3
|
+
Version: 16.0.1.0.1
|
4
4
|
Summary: Internal request for stock
|
5
5
|
Home-page: https://github.com/OCA/stock-logistics-request
|
6
6
|
Author: ForgeFlow, Odoo Community Association (OCA)
|
@@ -23,7 +23,7 @@ Stock Request
|
|
23
23
|
!! This file is generated by oca-gen-addon-readme !!
|
24
24
|
!! changes will be overwritten. !!
|
25
25
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
26
|
-
!! source digest: sha256:
|
26
|
+
!! source digest: sha256:ef1c2d8a89397c0b8ac445dabd1a50295b4422207006ce5186d7e7eb24a7e2b2
|
27
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
28
28
|
|
29
29
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -1,6 +1,6 @@
|
|
1
|
-
odoo/addons/stock_request/README.rst,sha256=
|
1
|
+
odoo/addons/stock_request/README.rst,sha256=eVOURFf02pmhDradsS8q5pFwWLyQz0oGhn8U68mbxCo,4854
|
2
2
|
odoo/addons/stock_request/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
3
|
-
odoo/addons/stock_request/__manifest__.py,sha256=
|
3
|
+
odoo/addons/stock_request/__manifest__.py,sha256=MmnPdjGLnMCGJqZWiPiZMnH2RnI2ZyGIy8FH4QqmprU,949
|
4
4
|
odoo/addons/stock_request/data/stock_request_sequence_data.xml,sha256=MKvzK__cH1gecmyqWK6Vj7yJ0o1-oKbqy2ydNoTUhs0,683
|
5
5
|
odoo/addons/stock_request/i18n/ca.po,sha256=qdFJQ8yHPj1bwvNUZQWQhEkFUeWElS6ABVMBZKhaRg0,44478
|
6
6
|
odoo/addons/stock_request/i18n/de.po,sha256=dGkRshD7mK0IIZcxbtlXwqAwWcL7jz3SgH8rB_oUkz4,48646
|
@@ -38,9 +38,9 @@ odoo/addons/stock_request/models/stock_location.py,sha256=ckie9pUiJ2r_pU_-ojYZie
|
|
38
38
|
odoo/addons/stock_request/models/stock_move.py,sha256=hDQhoO9GHD_-64C0VEcR9csAbldXHI_UtbbEVqVEyfQ,2812
|
39
39
|
odoo/addons/stock_request/models/stock_move_line.py,sha256=yG9lnTjfAdUBdcclnrsB5bzvpItmpV0wrCHIh7hdJDQ,2773
|
40
40
|
odoo/addons/stock_request/models/stock_picking.py,sha256=XmdxMG-GNKJjF6RE8inj45TBy1eEhmRh4nzb-0bMQs0,1339
|
41
|
-
odoo/addons/stock_request/models/stock_request.py,sha256=
|
42
|
-
odoo/addons/stock_request/models/stock_request_abstract.py,sha256=
|
43
|
-
odoo/addons/stock_request/models/stock_request_allocation.py,sha256=
|
41
|
+
odoo/addons/stock_request/models/stock_request.py,sha256=BSLv_kcAam4SLe5W7aATQjkRQTuDD4xsHj7JNtrr4DU,16337
|
42
|
+
odoo/addons/stock_request/models/stock_request_abstract.py,sha256=HiMezc9W7V1N59gPf7hTXepOvsDcaw7FDlKpbE7kVq0,9492
|
43
|
+
odoo/addons/stock_request/models/stock_request_allocation.py,sha256=Kqq6VcZgYSbw2OSooeWgzVLBlWyiVJbR71dyKciPzUg,2927
|
44
44
|
odoo/addons/stock_request/models/stock_request_order.py,sha256=p5aQD6XFO8oqOwlcCNvBfyjin7dpYpsV2pZEjUHBSp4,12673
|
45
45
|
odoo/addons/stock_request/models/stock_route.py,sha256=VFATxVyY7QGHjX3R83wSrST-EgXstJZY1QS0uALgbQw,853
|
46
46
|
odoo/addons/stock_request/models/stock_rule.py,sha256=bo-oD3LubsetGtFs7m3OpZxQ1QIPPBP9EoNByDKgisI,1048
|
@@ -54,9 +54,9 @@ odoo/addons/stock_request/security/ir.model.access.csv,sha256=dsUwAR79-qQNVwCZhv
|
|
54
54
|
odoo/addons/stock_request/security/stock_request_security.xml,sha256=4nM10OVzHSG11_H2WsQ5HeIcPyGzceGq93qtJue1r0M,5886
|
55
55
|
odoo/addons/stock_request/static/description/icon.png,sha256=HZGM_z7Ta3zNQ2924BUiMfDuVSCWqrEwUQMWXBnK7yk,15218
|
56
56
|
odoo/addons/stock_request/static/description/icon.svg,sha256=e3qo4KGYRy7Mfzhb_bCfVA-73Rk2Lx1z9_kz7tTjdO0,9771
|
57
|
-
odoo/addons/stock_request/static/description/index.html,sha256=
|
57
|
+
odoo/addons/stock_request/static/description/index.html,sha256=q_ZcdYxMf195WGyXUsirys8SejPFZJZ5z69B-vTIwOo,15995
|
58
58
|
odoo/addons/stock_request/tests/__init__.py,sha256=3NQ2fafGprBbsMjR2Y__yzyvFX5Vio1r0j6tT3FTbas,33
|
59
|
-
odoo/addons/stock_request/tests/test_stock_request.py,sha256=
|
59
|
+
odoo/addons/stock_request/tests/test_stock_request.py,sha256=RzmUB3QdH6mlKzLIFB8woPHzkdl5r_qjyE5hdBZKpuU,55751
|
60
60
|
odoo/addons/stock_request/views/product.xml,sha256=CJ6RE5uGQLlIMDCPKxw8nhodb_rR3jaj-mF5ozCFUKI,1517
|
61
61
|
odoo/addons/stock_request/views/res_config_settings_views.xml,sha256=l2V6pRh1FEbFuNEAy5Sp6DB945HXNF1YMUzeAzg-jM0,8628
|
62
62
|
odoo/addons/stock_request/views/stock_move_views.xml,sha256=Z5pNG0WfYz-CTlxgB-rma0BoT08VQDHnm3J_Ksu9BxA,1072
|
@@ -65,7 +65,7 @@ odoo/addons/stock_request/views/stock_request_allocation_views.xml,sha256=NhoVR2
|
|
65
65
|
odoo/addons/stock_request/views/stock_request_menu.xml,sha256=S_3HPkmYcHC_xtPjusHiZX7RUW5CGrJW3w52ScnJFNw,1308
|
66
66
|
odoo/addons/stock_request/views/stock_request_order_views.xml,sha256=Kf73CfQ_gTqjW0UObFh5EDHwYapdl_dMS4oSpEnsWuM,10520
|
67
67
|
odoo/addons/stock_request/views/stock_request_views.xml,sha256=zs_4N_VAskigIJp9i-kkG40QEqkxeteK-qcJ6MQqeqU,11757
|
68
|
-
odoo_addon_stock_request-16.0.1.0.
|
69
|
-
odoo_addon_stock_request-16.0.1.0.
|
70
|
-
odoo_addon_stock_request-16.0.1.0.
|
71
|
-
odoo_addon_stock_request-16.0.1.0.
|
68
|
+
odoo_addon_stock_request-16.0.1.0.1.dist-info/METADATA,sha256=sBB7zaEz3C5G1tI4w3gYLbKyKFq1Mhggm2WmXXvD2eA,5408
|
69
|
+
odoo_addon_stock_request-16.0.1.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
70
|
+
odoo_addon_stock_request-16.0.1.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
71
|
+
odoo_addon_stock_request-16.0.1.0.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|