Fixed #13711 -- Error raised when auto-generated name becomes too long.

The ticket #13711 and #13528 are somewhat related.
There was a diff given for #13528 by claudep.
The diff works fine. The only change required in that is self.model should be changed to self.concrete.model
Thanks Tim Graham for help.
For solving the issue of #13711 I have truncated the field names in the same manner as we do the table names, so that no database error would spring up.
Please review and report if any changes are required or if its fine then well and good.
Thanks Tim Graham for help