Skip to content

Commit

Permalink
Merge pull request #1587 from OCA/17.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/stock-logistics-warehouse (17.0)
  • Loading branch information
bt-admin authored Dec 14, 2024
2 parents 1a1de02 + 68ee66f commit 4e0df37
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ addon | version | maintainers | summary
[stock_change_qty_reason](stock_change_qty_reason/) | 17.0.1.0.0 | | Stock Quantity Change Reason
[stock_demand_estimate](stock_demand_estimate/) | 17.0.1.1.0 | | Allows to create demand estimates.
[stock_demand_estimate_matrix](stock_demand_estimate_matrix/) | 17.0.1.0.0 | | Allows to create demand estimates.
[stock_helper](stock_helper/) | 17.0.1.1.0 | | Add methods shared between various stock modules
[stock_helper](stock_helper/) | 17.0.1.1.1 | | Add methods shared between various stock modules
[stock_inventory](stock_inventory/) | 17.0.1.2.0 | | Allows to do an easier follow up of the Inventory Adjustments
[stock_inventory_discrepancy](stock_inventory_discrepancy/) | 17.0.1.1.0 | | Adds the capability to show the discrepancy of every line in an inventory and to block the inventory validation when the discrepancy is over a user defined threshold.
[stock_location_lockdown](stock_location_lockdown/) | 17.0.1.0.0 | | Prevent to add stock on locked locations
Expand Down
6 changes: 3 additions & 3 deletions stock_helper/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Stock Helpers
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:de9dd88a20da73855fc1f7c4c9159e67435c798b0ce47d80d72a6f9f389c574d
!! source digest: sha256:fb518cc48413d9879c043a9164bdaf25cee06d723fb62343a910233620a2c893
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down Expand Up @@ -57,8 +57,8 @@ Authors
Contributors
------------

- Guewen Baconnier <[email protected]>
- Christopher Ormaza <[email protected]>
- Guewen Baconnier <[email protected]>
- Christopher Ormaza <[email protected]>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion stock_helper/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Stock Helpers",
"summary": "Add methods shared between various stock modules",
"version": "17.0.1.1.0",
"version": "17.0.1.1.1",
"development_status": "Production/Stable",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse",
Expand Down
13 changes: 8 additions & 5 deletions stock_helper/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -366,7 +367,7 @@ <h1 class="title">Stock Helpers</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:de9dd88a20da73855fc1f7c4c9159e67435c798b0ce47d80d72a6f9f389c574d
!! source digest: sha256:fb518cc48413d9879c043a9164bdaf25cee06d723fb62343a910233620a2c893
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/17.0/stock_helper"><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-17-0/stock-logistics-warehouse-17-0-stock_helper"><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=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Add methods to be used by other modules. This is not a functional
Expand Down Expand Up @@ -409,7 +410,9 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
Expand Down
16 changes: 15 additions & 1 deletion stock_helper/tests/test_location_source_from_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,18 @@ def test_get_source_location_from_route(self):
source_location = location._get_source_location_from_route(
route, "make_to_stock"
)
self.assertEqual(source_location, self.supplier_loc)
# Since this change in v17
# https://github.com/odoo/odoo/commit/439ca89a68fe957adbe0f7a6147047593155aa9f
# _get_rule fallbacks to location's warehouse to check for routes.
# This makes that the receipt route is found by _get_source_location_from_route.
# However, this is the case only with `stock` module installed, because
# as soon as `mrp` or `purchase` is installed that first step of the receipt
# route get removed in favor of manufacture or purchase routes. See
# https://github.com/odoo/odoo/commit/d25d320e0e870980971de945719f7b7d5deadd3c
if hasattr(self.wh, "manufacture_to_resupply") or hasattr(
self.wh, "buy_to_resupply"
):
expected_location = False
else: # only `stock` installed.
expected_location = self.supplier_loc
self.assertEqual(source_location, expected_location)

0 comments on commit 4e0df37

Please sign in to comment.