Solution: %{VERSION} gets expanded by rpm as spec macro. You need to use %%{VERSION} to quote it.

So
%define t_version %(rpm -q --qf '%%{VERSION}' trytond)
gives the desired result.
Thanks to all of you for solving this!