diff --git a/stock_location_children/README.rst b/stock_location_children/README.rst index 457d0336041f..072c9e104396 100644 --- a/stock_location_children/README.rst +++ b/stock_location_children/README.rst @@ -2,10 +2,13 @@ Stock location children ======================= -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:b0191eb5ee5cbc4abf244a00e6a6c3fce2eedde377eb6af3732c6724a06c5339 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ Stock location children :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github - :target: https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_location_children + :target: https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_location_children :alt: OCA/stock-logistics-warehouse .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_location_children + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_location_children :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/153/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module adds a `children_ids` field on `stock.location` in order to compute and store all the children for a `stock.location` and not only its first level @@ -39,8 +42,8 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -57,6 +60,8 @@ Contributors * Akim Juillerat * Raphaël Reverdy +* Aiendry Sarkar +* Denis Roussel Maintainers ~~~~~~~~~~~ @@ -71,6 +76,6 @@ 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. -This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. +This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_location_children/__manifest__.py b/stock_location_children/__manifest__.py index 39439afd5b01..308cc5b44898 100644 --- a/stock_location_children/__manifest__.py +++ b/stock_location_children/__manifest__.py @@ -12,4 +12,5 @@ "application": False, "installable": True, "depends": ["stock"], + "data": ["views/stock_location.xml"], } diff --git a/stock_location_children/models/stock_location.py b/stock_location_children/models/stock_location.py index 0ce072db620a..84f9c0d99ce6 100644 --- a/stock_location_children/models/stock_location.py +++ b/stock_location_children/models/stock_location.py @@ -45,3 +45,18 @@ def _compute_children_ids(self): loc.children_ids = [Command.set(children)] else: loc.children_ids = [Command.clear()] + + def action_show_children_locations(self): + """ + Display all children locations of the current one + """ + self.ensure_one() + action = self.env["ir.actions.act_window"]._for_xml_id( + "stock.action_location_form" + ) + action.update( + { + "domain": [("id", "in", self.children_ids.ids)], + } + ) + return action diff --git a/stock_location_children/readme/CONTRIBUTORS.rst b/stock_location_children/readme/CONTRIBUTORS.rst index 46ed72bf3eff..0fd590fd7347 100644 --- a/stock_location_children/readme/CONTRIBUTORS.rst +++ b/stock_location_children/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Akim Juillerat * Raphaël Reverdy * Aiendry Sarkar +* Denis Roussel diff --git a/stock_location_children/static/description/index.html b/stock_location_children/static/description/index.html index 3c3b4a8c03bc..74cf9255c9aa 100644 --- a/stock_location_children/static/description/index.html +++ b/stock_location_children/static/description/index.html @@ -1,20 +1,20 @@ - - + Stock location children