odoo-addon-stock-request 15.0.1.7.0.1__py3-none-any.whl → 15.0.1.7.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.
@@ -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:f7abc85838ce009026d931feb4eeef8b5d7c9fc791db18affe7a3e6e7dcec1ea
10
+ !! source digest: sha256:e3bafd03ba22ce61593ba65f0ba7d8dee7c00ac09c12e61a1d3dfde85fb6fc63
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": "15.0.1.7.0",
7
+ "version": "15.0.1.7.1",
8
8
  "license": "LGPL-3",
9
9
  "website": "https://github.com/OCA/stock-logistics-warehouse",
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(done_qty, request.product_uom_id)
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, request.product_uom_id
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, rec.product_id.product_tmpl_id.uom_id
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, rec.product_id.uom_id
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:f7abc85838ce009026d931feb4eeef8b5d7c9fc791db18affe7a3e6e7dcec1ea
369
+ !! source digest: sha256:e3bafd03ba22ce61593ba65f0ba7d8dee7c00ac09c12e61a1d3dfde85fb6fc63
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-warehouse/tree/15.0/stock_request"><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-15-0/stock-logistics-warehouse-15-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-warehouse&amp;target_branch=15.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
@@ -1335,3 +1335,45 @@ class TestStockRequestOrderState(TestStockRequest):
1335
1335
  self.assertEqual(self.request_a.state, "cancel")
1336
1336
  self.assertEqual(self.request_b.state, "done")
1337
1337
  self.assertEqual(self.order.state, "done")
