Currently there is no code generation property that controls directly whether an obsolete object is generated or not. Thus, it is generated by default.
Nevertheless, currently three alternative options are available:
You can use the code generation property skip=true to exclude such an object (column) from the generation. You need to set that property on each OID (subtree OID) you want to exclude.
You can define a AGENT-CAPABILITIES MIB module that defines the supported objects in your agent in a detailed manner. This can be used to exclude obsolete MIB objects from you agent and even reduce the supported enumeration labels for some enumerated INTEGER objects, for example.
Only for experts: You could modify the code generation template and put in some code there, that evaluates the STATUS field of the object an then skip it automatically.
The upcoming version 5.0 of AgenPro will include a property to do object filtering in a more generic way by directly using a code generation property.