diff --git a/purchase_sale_inter_company/tests/test_inter_company_purchase_sale.py b/purchase_sale_inter_company/tests/test_inter_company_purchase_sale.py index a818bf2f207..e74d53de261 100644 --- a/purchase_sale_inter_company/tests/test_inter_company_purchase_sale.py +++ b/purchase_sale_inter_company/tests/test_inter_company_purchase_sale.py @@ -605,6 +605,7 @@ def test_block_manual_validation(self): """ self.company_a.sync_picking = True self.company_b.sync_picking = True + self.company_a.block_po_manual_picking_validation = True self.company_b.block_po_manual_picking_validation = True purchase = self._create_purchase_order( self.partner_company_b, self.consumable_product @@ -615,4 +616,4 @@ def test_block_manual_validation(self): self.assertEqual(po_picking_id.state, "waiting") # The manual validation should be blocked with self.assertRaises(UserError): - po_picking_id.button_validate() + po_picking_id.with_user(self.user_company_a).button_validate()