Can we Split StockController class validate_inspection method into fine parts for healthy overriding? As is, the method cannot be overridden as it carries all the logic within. If we would like to introduce additional conditions to put the doctype items into inspection, that is not possible due to the coding of the method. Can we split the items validation in a separate function in order not to copy the logic within our overriding class? Thus, we may benefit from future updates to that part of the logc.
Looks like all the validations may benefit from such a refactoring effort. Conditions and execution must be separated so that customer can override conditions or execution.