I am travelling to Namibia today in the afternoon and coming back in two weeks. My B permit is expiring end July, I have applied for a new one. I still have my old one because is not yet expired.
My question is, is it a problem to travel out? will I be refused re-entry?
Make sure you DO NOT try to re-enter without the valid B Permit. A tourist visa situation that kicks in for most when they enter without a residence permit does not apply if you have a permanent residence here.
If it expires while you are away then you will need to apply for temporary entry visa while in Namibia and this is not a 2 day affair. It could take weeks to get a hold of this.
You should have (at the very least) an acknowledging email/letter from when you submitted the application for your permit renewal. If not, ask for one.
Take a copy with you; the application being processed should show up on the computer at swiss passport control but having proof that the renewal's in the system wouldn't hurt if you're questioned.
I understand it's too late for the OP, but in general:
If your permit is about to expire and you might be abroad when the new one is due to arrive- then you can apply for a short-term visa (the type they stick in your passport).
When I had a B permit, there was a similar issue and I got exactly that- I think it was for three months.
The only downside was the price (Many years ago it was something like 120 CHF).