From aa401a27621dfc5d469ef90633fc3a356174b4c3 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 9 Jun 2023 15:07:10 +0200 Subject: [PATCH 1/2] [FIX] stock_location_orderpoint_source_relocate: Use recordset for trap_jobs evaluation Due to https://github.com/OCA/queue/pull/537/commits/299cf4d82a68614fb6cf376601ed5bbdee680753 --- .../tests/test_location_orderpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_location_orderpoint_source_relocate/tests/test_location_orderpoint.py b/stock_location_orderpoint_source_relocate/tests/test_location_orderpoint.py index 343330cbf..29a8860ec 100644 --- a/stock_location_orderpoint_source_relocate/tests/test_location_orderpoint.py +++ b/stock_location_orderpoint_source_relocate/tests/test_location_orderpoint.py @@ -51,7 +51,7 @@ class TestLocationOrderpoint(TestLocationOrderpointCommon, SourceRelocateCommon) self.assertEqual(move.location_id, internal_location) trap.assert_jobs_count(1, only=job_func) trap.assert_enqueued_job( - orderpoint.run_auto_replenishment, + job_func, args=(move.product_id, internal_location, "location_id"), kwargs={}, properties=dict( From 99554d6c0eb0c28ac88b82b8990a0a451db19cf0 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 9 Jun 2023 16:23:12 +0200 Subject: [PATCH 2/2] [FIX] stock_location_orderpoint: Use recordset for trap_jobs evaluation Due to https://github.com/OCA/queue/pull/537/commits/299cf4d82a68614fb6cf376601ed5bbdee680753 --- stock_location_orderpoint/tests/test_location_orderpoint.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stock_location_orderpoint/tests/test_location_orderpoint.py b/stock_location_orderpoint/tests/test_location_orderpoint.py index d544c0b3f..9338f272e 100644 --- a/stock_location_orderpoint/tests/test_location_orderpoint.py +++ b/stock_location_orderpoint/tests/test_location_orderpoint.py @@ -108,7 +108,7 @@ class TestLocationOrderpoint(TestLocationOrderpointCommon): move = self._create_outgoing_move(move_qty) trap.assert_jobs_count(1, only=job_func) trap.assert_enqueued_job( - orderpoint.run_auto_replenishment, + orderpoint.browse().run_auto_replenishment, args=(move.product_id, move.location_id, "location_id"), kwargs={}, properties=dict( @@ -124,7 +124,7 @@ class TestLocationOrderpoint(TestLocationOrderpointCommon): move = self._create_incoming_move(move_qty, location_src) trap.assert_jobs_count(1, only=job_func) trap.assert_enqueued_job( - orderpoint.run_auto_replenishment, + orderpoint.browse().run_auto_replenishment, args=(move.product_id, move.location_dest_id, "location_src_id"), kwargs={}, properties=dict( @@ -142,7 +142,7 @@ class TestLocationOrderpoint(TestLocationOrderpointCommon): move = self._create_outgoing_move(move_qty) trap.assert_jobs_count(1, only=job_func) trap.assert_enqueued_job( - orderpoint.run_auto_replenishment, + orderpoint.browse().run_auto_replenishment, args=(move.product_id, move.location_id, "location_id"), kwargs={}, properties=dict(