Sayyiduna Ibn Umar (may Allah be pleased with them both) said: When the Messenger of Allah (peace and blessings be upon him) returned from the Battle of Uhud, he (peace and blessings be upon him) heard the women of Banu Abd al-Ashhal weeping over their dead, and he (peace and blessings be upon him) said: "But Hamzah (may Allah be pleased with him) has no one to weep for him." Then the women of the Ansar came and began to weep over Sayyiduna Hamzah (may Allah be pleased with him). He (peace and blessings be upon him) slept, then woke up while they were still weeping, and he (peace and blessings be upon him) said: "Woe to them! They are still weeping. Tell them to go back, and let them not weep over anyone who dies after today."
"And let them not weep over anyone who dies after today": if he meant it in general, it is like what is in the hadith of Ibn Atik (may Allah be pleased with him): "When it becomes due, let no weeping woman weep." It is also possible that what is meant is the martyrs of Uhud, as if he (peace and blessings be upon him) said: "What you have wept over them is enough for you." Permission has been reported for weeping after death with the tears of the eye and the grief of the heart, so the hadith of Sayyiduna Jabir bin Atik (may Allah be pleased with him) is to be understood as referring to what is preferable, and Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7155