You can just look up the entry of this potion in: Data\Public\Shared\Stats\Generated\Data\Potion.txt after you unpacked 'Shared.pak' with the converter tool (
http://forums.larian.com/ubbthreads.php?ubb=showflat&Number=572322&page=14) - don't know if the files are available otherwise -, or you can probably view the game's stats with the Editor (never used it, so I don't know if all data is accessible right from the start):
new entry "CON_Potion_Will"
type "Potion"
using "Potion"
data "RootTemplate" "98785868-afb7-4845-a7c3-f550b08110a6"
data "Act part" "9"
data "StackId" "Will"
data "Value" "300"
data "Duration" "4"
data "Flags" "CharmImmunity;FearImmunity;MuteImmunity;BlindImmunity;CursedImmunity;TauntedImmunity;SleepingImmunity"
data "ObjectCategory" "VariousPotion"
data "MinAmount" "1"
data "MaxAmount" "1"
data "Priority" "1"
data "MinLevel" "9"
Just copy the line
data "Flags" "CharmImmunity;FearImmunity;MuteImmunity;BlindImmunity;CursedImmunity;TauntedImmunity;SleepingImmunity"
to your stats entry and delete the immunities you don't need (seems like 'MadnessImmunity' was added sometime after I unpacked the files or there's another will potion, doesn't matter, it's justan example).
A list of flags can be found in: Data\Public\Shared\Stats\Generated\Structure\Base\ValueLists.txt:
valuelist "AttributeFlag"
value "None"
value "FreezeImmunity"
value "BurnImmunity"
value "StunImmunity"
value "PoisonImmunity"
value "CharmImmunity"
value "FearImmunity"
value "KnockdownImmunity"
value "MuteImmunity"
value "ChilledImmunity"
value "WarmImmunity"
value "WetImmunity"
value "BleedingImmunity"
value "CrippledImmunity"
value "BlindImmunity"
value "CursedImmunity"
value "WeakImmunity"
value "SlowedImmunity"
value "DiseasedImmunity"
value "InfectiousDiseasedImmunity"
value "PetrifiedImmunity"
value "DrunkImmunity"
value "SlippingImmunity"
value "FreezeContact"
value "BurnContact"
value "StunContact"
value "PoisonContact"
value "ChillContact"
value "Torch"
value "Arrow"
value "Unbreakable"
value "Unrepairable"
value "Unstorable"
value "Grounded"
value "HastedImmunity"
value "TauntedImmunity"
value "SleepingImmunity"
value "AcidImmunity"
value "SuffocatingImmunity"
value "RegeneratingImmunity"
value "DisarmedImmunity"
value "DecayingImmunity"
value "ClairvoyantImmunity"
value "EnragedImmunity"
value "BlessedImmunity"
value "ProtectFromSummon"
value "Floating"
value "DeflectProjectiles"
value "IgnoreClouds"
value "MadnessImmunity"
value "ChickenImmunity"
value "IgnoreCursedOil"
value "ShockedImmunity"
value "WebImmunity"
value "LootableWhenEquipped"
value "PickpocketableWhenEquipped"
value "LoseDurabilityOnCharacterHit"
value "EntangledContact"
value "ShacklesOfPainImmunity"
value "Custom1"
value "Custom2"
value "InvisibilityImmunity"