diff --git a/stock_pull_list/README.rst b/stock_pull_list/README.rst index c22f10075..5b773d3b3 100644 --- a/stock_pull_list/README.rst +++ b/stock_pull_list/README.rst @@ -10,20 +10,20 @@ Stock Pull List !! source digest: sha256:5866967730daa2fba1551d9a481e2b57951921208c66b4ec1bacec6bd6982cb5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status - :alt: Alpha + :alt: Beta .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :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_pull_list + :target: https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_pull_list :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_pull_list + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_pull_list :alt: Translate me on Weblate .. |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=14.0 + :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| @@ -32,11 +32,6 @@ The pull list checks the stock situation at the given location and calculates the shortfall quantities (quantity needed to cover all needs) for products. Procurements can be created for these shortfall quantities. -.. IMPORTANT:: - This is an alpha version, the data model and design can change at any time without warning. - Only for development or testing purpose, do not use in production. - `More details on development status `_ - **Table of contents** .. contents:: @@ -72,7 +67,7 @@ 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 to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -110,6 +105,6 @@ Current `maintainer `__: |maintainer-LoisRForgeFlow| -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_pull_list/__manifest__.py b/stock_pull_list/__manifest__.py index 2b0154c9f..a592e26f1 100644 --- a/stock_pull_list/__manifest__.py +++ b/stock_pull_list/__manifest__.py @@ -1,16 +1,16 @@ -# Copyright 2020 ForgeFlow, S.L. +# Copyright 2020-24 ForgeFlow, S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Stock Pull List", "summary": "The pull list checks the stock situation and calculates " "needed quantities.", - "version": "14.0.1.2.1", + "version": "16.0.1.0.0", "license": "AGPL-3", "website": "https://github.com/OCA/stock-logistics-warehouse", - "author": "ForgeFlow, " "Odoo Community Association (OCA)", + "author": "ForgeFlow, Odoo Community Association (OCA)", "maintainers": ["LoisRForgeFlow"], - "development_status": "Alpha", + "development_status": "Beta", "category": "Warehouse Management", "depends": ["stock", "stock_free_quantity"], "data": [ diff --git a/stock_pull_list/models/__init__.py b/stock_pull_list/models/__init__.py index ae4c27227..dae0bb2ef 100644 --- a/stock_pull_list/models/__init__.py +++ b/stock_pull_list/models/__init__.py @@ -1 +1,2 @@ from . import stock_picking +from . import stock_picking_type diff --git a/stock_pull_list/models/stock_picking.py b/stock_pull_list/models/stock_picking.py index fab6c7a6d..e60d58eb5 100644 --- a/stock_pull_list/models/stock_picking.py +++ b/stock_pull_list/models/stock_picking.py @@ -1,3 +1,6 @@ +# Copyright 2020-24 ForgeFlow, S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + from odoo import _, fields, models from odoo.exceptions import UserError @@ -14,7 +17,8 @@ class StockPicking(models.Model): if not record.picking_type_id.allow_pull_list_server_action: raise UserError( _( - "Operation type of %(name)s transfer did not handle server action", + "Operation type of %(name)s transfer does not allow " + "pull list server action.", name=record.name, ) ) @@ -23,11 +27,3 @@ class StockPicking(models.Model): ) res = pull_wizard.action_prepare() return res - - -class StockPickingType(models.Model): - _inherit = "stock.picking.type" - - allow_pull_list_server_action = fields.Boolean( - string="Allow pull list server action", default=False - ) diff --git a/stock_pull_list/models/stock_picking_type.py b/stock_pull_list/models/stock_picking_type.py new file mode 100644 index 000000000..ddc19ba67 --- /dev/null +++ b/stock_pull_list/models/stock_picking_type.py @@ -0,0 +1,10 @@ +# Copyright 2020-24 ForgeFlow, S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockPickingType(models.Model): + _inherit = "stock.picking.type" + + allow_pull_list_server_action = fields.Boolean(default=False) diff --git a/stock_pull_list/static/description/index.html b/stock_pull_list/static/description/index.html index bbf41f8d5..463067902 100644 --- a/stock_pull_list/static/description/index.html +++ b/stock_pull_list/static/description/index.html @@ -1,4 +1,3 @@ - @@ -369,16 +368,10 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:5866967730daa2fba1551d9a481e2b57951921208c66b4ec1bacec6bd6982cb5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Alpha License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runboat

The pull list checks the stock situation at the given location and calculates the shortfall quantities (quantity needed to cover all needs) for products. Procurements can be created for these shortfall quantities.

-
-

Important

-

This is an alpha version, the data model and design can change at any time without warning. -Only for development or testing purpose, do not use in production. -More details on development status

-

Table of contents

    @@ -423,7 +416,7 @@ groups.

    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 to smash it by providing a detailed and welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

@@ -449,7 +442,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

LoisRForgeFlow

-

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_pull_list/tests/common.py b/stock_pull_list/tests/common.py index 4aa41ea54..3bf0ebf25 100644 --- a/stock_pull_list/tests/common.py +++ b/stock_pull_list/tests/common.py @@ -30,10 +30,10 @@ class TestPullListCommon(TransactionCase): route_vals = { "name": "WH2 -> WH", } - self.transfer_route = self.env["stock.location.route"].create(route_vals) + self.transfer_route = self.env["stock.route"].create(route_vals) rule_vals = { - "location_id": self.warehouse.lot_stock_id.id, "location_src_id": self.warehouse_2.lot_stock_id.id, + "location_dest_id": self.warehouse.lot_stock_id.id, "action": "pull_push", "warehouse_id": self.warehouse.id, "propagate_warehouse_id": self.warehouse_2.id, @@ -61,7 +61,7 @@ class TestPullListCommon(TransactionCase): "location_id": self.warehouse.lot_stock_id.id, "location_dest_id": self.customer_loc.id, "scheduled_date": date_move, - "move_lines": [ + "move_ids": [ ( 0, 0, diff --git a/stock_pull_list/wizards/stock_pull_list_wizard.py b/stock_pull_list/wizards/stock_pull_list_wizard.py index a72016bfd..ad139d291 100644 --- a/stock_pull_list/wizards/stock_pull_list_wizard.py +++ b/stock_pull_list/wizards/stock_pull_list_wizard.py @@ -109,9 +109,7 @@ class PullListWizard(models.TransientModel): def _get_available_qty(self, product, location): product_obj = self.env["product.product"] - product_l = product_obj.with_context({"location": location.id}).browse( - product.id - ) + product_l = product_obj.with_context(location=location.id).browse(product.id) if self.exclude_reserved: return product_l.free_qty return product_l.qty_available diff --git a/stock_pull_list/wizards/stock_pull_list_wizard.xml b/stock_pull_list/wizards/stock_pull_list_wizard.xml index cef9c5aa0..8cf337c85 100644 --- a/stock_pull_list/wizards/stock_pull_list_wizard.xml +++ b/stock_pull_list/wizards/stock_pull_list_wizard.xml @@ -50,7 +50,7 @@
- +