From 02e9084a95d80630fb4cc5986fdcfba60b17a611 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 24 Aug 2018 12:14:25 +0200 Subject: [PATCH] [9.0][FIX] stock_inventory_discrepancy: Launch wizard as current user backport of 10.0 --- .../tests/test_inventory_discrepancy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py b/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py index 4dd9c2cff..dc63fea1d 100644 --- a/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py +++ b/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py @@ -163,11 +163,11 @@ class TestInventoryDiscrepancy(TransactionCase): """Test if a user error raises when a stock user tries to update the qty for a product and the correction is a discrepancy over the threshold.""" - upd_qty = self.obj_upd_qty_wizard.create({ + upd_qty = self.obj_upd_qty_wizard.sudo(self.user).create({ 'product_id': self.product1.id, 'product_tmpl_id': self.product1.product_tmpl_id.id, 'new_quantity': 10.0, 'location_id': self.test_loc.id, }) with self.assertRaises(UserError): - upd_qty.sudo(self.user).change_product_qty() + upd_qty.change_product_qty()