The value of the goods produced is recorded for the the current year GDP. The year of production not the year of the sale is where the product being produced needs to be recorded within. If it is sold the following year, the sale will then be recorded in the year it is sold in.