From 69456c8f8460c0154ec77bd60911cf4ee027c909 Mon Sep 17 00:00:00 2001 From: sowrirajan Date: Thu, 19 Sep 2024 18:49:48 +0530 Subject: [PATCH] [MIG] stock_picking_start: Migration to 17.0 --- stock_picking_start/README.rst | 4 +++ stock_picking_start/__manifest__.py | 2 +- stock_picking_start/hooks.py | 8 ++--- stock_picking_start/readme/CONTRIBUTORS.md | 3 ++ .../static/description/index.html | 10 +++++- .../tests/test_stock_picking_start.py | 2 +- .../views/res_config_settings.xml | 35 +++++++------------ stock_picking_start/views/stock_picking.xml | 8 ++--- 8 files changed, 39 insertions(+), 33 deletions(-) diff --git a/stock_picking_start/README.rst b/stock_picking_start/README.rst index 427bdedda080..888881857f69 100644 --- a/stock_picking_start/README.rst +++ b/stock_picking_start/README.rst @@ -66,6 +66,10 @@ Contributors - Laurent Mignon +- `Sodexis Team `__: + + - Sowrirajan + Maintainers ----------- diff --git a/stock_picking_start/__manifest__.py b/stock_picking_start/__manifest__.py index f489813e0522..cf40a1a0993d 100644 --- a/stock_picking_start/__manifest__.py +++ b/stock_picking_start/__manifest__.py @@ -5,7 +5,7 @@ "name": "Stock Picking Start", "summary": """ Add button to start picking""", - "version": "16.0.1.1.1", + "version": "17.0.1.0.0", "license": "LGPL-3", "author": "ACSONE SA/NV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/stock-logistics-workflow", diff --git a/stock_picking_start/hooks.py b/stock_picking_start/hooks.py index 41c5a0bcd2de..d9dfd13fed61 100644 --- a/stock_picking_start/hooks.py +++ b/stock_picking_start/hooks.py @@ -6,21 +6,21 @@ _logger = logging.getLogger(__name__) -def pre_init_hook(cr): +def pre_init_hook(env): """Create and initialize the started field""" _logger.info("Create the started field") - cr.execute( + env.cr.execute( """ ALTER TABLE stock_picking ADD COLUMN started boolean; """ ) _logger.info("Initialize the started field") - cr.execute( + env.cr.execute( """ UPDATE stock_picking SET started = printed WHERE state = 'assigned'; """ ) - _logger.info(f"{cr.rowcount} records updated") + _logger.info(f"{env.cr.rowcount} records updated") diff --git a/stock_picking_start/readme/CONTRIBUTORS.md b/stock_picking_start/readme/CONTRIBUTORS.md index f2af9193ceae..e3174bb31d1f 100644 --- a/stock_picking_start/readme/CONTRIBUTORS.md +++ b/stock_picking_start/readme/CONTRIBUTORS.md @@ -1 +1,4 @@ - Laurent Mignon \<\> +- [Sodexis Team](dev@sodexis.com): + + > - Sowrirajan \<\> diff --git a/stock_picking_start/static/description/index.html b/stock_picking_start/static/description/index.html index c72d563170e3..8a0f135532dc 100644 --- a/stock_picking_start/static/description/index.html +++ b/stock_picking_start/static/description/index.html @@ -407,8 +407,16 @@

Authors

Contributors

+
diff --git a/stock_picking_start/tests/test_stock_picking_start.py b/stock_picking_start/tests/test_stock_picking_start.py index 3545a58201f2..c4a02c9dd723 100644 --- a/stock_picking_start/tests/test_stock_picking_start.py +++ b/stock_picking_start/tests/test_stock_picking_start.py @@ -8,7 +8,7 @@ class TestStockPickinStart(TransactionCase): @classmethod def setUpClass(cls): - super(TestStockPickinStart, cls).setUpClass() + super().setUpClass() cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) cls.wh = cls.env["stock.warehouse"].create( { diff --git a/stock_picking_start/views/res_config_settings.xml b/stock_picking_start/views/res_config_settings.xml index 90a5d84df086..38bef620165b 100644 --- a/stock_picking_start/views/res_config_settings.xml +++ b/stock_picking_start/views/res_config_settings.xml @@ -8,29 +8,20 @@ res.config.settings -
-
-
- -
-
-