AFAIK, the sh inventory command in the old routers like 17xx abd 26xx is a recent addition but they show the processor ID instead of the Chassis serial number
Only the ISR seems to provide the proper serial number with the above command
Its advisable to configure the serial number for these devices using the snmp chassis-id command which can be retreived later using SNMP
HTH
Narayan