On a side note, there are at least five typos in the screenshot and another four in the code excerpt. And I'm not counting the "s" instead of "z" thingy (Sorry, couldn't resist pointing that out... I know it's irrelevant)
Amallric has a point here - the small arms used by militia are not exactly something you would research separately. But then, there needs to be some way to model the outfitting of militia with more modern weaponry. This would only be possible in a realistic way if the equipment was sort of an object, too, so you could take the small arms of an infantry brigade and give it to a militia brigade, while the infantry gets the latest fashion killing toys.
I was expecting to be able to research something like a semi-auto rifle, and then once complete my units would be upgraded with it. Then I was expecting to be able to specify the priority of the upgrades.