Well, I got it: the obvious place is in the function:
"party_approved_member__add" that is executed in the trigger: "membership_rels_in_tr" when a new row is added to the table "membership_rel" (something similar happens with a relation that inherits from composition_rel, the trigger is "composition_rels_in_tr").
Regards,
Jorge.