He left a will bequeathing to the males and depriving the females – what should the heirs do?
Question

Before my grandfather died, he left a will in which the lands and buildings are divided. He brought the witnesses and they signed it. In that will my grandfather wrote nearly everything for the males, while wrote only a small room for females. 
Firstly: what is the ruling on this will? Is it invalid according to what the prophet (PBUH) said: “there’s no will concerning the heirs”. 
Secondly: when the females asked for their rights, the males refused totally but to implement what is in the will, what is the ruling on their situation?.
Praise be to Allah.It is not permissible to make a bequest to heirs, because of the report narrated by Abu Dawood (2870), al-Tirmidhi (2120), al-Nasaa’i (4641) and Ibn Majaah (2713) from Abu Umaamah (may Allaah be pleased with him) who said: I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: “Allaah has given each person who has rights his rights, and there is no bequest for an heir.” Classed as saheeh by al-Albaani in Saheeh Abi Dawood. 
This will should not be executed except with the consent of the heirs, because the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “It is not permissible to bequeath something to an heir unless the other heirs agree.” Narrated by al-Daaraqutni; classed as hasan by al-Haafiz Ibn Hajar in Buloogh al-Maraam.  
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (6/58): If (the deceased) left a bequest to an heir, and it is not approved of by the other heirs, then it is not valid, and there is no difference of opinion among the scholars on this point. Ibn al-Mundhir and Ibn ‘Abd al-Barr said: The scholars are unanimously agreed on this point and there are reports from the Messenger of Allaah (peace and blessings of Allaah be upon him) concerning that. Abu Umaamah narrated: I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: “Allaah has given each person who has rights his rights, and there is no bequest for an heir.”  Narrated by Abu Dawood, Ibn Majaah and al-Tirmidhi … If they allow it, it is permissible, according to the majority of scholars. End quote. 
It says in Fataawa al-Lajnah al-Daa’imah (16/317): It is not permissible to bequeath more than one-third, and it is not valid to bequeath to an heir, unless the adult heirs give their consent with regard to their share, because the Prophet (peace and blessings of Allaah be upon him) said: “Allaah has given each person who has rights his rights, and there is no bequest for an heir.” Narrated by Ahmad, Abu Dawood, al-Tirmidhi and Ibn Majaah, and by al-Daaraqutni who added at the end: “unless the heirs agree.” End quote. 
Based on this, what your grandfather did of bequeathing to the males and depriving the females is wrongdoing and a grave sin, for wealth belongs to Allaah and man is appointed as vice-gerent over it, to look after it in a manner that pleases Allaah. Allaah has allocated the shares of inheritance Himself, and has warned against transgressing His limits. After mentioning the shares of inheritance, Allaah says (interpretation of the meaning): 
“These are the limits (set by) Allaah (or ordainments as regards laws of inheritance), and whosoever obeys Allaah and His Messenger (Muhammad صلى الله عليه وسلم) will be admitted to Gardens under which rivers flow (in Paradise), to abide therein, and that will be the great success.
14. And whosoever disobeys Allaah and His Messenger (Muhammad صلى الله عليه وسلم), and transgresses His limits, He will cast him into the Fire, to abide therein; and he shall have a disgraceful torment”
[al-Nisa’ 4:13, 14]
It is strange that this man ended his life with wrongdoing and sin, and insisted on leaving behind mistreatment, deprivation and severing of family ties when he died. 
What the heirs must do is cancel this bequest and divide the inheritance as enjoined by Allaah; it is not permissible for them to transgress against the rights of the females in accordance with this bequest. 
If they do so, they will be partners with this grandfather in sin and transgression, rather their sin will be even greater and even worse, because they are the ones who usurped the right from those who were entitled to it. We ask Allaah to guide them.   
And Allaah knows best.