1338
+
1339
+ def test_rounding_half_up_in_progress_01(self):
1340
+ product_half_up = self._create_product(
1341
+ "HALFUP", "HalfUp Product", self.main_company.id
1342
+ )
1343
+ product_half_up.uom_id.rounding = 1.0
1344
+ vals = {
1345
+ "product_id": product_half_up.id,
1346
+ "product_uom_id": product_half_up.uom_id.id,
1347
+ "product_uom_qty": 0.5,
1348
+ "company_id": self.main_company.id,
1349
+ "warehouse_id": self.warehouse.id,
1350
+ "location_id": self.virtual_loc.id,
1351
+ }
1352
+ stock_request = self.stock_request.create(vals)
1353
+ stock_request.action_confirm()
1354
+ self.assertEqual(
1355
+ stock_request.qty_in_progress,
1356
+ 1,
1357
+ "Quantity in progress should be the rounded up quantity after confirmation",
1358
+ )
1359
+
1360
+ def test_rounding_half_up_in_progress_02(self):
1361
+ product_half_up = self._create_product(
1362
+ "HALFUP", "HalfUp Product", self.main_company.id
1363
+ )
1364
+ product_half_up.uom_id.rounding = 1.0
1365
+ vals = {
1366
+ "product_id": product_half_up.id,
1367
+ "product_uom_id": product_half_up.uom_id.id,
1368
+ "product_uom_qty": 1.49,
1369
+ "company_id": self.main_company.id,
1370
+ "warehouse_id": self.warehouse.id,
1371
+ "location_id": self.virtual_loc.id,
1372
+ }
1373
+ stock_request = self.stock_request.create(vals)
1374
+ stock_request.action_confirm()
1375
+ self.assertEqual(
1376
+ stock_request.qty_in_progress,
1377
+ 1,
1378
+ "Quantity in progress should be the rounded down quantity after confirmation",
1379
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-stock-request
3
- Version: 15.0.1.7.0.1
3
+ Version: 15.0.1.7.1
4
4
  Summary: Internal request for stock
5
5
  Home-page: https://github.com/OCA/stock-logistics-warehouse
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:f7abc85838ce009026d931feb4eeef8b5d7c9fc791db18affe7a3e6e7dcec1ea
26
+ !! source digest: sha256:e3bafd03ba22ce61593ba65f0ba7d8dee7c00ac09c12e61a1d3dfde85fb6fc63
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=xoRP8vpqGNLrV-YfY3T-oYWryE7pwVo2B4CydAHS9ng,4874
1
+ odoo/addons/stock_request/README.rst,sha256=A5TPGwSKu68fFzBb5rNKzIWP3nqBN3ny84ROpzy3WW0,4874
2
2
  odoo/addons/stock_request/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
3
- odoo/addons/stock_request/__manifest__.py,sha256=n4Vf7BP2cjF8G5Z3tJxupzsIjDOniLi-yaXjXNGc1EU,951
3
+ odoo/addons/stock_request/__manifest__.py,sha256=WFz5PGYgicprQ37u8TGY8F0q1dsb0ZFGLo05SoJmAxg,951
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=esyDU9Yu0hwPUOtfsHQMXF8rBo9alq627oW4pjKdSz0,45378
6
6
  odoo/addons/stock_request/i18n/de.po,sha256=WJPaIcs1TzXa9HBoH8s2M5j8M-VyBef_ojyvVPc7-64,50346
@@ -41,9 +41,9 @@ odoo/addons/stock_request/models/stock_location_route.py,sha256=ItW4v-ubi1brYvSF
41
41
  odoo/addons/stock_request/models/stock_move.py,sha256=hDQhoO9GHD_-64C0VEcR9csAbldXHI_UtbbEVqVEyfQ,2812
42
42
  odoo/addons/stock_request/models/stock_move_line.py,sha256=yG9lnTjfAdUBdcclnrsB5bzvpItmpV0wrCHIh7hdJDQ,2773
43
43
  odoo/addons/stock_request/models/stock_picking.py,sha256=65XbzhNNeliiaugeI13IxgZkPS5ixHanaXQVds7hhjo,1343
44
- odoo/addons/stock_request/models/stock_request.py,sha256=iKuuej_7TdG-G8egnzdWgC-6-DHjDpxSZIkKZPB5qzM,15727
45
- odoo/addons/stock_request/models/stock_request_abstract.py,sha256=EBdv9gzul_2oYWebyCCRq6vY40AN6j5IyN9pUKkraew,9501
46
- odoo/addons/stock_request/models/stock_request_allocation.py,sha256=1c_OH1oWS-93lc__erTtlGxDr4FlOVffFMXRbRZxhEY,2867
44
+ odoo/addons/stock_request/models/stock_request.py,sha256=Qh4TZQrcHNZX41vUSW9_AT7lGw5ZtpWiuOVi6KU9xOU,15928
45
+ odoo/addons/stock_request/models/stock_request_abstract.py,sha256=7IpAbvJB6jYiIn9ynjSphtRCvcdLceENpmSqxWWceKA,9561
46
+ odoo/addons/stock_request/models/stock_request_allocation.py,sha256=Kqq6VcZgYSbw2OSooeWgzVLBlWyiVJbR71dyKciPzUg,2927
47
47
  odoo/addons/stock_request/models/stock_request_order.py,sha256=L92fC08rIFDLdEa8Co1wMz2mzvOb3MhBp-J4xLqS3pk,12529
48
48
  odoo/addons/stock_request/models/stock_rule.py,sha256=bo-oD3LubsetGtFs7m3OpZxQ1QIPPBP9EoNByDKgisI,1048
49
49
  odoo/addons/stock_request/models/stock_warehouse.py,sha256=yiJG9Yw2A1dBXwi61ehdlRbyD8PnGJqiyfJxxyN8KQQ,1476
@@ -56,9 +56,9 @@ odoo/addons/stock_request/security/ir.model.access.csv,sha256=dsUwAR79-qQNVwCZhv
56
56
  odoo/addons/stock_request/security/stock_request_security.xml,sha256=VP0gCObFyM2wl0jcsO_J0vt2_jV0BQWtj4UMSqPellA,5978
57
57
  odoo/addons/stock_request/static/description/icon.png,sha256=HZGM_z7Ta3zNQ2924BUiMfDuVSCWqrEwUQMWXBnK7yk,15218
58
58
  odoo/addons/stock_request/static/description/icon.svg,sha256=e3qo4KGYRy7Mfzhb_bCfVA-73Rk2Lx1z9_kz7tTjdO0,9771
59
- odoo/addons/stock_request/static/description/index.html,sha256=FDupl9PmjM8MtD0jWIkz7WbGzHj7X_4Uq25GBzViV-4,16054
59
+ odoo/addons/stock_request/static/description/index.html,sha256=ji26dJmergZFks14oXtkQSb2AgoqXcxqpN2tzncjKfE,16015
60
60
  odoo/addons/stock_request/tests/__init__.py,sha256=3NQ2fafGprBbsMjR2Y__yzyvFX5Vio1r0j6tT3FTbas,33
61
- odoo/addons/stock_request/tests/test_stock_request.py,sha256=IpNap1gFgqT9IoOq5_BX_Nngd4s4-p0Aty5CFwIATPI,54618
61
+ odoo/addons/stock_request/tests/test_stock_request.py,sha256=RYgmQjQbIc7BVkD6QIyL-XxaY_k2ZEp1exnVZcmgP3U,56231
62
62
  odoo/addons/stock_request/views/product.xml,sha256=CJ6RE5uGQLlIMDCPKxw8nhodb_rR3jaj-mF5ozCFUKI,1517
63
63
  odoo/addons/stock_request/views/res_config_settings_views.xml,sha256=-IJlvPYAXkO3P-QOJZlmaJ3yqdfyHdUg_arTvGm5ECo,8513
64
64
  odoo/addons/stock_request/views/stock_move_views.xml,sha256=Z5pNG0WfYz-CTlxgB-rma0BoT08VQDHnm3J_Ksu9BxA,1072
@@ -67,7 +67,7 @@ odoo/addons/stock_request/views/stock_request_allocation_views.xml,sha256=NhoVR2
67
67
  odoo/addons/stock_request/views/stock_request_menu.xml,sha256=S_3HPkmYcHC_xtPjusHiZX7RUW5CGrJW3w52ScnJFNw,1308
68
68
  odoo/addons/stock_request/views/stock_request_order_views.xml,sha256=ErboT5H8T2Yx2kb_72M5fpEPQX9X4hWa-tXURJYcQtg,9931
69
69
  odoo/addons/stock_request/views/stock_request_views.xml,sha256=k6jts8SJz1WCqaeCod9dHABEC7i3W1fT-zajr-TUWHo,11319
70
- odoo_addon_stock_request-15.0.1.7.0.1.dist-info/METADATA,sha256=NPwyrGV5eLeyNpL2XDSOY76FZRjVJK6Wj4NobkxVGYY,5431
71
- odoo_addon_stock_request-15.0.1.7.0.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
72
- odoo_addon_stock_request-15.0.1.7.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
73
- odoo_addon_stock_request-15.0.1.7.0.1.dist-info/RECORD,,
70
+ odoo_addon_stock_request-15.0.1.7.1.dist-info/METADATA,sha256=3cVLTU3VQCxaIV5JA1PzFwpN1ZYUw7au9spq0X1I95g,5429
71
+ odoo_addon_stock_request-15.0.1.7.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
72
+ odoo_addon_stock_request-15.0.1.7.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
73
+ odoo_addon_stock_request-15.0.1.7.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5