this solution not works on portal please help???
I've (maybe) read your question wrong and answered it for communities instead of partner portals. But since you are not really clear about what you have, I'm keeping this answer and have updated your question to cover both. So the answer might not be correct if you are really dealing with the (old!) portals. Please verify that. However if you are using communities, your chances are good to make it work. At the moment I can't provide an answer for the old portals. As a rule of thumb, if you have a sidebar and static resources are available via an URL, the workaround might work - otherwise it's likely to fail.
Original answer for Communities
After having this caveat emptor emphasized first, the stated workaround should work just fine on communities, too. However you need to make a slight adjustment. The reason for the failure you are facing is the URL under which the static resources are served in communities. The standard pattern
is invalid in communities an will result into an error. You need to use this pattern instead:
As a result, you should be able to use the workaround with similar possibilities and limitations as in the Standard Salesforce UI. If you need the workarounds at both places, you need to work with two different homepage layouts and injection-components.
You might also have a look at this article for the resource-urls: How to reference static resources from a Community HTML header in a cache-compatible way?
You should verify if the mere requirement just to "hide some picklist values" is strong enough for justifying workarounds like that. I doubt it.
Please consider those workarounds as desperate measures and a last resort for cases after all supported methods have failed. Unfortunately you are not telling us enough backgrounds to understand what you really need and why.
To give you an impression for what use cases those workarounds might be considered, you can review this article: Why do we still need to hack the Sidebar? Usecases - Workarounds - Alternatives