diff --git a/stock_putaway_method/__manifest__.py b/stock_putaway_method/__manifest__.py index 1857b163b..e8619d74c 100644 --- a/stock_putaway_method/__manifest__.py +++ b/stock_putaway_method/__manifest__.py @@ -3,7 +3,7 @@ "name": "Putaway strategy method", "summary": "Add the putaway strategy method back, " "removed from the stock module in Odoo 12", - "version": "12.0.1.0.0", + "version": "14.0.1.0.0", "category": "Inventory", "website": "https://github.com/OCA/stock-logistics-warehouse", "author": "Camptocamp SA, " "Odoo Community Association (OCA)", diff --git a/stock_putaway_method/models/product_strategy.py b/stock_putaway_method/models/product_strategy.py index faee83fea..5b88584d0 100644 --- a/stock_putaway_method/models/product_strategy.py +++ b/stock_putaway_method/models/product_strategy.py @@ -2,8 +2,8 @@ from odoo import api, fields, models -class PutAwayStrategy(models.Model): - _inherit = "product.putaway" +class StockPutawayRule(models.Model): + _inherit = "stock.putaway.rule" method = fields.Selection( selection="_get_putaway_options", diff --git a/stock_putaway_method/tests/test_putaway_method.py b/stock_putaway_method/tests/test_putaway_method.py index adef92567..83e97b4e9 100644 --- a/stock_putaway_method/tests/test_putaway_method.py +++ b/stock_putaway_method/tests/test_putaway_method.py @@ -8,5 +8,5 @@ class TestPutawayMethod(TransactionCase): # Check if "fixed" is a valid putaway method def test_01_putaway_methods(self): - field_method = self.env["product.putaway"]._fields.get("method") + field_method = self.env["stock.putaway.rule"]._fields.get("method") self.assertIn("fixed", field_method.get_values(self.env)) diff --git a/stock_putaway_method/views/product_strategy_views.xml b/stock_putaway_method/views/product_strategy_views.xml index b85afa0ab..63a1813f9 100644 --- a/stock_putaway_method/views/product_strategy_views.xml +++ b/stock_putaway_method/views/product_strategy_views.xml @@ -1,14 +1,14 @@ - product.putaway.form.method - product.putaway - + stock.putaway.rule.form.method + stock.putaway.rule + - + - + {'invisible': [('method', '!=', 'fixed')]}