Fix sql error: parent_type is ambiguous.

SugarCRM breaks while opening the detail view of any record if it has a parent_type field and its related with activities.
That's because parent_type is specified two times on the query, one without an alias. This patch adds the table alias to fix the problem.