You can create an inline table in the script with the sort order you want, and join it to your data model.
Then have the object (list box, table, multi box etc.) sort by expression on the field SortOrder
LEFT JOIN (YourTableWithRealValues)
LOAD * INLINE [
2016 W39, 1
2017 W1, 2
2016 W40 , 3
2017 W2, 4
Try using this as your sorting expression:
Year & if(len(mod(purgechars(Week,'Wk'),13))<2,'0'&mod(purgechars(Week,'Wk'),13),mod(purgechars(Week,'Wk'),13))
The expression is assuming that you have a 52-week calendar and that there are 13 weeks per quarter. It is then converting it to a number between 0 and 12.